Compare commits
2 Commits
0bd52157c4
...
39ceff9cf7
Author | SHA1 | Date | |
---|---|---|---|
39ceff9cf7 | |||
f17c2f195c |
63
package.json
63
package.json
@ -16,57 +16,56 @@
|
|||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/anatomy": "^2.1.1",
|
"@chakra-ui/anatomy": "^2.2.1",
|
||||||
"@chakra-ui/icons": "^2.0.19",
|
"@chakra-ui/icons": "^2.1.1",
|
||||||
"@chakra-ui/react": "^2.7.0",
|
"@chakra-ui/react": "^2.8.1",
|
||||||
"@emotion/react": "^11.11.0",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@jixun/libparakeet": "0.2.1",
|
"@jixun/libparakeet": "0.2.1",
|
||||||
"@reduxjs/toolkit": "^1.9.5",
|
"@reduxjs/toolkit": "^1.9.5",
|
||||||
"framer-motion": "^10.12.16",
|
"framer-motion": "^10.16.4",
|
||||||
"immer": "^10.0.2",
|
"immer": "^10.0.2",
|
||||||
"nanoid": "^4.0.2",
|
"nanoid": "^5.0.1",
|
||||||
"radash": "^10.8.1",
|
"radash": "^11.0.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-dropzone": "^14.2.3",
|
"react-dropzone": "^14.2.3",
|
||||||
"react-icons": "^4.9.0",
|
"react-icons": "^4.11.0",
|
||||||
"react-promise-suspense": "^0.3.4",
|
"react-promise-suspense": "^0.3.4",
|
||||||
"react-redux": "^8.0.5",
|
"react-redux": "^8.1.2",
|
||||||
"react-syntax-highlighter": "^15.5.0",
|
"react-syntax-highlighter": "^15.5.0",
|
||||||
"sass": "^1.63.3",
|
"sass": "^1.67.0",
|
||||||
"sql.js": "^1.8.0"
|
"sql.js": "^1.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-replace": "^5.0.2",
|
"@rollup/plugin-replace": "^5.0.2",
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^6.1.3",
|
||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"@testing-library/user-event": "^14.4.3",
|
"@testing-library/user-event": "^14.5.1",
|
||||||
"@types/node": "^20.2.5",
|
"@types/node": "^20.6.2",
|
||||||
"@types/react": "^18.2.7",
|
"@types/react": "^18.2.21",
|
||||||
"@types/react-dom": "^18.2.4",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@types/react-syntax-highlighter": "^15.5.7",
|
"@types/react-syntax-highlighter": "^15.5.7",
|
||||||
"@types/sql.js": "^1.4.4",
|
"@types/sql.js": "^1.4.4",
|
||||||
"@types/testing-library__jest-dom": "^5.14.6",
|
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
"@typescript-eslint/parser": "^6.7.0",
|
||||||
"@typescript-eslint/parser": "^5.59.7",
|
"@vitejs/plugin-react": "^4.0.4",
|
||||||
"@vitejs/plugin-react": "^4.0.0",
|
"@vitest/coverage-v8": "^0.34.4",
|
||||||
"@vitest/coverage-c8": "^0.31.1",
|
"@vitest/ui": "^0.34.4",
|
||||||
"@vitest/ui": "^0.31.1",
|
"eslint": "^8.49.0",
|
||||||
"eslint": "^8.41.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.1",
|
"eslint-plugin-react-refresh": "^0.4.3",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"jsdom": "^22.1.0",
|
"jsdom": "^22.1.0",
|
||||||
"lint-staged": "^13.2.2",
|
"lint-staged": "^14.0.1",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^3.0.3",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.2.2",
|
||||||
"vite": "^4.3.9",
|
"vite": "^4.4.9",
|
||||||
"vite-plugin-pwa": "^0.15.1",
|
"vite-plugin-pwa": "^0.16.5",
|
||||||
"vite-plugin-top-level-await": "^1.3.1",
|
"vite-plugin-top-level-await": "^1.3.1",
|
||||||
"vite-plugin-wasm": "^3.2.2",
|
"vite-plugin-wasm": "^3.2.2",
|
||||||
"vitest": "^0.31.1"
|
"vitest": "^0.34.4"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*": "prettier --write --ignore-unknown",
|
"*": "prettier --write --ignore-unknown",
|
||||||
@ -80,6 +79,10 @@
|
|||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"sql.js@1.8.0": "patches/sql.js@1.8.0.patch"
|
"sql.js@1.8.0": "patches/sql.js@1.8.0.patch"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"rollup-plugin-terser": "npm:@rollup/plugin-terser@0.4.3",
|
||||||
|
"sourcemap-codec": "npm:@jridgewell/sourcemap-codec@1.4.15"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5013
pnpm-lock.yaml
5013
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
17
support/command.ts
Normal file
17
support/command.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import cp from 'node:child_process';
|
||||||
|
import path from 'node:path';
|
||||||
|
import url from 'node:url';
|
||||||
|
|
||||||
|
const projectRoot = url.fileURLToPath(new URL('../', import.meta.url));
|
||||||
|
|
||||||
|
export function command(cmd: string, dir = '') {
|
||||||
|
return cp.execSync(cmd, { cwd: path.join(projectRoot, dir), encoding: 'utf-8' }).trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
export function tryCommand(cmd: string, dir = '', fallback = '') {
|
||||||
|
try {
|
||||||
|
return command(cmd, dir);
|
||||||
|
} catch (e) {
|
||||||
|
return fallback;
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,5 @@
|
|||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["vite.config.ts", "support/**/*.ts"]
|
||||||
"vite.config.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import cp from 'node:child_process';
|
|
||||||
import url from 'node:url';
|
import url from 'node:url';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
@ -10,15 +9,13 @@ import replace from '@rollup/plugin-replace';
|
|||||||
import topLevelAwait from 'vite-plugin-top-level-await';
|
import topLevelAwait from 'vite-plugin-top-level-await';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
import { VitePWA } from 'vite-plugin-pwa';
|
||||||
|
|
||||||
const gitRoot = url.fileURLToPath(new URL('.', import.meta.url));
|
import { tryCommand } from './support/command';
|
||||||
const pkg = JSON.parse(fs.readFileSync(gitRoot + '/package.json', 'utf-8'));
|
|
||||||
|
|
||||||
function command(cmd, dir = '') {
|
const projectRoot = url.fileURLToPath(new URL('.', import.meta.url));
|
||||||
return cp.execSync(cmd, { cwd: path.join(gitRoot, dir), encoding: 'utf-8' }).trim();
|
const pkg = JSON.parse(fs.readFileSync(projectRoot + '/package.json', 'utf-8'));
|
||||||
}
|
|
||||||
|
|
||||||
const COMMAND_GIT_VERSION = 'git describe --long --dirty --tags --always';
|
const COMMAND_GIT_VERSION = 'git describe --long --dirty --tags --always';
|
||||||
const shortCommit = command(COMMAND_GIT_VERSION);
|
const shortCommit = tryCommand(COMMAND_GIT_VERSION, __dirname, 'unknown');
|
||||||
const version = `${pkg.version}-${shortCommit}`;
|
const version = `${pkg.version}-${shortCommit}`;
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
|
Loading…
Reference in New Issue
Block a user