diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yml b/.github/ISSUE_TEMPLATE/1.bug_report.yml index 53d0be58..db8be210 100644 --- a/.github/ISSUE_TEMPLATE/1.bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -1,4 +1,4 @@ -name: '🐛 Bug Report' +name: "🐛 Bug Report" description: Create a bug report for Umami. body: - type: textarea @@ -29,4 +29,4 @@ body: - type: input attributes: label: How are you deploying your application? (if relevant) - description: 'For example: Vercel, Railway, Docker, etc' + description: 'For example: Vercel, Railway, Docker, etc' \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2994ef0..66e16a03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,20 +16,20 @@ jobs: strategy: matrix: include: - - node-version: 18.x - db-type: postgresql - - node-version: 18.x - db-type: mysql + - node-version: 18.x + db-type: postgresql + - node-version: 18.x + db-type: mysql steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - env: - DATABASE_TYPE: ${{ matrix.db-type }} - - run: npm install --global yarn - - run: yarn install --frozen-lockfile - - run: yarn build + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + env: + DATABASE_TYPE: ${{ matrix.db-type }} + - run: npm install --global yarn + - run: yarn install --frozen-lockfile + - run: yarn build diff --git a/.prettierrc.json b/.prettierrc.json index 5656fec3..e65d136e 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,6 +1,5 @@ { "useTabs": true, - "tabWidth": 2, "arrowParens": "avoid", "endOfLine": "lf", "printWidth": 100, diff --git a/public/site.webmanifest b/public/site.webmanifest index 95911504..b20abb7c 100644 --- a/public/site.webmanifest +++ b/public/site.webmanifest @@ -1,19 +1,19 @@ { - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" + "name": "", + "short_name": "", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" } diff --git a/rollup.components.config.mjs b/rollup.components.config.mjs index 93054464..9be07390 100644 --- a/rollup.components.config.mjs +++ b/rollup.components.config.mjs @@ -14,72 +14,72 @@ import svgr from '@svgr/rollup'; const md5 = str => crypto.createHash('md5').update(str).digest('hex'); const customResolver = resolve({ - extensions: ['.js', '.jsx', '.ts', '.tsx'], + extensions: ['.js', '.jsx', '.ts', '.tsx'], }); const aliasConfig = { - entries: [ - { find: /^app/, replacement: path.resolve('./src/app') }, - { find: /^components/, replacement: path.resolve('./src/components') }, - { find: /^hooks/, replacement: path.resolve('./src/hooks') }, - { find: /^lib/, replacement: path.resolve('./src/lib') }, - { find: /^store/, replacement: path.resolve('./src/store') }, - { find: /^public/, replacement: path.resolve('./public') }, - { find: /^assets/, replacement: path.resolve('./src/assets') }, - ], - customResolver, + entries: [ + { find: /^app/, replacement: path.resolve('./src/app') }, + { find: /^components/, replacement: path.resolve('./src/components') }, + { find: /^hooks/, replacement: path.resolve('./src/hooks') }, + { find: /^lib/, replacement: path.resolve('./src/lib') }, + { find: /^store/, replacement: path.resolve('./src/store') }, + { find: /^public/, replacement: path.resolve('./public') }, + { find: /^assets/, replacement: path.resolve('./src/assets') }, + ], + customResolver, }; const jsBundle = { - input: 'src/index.ts', - output: [ - { - file: 'dist/index.js', - format: 'es', - sourcemap: true, - }, - ], - plugins: [ - del({ targets: 'dist/*', runOnce: true }), - copy({ targets: [{ src: './package.components.json', dest: 'dist', rename: 'package.json' }] }), - postcss({ - config: false, - extract: 'styles.css', - sourceMap: true, - minimize: true, - modules: { - generateScopedName: function (name, filename, css) { - const file = path.basename(filename, '.css').replace('.module', ''); - const hash = Buffer.from(md5(`${name}:${filename}:${css}`)) - .toString('base64') - .substring(0, 5); + input: 'src/index.ts', + output: [ + { + file: 'dist/index.js', + format: 'es', + sourcemap: true, + }, + ], + plugins: [ + del({ targets: 'dist/*', runOnce: true }), + copy({ targets: [{ src: './package.components.json', dest: 'dist', rename: 'package.json' }] }), + postcss({ + config: false, + extract: 'styles.css', + sourceMap: true, + minimize: true, + modules: { + generateScopedName: function (name, filename, css) { + const file = path.basename(filename, '.css').replace('.module', ''); + const hash = Buffer.from(md5(`${name}:${filename}:${css}`)) + .toString('base64') + .substring(0, 5); - return `${file}-${name}--${hash}`; - }, - }, - }), - svgr({ icon: true }), - nodeExternals(), - json(), - alias(aliasConfig), - esbuild({ - target: 'es6', - jsx: 'automatic', - loaders: { - '.js': 'jsx', - }, - }), - ], + return `${file}-${name}--${hash}`; + }, + }, + }), + svgr({ icon: true }), + nodeExternals(), + json(), + alias(aliasConfig), + esbuild({ + target: 'es6', + jsx: 'automatic', + loaders: { + '.js': 'jsx', + }, + }), + ], }; const dtsBundle = { - input: 'src/index.ts', - output: { - file: 'dist/index.d.ts', - format: 'es', - }, - plugins: [alias(aliasConfig), nodeExternals(), json(), dts()], - external: [/\.css/], + input: 'src/index.ts', + output: { + file: 'dist/index.d.ts', + format: 'es', + }, + plugins: [alias(aliasConfig), nodeExternals(), json(), dts()], + external: [/\.css/], }; export default [jsBundle, dtsBundle]; diff --git a/rollup.tracker.config.mjs b/rollup.tracker.config.mjs index 63256a17..3b466363 100644 --- a/rollup.tracker.config.mjs +++ b/rollup.tracker.config.mjs @@ -11,8 +11,8 @@ export default { plugins: [ replace({ '/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send', - 'delimiters': ['', ''], - 'preventAssignment': true, + delimiters: ['', ''], + preventAssignment: true, }), terser(), ], diff --git a/tsconfig.json b/tsconfig.json index b6a8f455..ea219456 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,14 +30,14 @@ "pages/*": ["./pages/*"], "queries/*": ["./queries/*"], "store/*": ["./store/*"], - "styles/*": ["./styles/*"] + "styles/*": ["./styles/*"], }, "plugins": [ { - "name": "next" - } - ] + "name": "next", + }, + ], }, "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "next-env.d.ts", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], }