diff --git a/.eslintignore b/.eslintignore index f2cc767..4d7921a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,4 @@ .pnpm-store/ dist/ -src/node-module-imports/ -common/vendor-libs/**/*.js* +packages/common/src/vendor-libs ultimate-crosscode-typedefs/ diff --git a/.eslintrc.yml b/.eslintrc.yml index f53d329..6f41835 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -31,6 +31,10 @@ overrides: rules: node/no-missing-import: off + - files: '**/*.d.ts' + rules: + no-var: off + - files: '**/src/**/*.ts' extends: eslint-config-dmitmel/rules/typescript/with-type-checking parserOptions: diff --git a/package.json b/package.json index 86b7c93..6e95ae4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "engines": { - "node": ">=11.0.0" + "node": ">=18.0.0" }, "dependencies": { "jszip": "=3.10.1", @@ -13,12 +13,12 @@ "@types/jquery": "^1.10.31", "@types/node": ">=11.9", "@types/semver": "6.2.x || 6.3.x", - "@typescript-eslint/eslint-plugin": "^5.2.0", - "@typescript-eslint/parser": "^5.2.0", + "@typescript-eslint/eslint-plugin": "^6.20.0", + "@typescript-eslint/parser": "^6.20.0", "archiver": "^5.3.1", "esbuild": "^0.20.0", "esbuild-copy-static-files": "^0.1.0", - "eslint": "^8.1.0", + "eslint": "^8.56.0", "eslint-config-dmitmel": "dmitmel/eslint-config-dmitmel", "eslint-plugin-node": "^11.1.0", "prettier": "^2.8.8", diff --git a/packages/common/package.json b/packages/common/package.json index 3065dfa..ea3d5b2 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,9 @@ { "name": "@ccloader3/common", "private": true, + "engines": { + "node": ">=18.0.0" + }, "exports": { "./*": "./src/*.ts" } diff --git a/packages/core/package.json b/packages/core/package.json index ffc7ea2..ff9e638 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,9 @@ { "name": "@ccloader3/core", "private": true, + "engines": { + "node": ">=18.0.0" + }, "exports": { "./*": "./src/*.ts" }, diff --git a/packages/core/src/mod.ts b/packages/core/src/mod.ts index f8cbc2b..de03f76 100644 --- a/packages/core/src/mod.ts +++ b/packages/core/src/mod.ts @@ -7,8 +7,8 @@ import { Dependency, LegacyPluginClass, LoadingStage, - Mod as ModPublic, ModID, + Mod as ModPublic, PluginClass, } from 'ultimate-crosscode-typedefs/modloader/mod'; @@ -17,7 +17,7 @@ export class Mod implements ModPublic { public readonly version: semver.SemVer | null = null; public readonly dependencies: ReadonlyMap; public readonly assetsDirectory: string; - public assets: Set = new Set(); + public assets = new Set(); public pluginClassInstance: PluginClass | null = null; public constructor( diff --git a/packages/runtime/package.json b/packages/runtime/package.json index bd02e62..b107e96 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,6 +1,9 @@ { "name": "@ccloader3/runtime", "private": true, + "engines": { + "node": ">=18.0.0" + }, "exports": { "./*": "./src/*.ts" }, diff --git a/packages/runtime/tsconfig.json b/packages/runtime/tsconfig.json index b651b60..3e14f2b 100644 --- a/packages/runtime/tsconfig.json +++ b/packages/runtime/tsconfig.json @@ -3,8 +3,5 @@ "include": [ "src", "node_modules/ultimate-crosscode-typedefs/crosscode-ccloader-all.d.ts" - ], - "compilerOptions": { - "moduleResolution": "node" - } + ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f532d04..553cdea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,11 +31,11 @@ importers: specifier: 6.2.x || 6.3.x version: 6.2.7 '@typescript-eslint/eslint-plugin': - specifier: ^5.2.0 - version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.56.0)(typescript@4.8.4) + specifier: ^6.20.0 + version: 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@4.8.4) '@typescript-eslint/parser': - specifier: ^5.2.0 - version: 5.62.0(eslint@8.56.0)(typescript@4.8.4) + specifier: ^6.20.0 + version: 6.20.0(eslint@8.56.0)(typescript@4.8.4) archiver: specifier: ^5.3.1 version: 5.3.2 @@ -46,7 +46,7 @@ importers: specifier: ^0.1.0 version: 0.1.0 eslint: - specifier: ^8.1.0 + specifier: ^8.56.0 version: 8.56.0 eslint-config-dmitmel: specifier: dmitmel/eslint-config-dmitmel @@ -413,47 +413,49 @@ packages: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.56.0)(typescript@4.8.4): - resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/eslint-plugin@6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@4.8.4): + resolution: {integrity: sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 5.62.0(eslint@8.56.0)(typescript@4.8.4) - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.56.0)(typescript@4.8.4) - '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/type-utils': 6.20.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/visitor-keys': 6.20.0 debug: 4.3.4 eslint: 8.56.0 graphemer: 1.4.0 ignore: 5.3.0 - natural-compare-lite: 1.4.0 + natural-compare: 1.4.0 semver: 7.5.4 - tsutils: 3.21.0(typescript@4.8.4) + ts-api-utils: 1.0.3(typescript@4.8.4) typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.62.0(eslint@8.56.0)(typescript@4.8.4): - resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/parser@6.20.0(eslint@8.56.0)(typescript@4.8.4): + resolution: {integrity: sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.8.4) + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/typescript-estree': 6.20.0(typescript@4.8.4) + '@typescript-eslint/visitor-keys': 6.20.0 debug: 4.3.4 eslint: 8.56.0 typescript: 4.8.4 @@ -461,85 +463,85 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@5.62.0: - resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/scope-manager@6.20.0: + resolution: {integrity: sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/visitor-keys': 6.20.0 dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.56.0)(typescript@4.8.4): - resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/type-utils@6.20.0(eslint@8.56.0)(typescript@4.8.4): + resolution: {integrity: sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: '*' + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.8.4) - '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 6.20.0(typescript@4.8.4) + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@4.8.4) debug: 4.3.4 eslint: 8.56.0 - tsutils: 3.21.0(typescript@4.8.4) + ts-api-utils: 1.0.3(typescript@4.8.4) typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@5.62.0: - resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/types@6.20.0: + resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==} + engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@4.8.4): - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/typescript-estree@6.20.0(typescript@4.8.4): + resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/visitor-keys': 6.20.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 + minimatch: 9.0.3 semver: 7.5.4 - tsutils: 3.21.0(typescript@4.8.4) + ts-api-utils: 1.0.3(typescript@4.8.4) typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.56.0)(typescript@4.8.4): - resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/utils@6.20.0(eslint@8.56.0)(typescript@4.8.4): + resolution: {integrity: sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.8.4) + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/typescript-estree': 6.20.0(typescript@4.8.4) eslint: 8.56.0 - eslint-scope: 5.1.1 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@5.62.0: - resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/visitor-keys@6.20.0: + resolution: {integrity: sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/types': 6.20.0 eslint-visitor-keys: 3.4.3 dev: true @@ -853,14 +855,6 @@ packages: semver: 6.3.0 dev: true - /eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: true - /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -956,11 +950,6 @@ packages: estraverse: 5.3.0 dev: true - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true - /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -1301,12 +1290,15 @@ packages: brace-expansion: 2.0.1 dev: true - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 dev: true - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true /natural-compare@1.4.0: @@ -1578,17 +1570,12 @@ packages: is-number: 7.0.0 dev: true - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: true - - /tsutils@3.21.0(typescript@4.8.4): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} + /ts-api-utils@1.0.3(typescript@4.8.4): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + typescript: '>=4.2.0' dependencies: - tslib: 1.14.1 typescript: 4.8.4 dev: true diff --git a/tsconfig.json b/tsconfig.json index 9fdc691..44712d2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, - "moduleResolution": "bundler", + "moduleResolution": "nodenext", "baseUrl": "./packages/", "noEmit": true, "allowJs": true