chore: clean up

Updated deps, fixed some ts issues, renamed "scripts" to "dev-scripts", and added a script to delete build output.
This commit is contained in:
Luan
2024-06-03 17:29:11 -03:00
parent 8e942ada3b
commit b9d50daa57
6 changed files with 2000 additions and 556 deletions

View File

@@ -1,17 +1,10 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
projects: [
{
displayName: 'node',
roots: [ '<rootDir>/test' ],
testTimeout: 10000,
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
},
moduleFileExtensions: ["ts", "tsx", "js"],
testMatch: [ '**/*.test.ts' ],
setupFiles: []
}
]
preset: 'ts-jest',
testEnvironment: 'node',
transform: { '^.+\\.(ts|tsx)$': 'ts-jest' },
testTimeout: 30000,
moduleFileExtensions: [ 'ts', 'tsx', 'js' ],
testMatch: [ '**/*.test.ts' ],
setupFiles: []
};

2519
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -75,8 +75,9 @@
"test": "npx jest --verbose",
"lint": "npx eslint ./src",
"lint:fix": "npx eslint --fix ./src",
"build": "npm run build:parser-map && npm run build:proto && npm run build:esm && npm run bundle:node && npm run bundle:browser && npm run bundle:browser:prod && npm run bundle:cf-worker",
"build:parser-map": "node ./scripts/gen-parser-map.mjs",
"clean": "npx rimraf ./dist/src ./dist/package.json ./bundle/browser.js ./bundle/browser.js.map ./bundle/browser.min.js ./bundle/browser.min.js.map ./bundle/node.cjs ./bundle/node.cjs.map ./bundle/cf-worker.js ./bundle/cf-worker.js.map ./deno",
"build": "npm run clean && npm run build:parser-map && npm run build:proto && npm run build:esm && npm run bundle:node && npm run bundle:browser && npm run bundle:browser:prod && npm run bundle:cf-worker",
"build:parser-map": "node ./dev-scripts/gen-parser-map.mjs",
"build:proto": "npx pb-gen-ts --entry-path=\"src/proto\" --out-dir=\"src/proto/generated\" --ext-in-import=\".js\"",
"build:esm": "npx tspc",
"build:deno": "npx cpy ./src ./deno && npx esbuild ./src/utils/DashManifest.tsx --keep-names --format=esm --platform=neutral --target=es2020 --outfile=./deno/src/utils/DashManifest.js && npx cpy ./package.json ./deno && npx replace \".js';\" \".ts';\" ./deno -r && npx replace '.js\";' '.ts\";' ./deno -r && npx replace \"'./DashManifest.ts';\" \"'./DashManifest.js';\" ./deno -r && npx replace \"'jintr';\" \"'https://esm.sh/jintr';\" ./deno -r",
@@ -111,10 +112,10 @@
"eslint": "^8.19.0",
"eslint-plugin-tsdoc": "^0.2.16",
"glob": "^8.0.3",
"jest": "^28.1.3",
"jest": "^29.7.0",
"pbkit": "^0.0.59",
"replace": "^1.2.2",
"ts-jest": "^28.0.8",
"ts-jest": "^29.1.4",
"ts-patch": "^3.0.2",
"ts-transformer-inline-file": "^0.2.0",
"typescript": "^5.0.0"

View File

@@ -107,10 +107,11 @@
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.js",
"scripts/**/*.mjs",
"dev-scripts/**/*.mjs",
"jest.config.js",
],
"exclude": [
"node_modules",
"**/*.d.ts"
"**/*.d.ts",
]
}