-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
498 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,17 @@ | |
}, | ||
"./*": "./*" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"three": [ | ||
"./dist/three.d.ts" | ||
], | ||
"pmndrs": [ | ||
"./dist/pmndrs.d.ts" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"*.d.ts", | ||
"dist" | ||
], | ||
"publishConfig": { | ||
|
@@ -51,7 +60,8 @@ | |
"lint:fix": "eslint . --fix", | ||
"docs:dev": "vitepress dev docs", | ||
"docs:build": "vitepress build docs", | ||
"docs:preview": "vitepress preview docs" | ||
"docs:preview": "vitepress preview docs", | ||
"test:attw": "attw --pack --ignore-rules cjs-resolves-to-esm" | ||
}, | ||
"peerDependencies": { | ||
"@tresjs/core": ">=4.0", | ||
|
@@ -63,6 +73,7 @@ | |
"postprocessing": "^6.36.4" | ||
}, | ||
"devDependencies": { | ||
"@arethetypeswrong/cli": "^0.17.2", | ||
"@release-it/conventional-changelog": "^9.0.3", | ||
"@tresjs/core": "^4.3.1", | ||
"@tresjs/eslint-config": "^1.4.0", | ||
|
@@ -77,7 +88,7 @@ | |
"rollup-plugin-analyzer": "^4.0.0", | ||
"rollup-plugin-visualizer": "^5.12.0", | ||
"three": "^0.170.0", | ||
"typescript": "^5.7.2", | ||
"typescript": "5.4.2", | ||
"unocss": "^0.64.1", | ||
"vite": "^6.0.0", | ||
"vite-plugin-banner": "^0.8.0", | ||
|
@@ -86,5 +97,10 @@ | |
"vitepress": "1.5.0", | ||
"vue": "^3.5.13", | ||
"vue-tsc": "^2.1.10" | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"@arethetypeswrong/[email protected]": "patches/@[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/dist/index.js b/dist/index.js | ||
index 0504e767daf256ff705961e1d9052763fa910f41..793dfdc0971ebb6d71e66cb0a1a2f9ab959fd335 100644 | ||
--- a/dist/index.js | ||
+++ b/dist/index.js | ||
@@ -34,7 +34,7 @@ program | ||
.description(`${chalk.bold.blue("Are the Types Wrong?")} attempts to analyze npm package contents for issues with their TypeScript types, | ||
particularly ESM-related module resolution issues.`) | ||
.argument("[file-directory-or-package-spec]", "the packed .tgz, or directory containing package.json with --pack, or package spec with --from-npm") | ||
- .option("-P, --pack", "Run `npm pack` in the specified directory and delete the resulting .tgz file afterwards") | ||
+ .option("-P, --pack", "Run `pnpm pack` in the specified directory and delete the resulting .tgz file afterwards") | ||
.option("-p, --from-npm", "Read from the npm registry instead of a local file") | ||
.addOption(new Option("--definitely-typed [version]", "Specify the version range of @types to use").default(true)) | ||
.option("--no-definitely-typed", "Don't include @types") | ||
@@ -126,11 +126,11 @@ particularly ESM-related module resolution issues.`) | ||
} | ||
if (!opts.pack) { | ||
if (!process.stdout.isTTY) { | ||
- program.error("Specifying a directory requires the --pack option to confirm that running `npm pack` is ok."); | ||
+ program.error("Specifying a directory requires the --pack option to confirm that running `pnpm pack` is ok."); | ||
} | ||
const rl = readline.createInterface(process.stdin, process.stdout); | ||
const answer = await new Promise((resolve) => { | ||
- rl.question(`Run \`npm pack\`? (Pass -P/--pack to skip) (Y/n) `, resolve); | ||
+ rl.question(`Run \`pnpm pack\`? (Pass -P/--pack to skip) (Y/n) `, resolve); | ||
}); | ||
rl.close(); | ||
if (answer.trim() && !answer.trim().toLowerCase().startsWith("y")) { | ||
@@ -141,7 +141,7 @@ particularly ESM-related module resolution issues.`) | ||
fileName = deleteTgz = path.join(fileOrDirectory, | ||
// https://github.com/npm/cli/blob/f875caa86900122819311dd77cde01c700fd1817/lib/utils/tar.js#L123-L125 | ||
`${manifest.name.replace("@", "").replace("/", "-")}-${manifest.version}.tgz`); | ||
- execSync("npm pack", { cwd: fileOrDirectory, encoding: "utf8", stdio: "ignore" }); | ||
+ execSync("pnpm pack", { cwd: fileOrDirectory, encoding: "utf8", stdio: "ignore" }); | ||
} | ||
const file = await readFile(fileName); | ||
const data = new Uint8Array(file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.