diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..4143046 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +hoist-pattern[]=*eslint* +hoist-pattern[]=*babel* +hoist-pattern[]=*types* diff --git a/package.json b/package.json index b10cd76..bb3dd8f 100644 --- a/package.json +++ b/package.json @@ -14,22 +14,22 @@ "scripts": { "build": "dub build --config=executable", "build.benchmark": "dub build --config=benchmark --build release-nobounds --compiler=ldc2", - "build.browser": "npm run build.wasm && parcel build --target browser ./src/browser/index.html", - "build.node": "npm run build.release && node ./src/node/build.js && npm run build.node.js", + "build.browser": "pnpm run build.wasm && parcel build --target browser ./src/browser/index.html", + "build.node": "pnpm run build.release && node ./src/node/build.js && pnpm run build.node.js", "build.node.js": "tsc -p ./src/node/tsconfig.json", - "build.profile": "pnpm build -- --build profile --compiler=ldc2 && node ./src/node/build.js && npm run build.node.js", - "build.release": "pnpm build -- --build release-nobounds --compiler=ldc2", + "build.profile": "pnpm build --build profile --compiler=ldc2 && node ./src/node/build.js && pnpm run build.node.js", + "build.release": "pnpm build --build release-nobounds --compiler=ldc2", "build.wasm": "ldc2 ./src/wasm/wasm.d ./src/native/lib.d --od ./dist --O3 --mtriple=wasm32-unknown-unknown-wasm", "clean": "shx rm -rf ./dist ./despacer/build/ ./test/fixtures/*/*-minified.json", - "format": "prettier -l --cache --write . && npm run format.d", + "format": "prettier -l --cache --write . && pnpm run format.d", "format.d": "dub run --build=release --quiet dfmt -- --soft_max_line_length 110 --indent_size 2 --inplace ./src ./benchmark", "lint": "eslint . --fix", "prepublishOnly": "shx rm -rf ./dist/tsconfig.tsbuildinfo ./dist/build.*", "start.benchmark.node": "node ./benchmark/native-benchmark.mjs", "start.browser": "servor ./dist/ --browse --reload", "start.node": "node ./dist/node/cli.js", - "start.profile": "shx rm -rf ./trace.* && npm run start.benchmark.node && profdump.exe --dot trace.log trace.dot && dot -Tsvg trace.dot -o trace.svg && ./trace.svg", - "test": "jasmine ./test/index-test.mjs", + "start.profile": "shx rm -rf ./trace.* && pnpm run start.benchmark.node && profdump.exe --dot trace.log trace.dot && dot -Tsvg trace.dot -o trace.svg && ./trace.svg", + "test": "pnpm run build.node && jasmine ./test/index-test.mjs", "test.format": "prettier -l --cache . --check", "test.lint": "eslint .", "zip": "zip -9 -j ./dist/minijson-windows-x64.zip ./dist/win32-x64/minijson.exe && zip -9 -j ./dist/minijson-macos-x64.zip ./dist/darwin-x64/minijson && zip -9 -j ./dist/minijson-linux-x64.zip ./dist/linux-x64/minijson" @@ -49,7 +49,9 @@ "prettier-config-atomic": "^4.0.0", "servor": "^4.0.2", "shx": "0.3.4", - "strip-json-comments": "^5.0.1" + "strip-json-comments": "^5.0.1", + "typescript": "^5.5.4", + "undici-types": "^6.19.8" }, "keywords": [ "json", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ecbd1f..bcbc72d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,6 +45,12 @@ importers: strip-json-comments: specifier: ^5.0.1 version: 5.0.1 + typescript: + specifier: ^5.5.4 + version: 5.5.4 + undici-types: + specifier: ^6.19.8 + version: 6.19.8 packages: @@ -1402,8 +1408,8 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-module-utils@2.9.0: - resolution: {integrity: sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ==} + eslint-module-utils@2.10.0: + resolution: {integrity: sha512-/AXiipjFyfLIUj3E4FR5NEGWoGDZHDfcGzWZkwobRc8fwqUAcy9owTk2LIKwNmtYL8Ad9/XfjSXbGHZ9AJWDEg==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -4856,7 +4862,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.9.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + eslint-module-utils@2.10.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -4929,7 +4935,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.9.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.10.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -5010,7 +5016,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 has: 1.0.4 - jsx-ast-utils: 3.3.5 + jsx-ast-utils: 2.4.1 minimatch: 3.1.2 object.entries: 1.1.8 object.fromentries: 2.0.8