mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Since the move to ES modules and pnpm 12, packages installed from npm fail to start: - The package imports of @clusterio/lib point Node at TypeScript sources, which Node refuses to strip types from inside node_modules. - The controller, host and ctl import their package.json from next to the compiled entrypoint, a copy pnpm leaves out of the package. - ctl, host and web_ui have no .npmignore, so pnpm packs them using the repository .gitignore and leaves out nearly all of dist/. Resolve the package imports to the compiled files at runtime while keeping the sources for type checking, import package.json by package name so it resolves to the real file, and add .npmignore files so pnpm packs the same files as npm.
74 lines
1.6 KiB
JSON
74 lines
1.6 KiB
JSON
{
|
|
"name": "@clusterio/lib",
|
|
"version": "2.0.0-alpha.27",
|
|
"description": "Shared library for Clusterio",
|
|
"homepage": "https://github.com/clusterio/clusterio#readme",
|
|
"author": "Hornwitser <github@hornwitser.no>",
|
|
"license": "MIT",
|
|
|
|
"keywords": [
|
|
"clusterio",
|
|
"factorio"
|
|
],
|
|
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/clusterio/clusterio"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/clusterio/clusterio/issues"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
|
|
"type": "module",
|
|
"imports": {
|
|
"#WebSocket": {
|
|
"node": {
|
|
"types": "./src/link/WebSocket.node.ts",
|
|
"default": "./dist/node/src/link/WebSocket.node.js"
|
|
},
|
|
"import": "./src/link/WebSocket.browser.ts"
|
|
},
|
|
"#is_deep_strict_equal": {
|
|
"node": {
|
|
"types": "./src/is_deep_strict_equal.node.ts",
|
|
"default": "./dist/node/src/is_deep_strict_equal.node.js"
|
|
},
|
|
"import": "./src/is_deep_strict_equal.browser.ts"
|
|
}
|
|
},
|
|
"browser": "browser.ts",
|
|
"main": "dist/node/index.js",
|
|
"scripts": {
|
|
"prepare": "tsc --build && pnpm run compile_validator",
|
|
"compile_validator": "node scripts/compile_validator.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=22"
|
|
},
|
|
|
|
"dependencies": {
|
|
"@sinclair/typebox": "catalog:",
|
|
"ajv": "^8.20.0",
|
|
"chalk": "catalog:",
|
|
"fast-deep-equal": "^3.1.3",
|
|
"jszip": "catalog:",
|
|
"set-blocking": "catalog:",
|
|
"triple-beam": "^1.4.1",
|
|
"winston": "catalog:",
|
|
"winston-transport": "catalog:",
|
|
"ws": "catalog:",
|
|
"yargs": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "catalog:",
|
|
"@types/set-blocking": "catalog:",
|
|
"@types/triple-beam": "^1.3.5",
|
|
"@types/ws": "catalog:",
|
|
"@types/yargs": "catalog:",
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|