Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: housekeeping #107

Merged
merged 7 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,28 @@
"release": "bumpp --all --commit \"release: %s\" --tag \"%s\""
},
"devDependencies": {
"@eslint-sukka/node": "^6.1.6",
"@eslint-sukka/ts": "^5.1.2",
"@eslint-sukka/node": "^6.7.0",
"@jsdevtools/ez-spawn": "^3.0.4",
"@nolyfill/internal": "workspace:*",
"@package-json/types": "^0.0.6",
"@package-json/types": "^0.0.11",
"@swc-node/register": "^1.10.9",
"@swc/core": "^1.7.0",
"@types/node": "^20.14.11",
"@swc/core": "^1.7.36",
"@types/node": "^20.16.11",
"bumpp": "^9.4.1",
"dequal": "2.0.3",
"eslint": "^9.7.0",
"eslint-config-sukka": "^6.1.6",
"eslint-formatter-sukka": "^6.1.6",
"path-scurry": "^1.11.1",
"picocolors": "^1.0.1",
"eslint": "^9.12.0",
"eslint-config-sukka": "^6.7.0",
"eslint-formatter-sukka": "^6.7.0",
"path-scurry": "^2.0.0",
"picocolors": "^1.1.0",
"rimraf": "^6.0.1",
"rollup": "^4.19.0",
"rollup": "^4.24.0",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-swc3": "^0.11.2",
"turbo": "^2.0.9",
"typescript": "^5.5.3"
"rollup-plugin-swc3": "^0.12.1",
"turbo": "^2.1.3",
"typescript": "^5.6.3"
},
"packageManager": "pnpm@9.5.0",
"packageManager": "pnpm@9.12.1",
"engines": {
"node": ">=16.8.0"
},
Expand Down Expand Up @@ -145,13 +144,13 @@
"which-typed-array": "workspace:@nolyfill/which-typed-array@*"
},
"patchedDependencies": {
"@types/[email protected]": "patches/@[email protected]",
"@npmcli/[email protected]": "patches/@[email protected]",
"[email protected]": "patches/[email protected]",
"@yarnpkg/[email protected]": "patches/@[email protected]",
"@pnpm/[email protected]": "patches/@[email protected]",
"@pnpm/[email protected]": "patches/@[email protected]",
"@pnpm/[email protected]": "patches/@[email protected]"
"@pnpm/[email protected]": "patches/@[email protected]",
"@pnpm/[email protected]": "patches/@[email protected]",
"@yarnpkg/parsers": "patches/@yarnpkg__parsers.patch",
"@npmcli/arborist": "patches/@npmcli__arborist.patch",
"@types/npmcli__arborist": "patches/@types__npmcli__arborist.patch"
}
},
"overrides": {
Expand Down
8 changes: 4 additions & 4 deletions packages/manual/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"browserify-util": "^0.12.6"
},
"devDependencies": {
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^6.0.1",
"commonjs-assert": "npm:assert@^2.1.0",
"resolve-pkg": "^2.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/manual/es-iterator-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@
"@nolyfill/shared": "workspace:*"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"ljharb-es-iterator-helpers": "npm:es-iterator-helpers@^1.0.19",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^6.0.1",
"ljharb-es-iterator-helpers": "npm:es-iterator-helpers@^1.1.0",
"resolve-pkg": "^2.0.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/manual/is-core-module/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/manual/is-core-module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
},
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"ljharb-is-core-module": "npm:is-core-module@^2.15.0",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^6.0.1",
"ljharb-is-core-module": "npm:is-core-module@^2.15.1",
"resolve-pkg": "^2.0.0"
},
"engines": {
Expand Down
22 changes: 11 additions & 11 deletions packages/tools/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@
"@napi-rs/magic-string": "^0.3.4",
"@nolyfill/internal": "workspace:*",
"@nolyfill/promise.any": "workspace:*",
"@npmcli/arborist": "^6.3.0",
"@pnpm/list": "^10.1.2",
"@pnpm/list--old": "npm:@pnpm/list@^9.1.10",
"@pnpm/workspace.find-packages": "^2.0.5",
"@rollup/plugin-commonjs": "^26.0.1",
"@npmcli/arborist": "^6.5.1",
"@pnpm/list": "^10.2.1",
"@pnpm/list--old": "npm:@pnpm/list@^9.1.12",
"@pnpm/workspace.find-packages": "^2.1.1",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-node-resolve": "^15.3.0",
"@swc-node/register": "^1.10.9",
"@swc/helpers": "^0.5.12",
"@types/npmcli__arborist": "^5.6.1",
"@swc/helpers": "^0.5.13",
"@types/npmcli__arborist": "^5.6.11",
"@types/treeverse": "^3.0.5",
"@types/yarnpkg__lockfile": "^1.1.9",
"@yarnpkg/parsers": "3.0.0",
"@yarnpkg/parsers": "3.0.2",
"commander": "^11.1.0",
"detect-indent": "^6.1.0",
"fast-npm-meta": "^0.2.2",
"package-manager-detector": "^0.1.1",
"picocolors": "^1.0.1",
"package-manager-detector": "^0.2.2",
"picocolors": "^1.1.0",
"rollup-plugin-visualizer": "^5.12.0"
},
"engines": {
Expand Down
10 changes: 5 additions & 5 deletions packages/tools/cli/src/lockfile/pnpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const buildPNPMDepTree = cache(async (dirPath: string): Promise<PackageNo
optionalDependencies: false
},
virtualStoreDirMaxLength: Infinity
})
});

const searchOld = () => searchForPackages_Old(['*'], dirPaths, {
depth: Infinity,
Expand All @@ -33,12 +33,12 @@ export const buildPNPMDepTree = cache(async (dirPath: string): Promise<PackageNo
dependencies: true,
devDependencies: true,
optionalDependencies: false
},
})
}
});

const lockfileVersion = await getPNPMLockfileVersion(dirPath)
const lockfileVersion = await getPNPMLockfileVersion(dirPath);

const result = await ((+lockfileVersion) < 6 ? searchOld() : searchNew())
const result = await ((+lockfileVersion) < 6 ? searchOld() : searchNew());

return result.flatMap((dep) => {
return [...(dep.dependencies ?? []), ...(dep.devDependencies ?? [])];
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/cli/src/lockfile/yarn.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fsp from 'fs/promises';
import path from 'path';
import { parseSyml } from '@yarnpkg/parsers';
import { parseSyml } from '@yarnpkg/parsers/lib/syml';

import type { PackageNode } from '../types';
import { cache } from '../lib/cache';
Expand Down
7 changes: 3 additions & 4 deletions packages/tools/cli/src/package-manager.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { detect } from 'package-manager-detector';
import { detect, type DetectResult } from 'package-manager-detector';

export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
type PackageManagerDetectorReturn = Awaited<ReturnType<typeof detect>>;

export function tramsformPackageManager(input: PackageManagerDetectorReturn): PackageManager {
if (input.agent == null) {
export function tramsformPackageManager(input: DetectResult | null): PackageManager {
if (input == null) {
throw new Error('Can not determine the preferred package manager');
}
return input.agent.split('@')[0] as PackageManager;
Expand Down
Loading
Loading