@sboudrias/package 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +3 -3
- package/dist/index.js +3 -3
- package/dist/lint/command.js +1 -1
- package/dist/lint/index.d.ts +1 -1
- package/dist/lint/index.js +3 -3
- package/dist/normalize/command.js +1 -1
- package/dist/normalize/index.js +2 -2
- package/dist/peer-dependencies.js +1 -1
- package/dist/pin/command.js +1 -1
- package/dist/pin/index.js +2 -2
- package/dist/workspaces.js +1 -1
- package/package.json +4 -4
package/dist/bin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Builtins, Cli } from 'clipanion';
|
|
3
|
-
import { LintCommand } from
|
|
4
|
-
import { NormalizeCommand } from
|
|
5
|
-
import { PinCommand } from
|
|
3
|
+
import { LintCommand } from './lint/command.js';
|
|
4
|
+
import { NormalizeCommand } from './normalize/command.js';
|
|
5
|
+
import { PinCommand } from './pin/command.js';
|
|
6
6
|
const cli = Cli.from([LintCommand, NormalizeCommand, PinCommand, Builtins.HelpCommand], {
|
|
7
7
|
binaryLabel: 'Package',
|
|
8
8
|
binaryName: 'package',
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { lintPackages } from
|
|
2
|
-
export { normalizeManifests } from
|
|
3
|
-
export { pinDependencies } from
|
|
1
|
+
export { lintPackages } from './lint/index.js';
|
|
2
|
+
export { normalizeManifests } from './normalize/index.js';
|
|
3
|
+
export { pinDependencies } from './pin/index.js';
|
package/dist/lint/command.js
CHANGED
package/dist/lint/index.d.ts
CHANGED
package/dist/lint/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { subset, validRange } from 'semver';
|
|
3
|
-
import { applyPeerDependencyHoists, getPeerDependencyHoists, } from
|
|
4
|
-
import { resolveDependencyPackageJson, writePackageJsonFile } from
|
|
5
|
-
import { readWorkspaceProject } from
|
|
3
|
+
import { applyPeerDependencyHoists, getPeerDependencyHoists, } from '../peer-dependencies.js';
|
|
4
|
+
import { resolveDependencyPackageJson, writePackageJsonFile } from '../package-json.js';
|
|
5
|
+
import { readWorkspaceProject } from '../workspaces.js';
|
|
6
6
|
function nodeEngine(pkg) {
|
|
7
7
|
const node = pkg.engines?.['node'];
|
|
8
8
|
return typeof node === 'string' ? node : undefined;
|
package/dist/normalize/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { writePackageJsonFile } from
|
|
3
|
-
import { readWorkspaceProject } from
|
|
2
|
+
import { writePackageJsonFile } from '../package-json.js';
|
|
3
|
+
import { readWorkspaceProject } from '../workspaces.js';
|
|
4
4
|
/**
|
|
5
5
|
* Removes dev dependencies declared with the `workspace:*` protocol. Those
|
|
6
6
|
* specs only resolve inside the workspace and are invalid once the package is
|
package/dist/pin/command.js
CHANGED
package/dist/pin/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { valid as validVersion } from 'semver';
|
|
3
|
-
import { writePackageJsonFile } from
|
|
4
|
-
import { readWorkspaceProject } from
|
|
3
|
+
import { writePackageJsonFile } from '../package-json.js';
|
|
4
|
+
import { readWorkspaceProject } from '../workspaces.js';
|
|
5
5
|
const DEPENDENCY_FIELDS = ['dependencies', 'optionalDependencies'];
|
|
6
6
|
/**
|
|
7
7
|
* Rewrites semver ranges (`^1.2.3`, `~1.2.3`) of the given dependencies to
|
package/dist/workspaces.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { globby } from 'globby';
|
|
4
4
|
import { parse as parseYaml } from 'yaml';
|
|
5
|
-
import { readPackageJsonFile } from
|
|
5
|
+
import { readPackageJsonFile } from './package-json.js';
|
|
6
6
|
function errorCode(error) {
|
|
7
7
|
return error && typeof error === 'object' && 'code' in error
|
|
8
8
|
? String(error.code)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sboudrias/package",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cli",
|
|
6
6
|
"lint",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"workspace",
|
|
13
13
|
"yarn"
|
|
14
14
|
],
|
|
15
|
-
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/
|
|
15
|
+
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/HEAD/tools/package/README.md",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"author": "Simon Boudrias <admin@simonboudrias.com>",
|
|
18
18
|
"repository": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/node": "^26.1.1",
|
|
52
52
|
"@types/semver": "^7.7.1",
|
|
53
53
|
"type-fest": "^5.5.0",
|
|
54
|
-
"typescript": "^
|
|
54
|
+
"typescript": "^7.0.2",
|
|
55
55
|
"vite": "^8.3.0",
|
|
56
56
|
"vitest": "^5.0.0"
|
|
57
57
|
},
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
},
|
|
61
61
|
"main": "./dist/index.js",
|
|
62
62
|
"types": "./dist/index.d.ts",
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "672b77f0486388d7f5c35487d89a5ff63f4c54dd"
|
|
64
64
|
}
|