mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Migrate the usage of CommonJS specific code and imports to ESM. Roughly summarised this: - Changes all require() calls to import statement or expressions. - Changes usage of module.exports to export statements. - Replaces require.resolve with import.meta.resolve. - Replaces conditional imports with conditional subpath imports. - Replaces module === require.main with import.meta.main. - Adds the full filename with extention to all relative imports. - Changes all usage of __dirname and __filename to their import.meta equivalents. - Sets "type": "module" in package.json files. - Removes usage of "use strict". - Adds .ts an an alias of .js for the webpack build. Due to differences in how require and import resolves files the plugin entrypoints will have to include the filename and extension after this migration in order to work.
66 lines
2.0 KiB
JSON
66 lines
2.0 KiB
JSON
{
|
|
"name": "root",
|
|
"private": true,
|
|
"files": [],
|
|
"packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tsc --build",
|
|
"watch": "tsc --build --watch",
|
|
"build-mod": "pnpm run -r build-mod --output-dir ../../dist",
|
|
"test": "pnpm run build && NODE_EXTRA_CA_CERTS=$(pwd)/test/file/tls/cert.pem mocha --enable-source-maps --check-leaks -R spec --recursive test \"plugins/*/test/**\" --exclude \"test/manual/**\"",
|
|
"silent-test": "SILENT_TEST=y pnpm test",
|
|
"fast-test": "FAST_TEST=y pnpm test",
|
|
"no-external-test": "NO_EXTERNAL_TEST=y pnpm test",
|
|
"cover": "nyc pnpm test",
|
|
"fast-cover": "FAST_TEST=y nyc pnpm test",
|
|
"ci-cover": "nyc --reporter=lcovonly pnpm run-script test",
|
|
"lint": "eslint packages plugins test",
|
|
"lint-fix": "eslint --fix packages plugins test",
|
|
"clean": "node ./clean.js",
|
|
"docs": "typedoc",
|
|
"bundle-dependencies": "bundle-dependencies"
|
|
},
|
|
"nyc": {
|
|
"exclude": [
|
|
"test/**",
|
|
"plugins/*/test/**"
|
|
]
|
|
},
|
|
"engines": {
|
|
"node": ">=22"
|
|
},
|
|
"workspaces": [
|
|
"packages/*",
|
|
"plugins/*",
|
|
"external_plugins/*",
|
|
"external_plugins/*/*"
|
|
],
|
|
"devDependencies": {
|
|
"@clusterio/controller": "workspace:^",
|
|
"@clusterio/ctl": "workspace:^",
|
|
"@clusterio/host": "workspace:^",
|
|
"@clusterio/lib": "workspace:^",
|
|
"@clusterio/web_ui": "workspace:^",
|
|
"@eslint/eslintrc": "^3.3.1",
|
|
"@eslint/js": "^9.32.0",
|
|
"@stylistic/eslint-plugin": "^5.2.2",
|
|
"@swc/core": "^1.13.3",
|
|
"@types/node": "catalog:",
|
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
"@typescript-eslint/parser": "^8.38.0",
|
|
"eslint": "^9.32.0",
|
|
"eslint-plugin-node": "^11.1.0",
|
|
"express": "^5.1.0",
|
|
"form-data": "^4.0.4",
|
|
"globals": "^16.3.0",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"jszip": "^3.10.1",
|
|
"mocha": "^11.7.1",
|
|
"nyc": "^17.1.0",
|
|
"typedoc": "^0.28.9",
|
|
"typescript": "^5.9.2",
|
|
"yargs": "^18.0.0"
|
|
}
|
|
}
|