@storm-software/pnpm-tools 0.1.0

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.
Files changed (39) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +343 -0
  3. package/dist/bin/storm-pnpm.cjs +190 -0
  4. package/dist/bin/storm-pnpm.js +201 -0
  5. package/dist/chunk-37NNBVUD.js +1 -0
  6. package/dist/chunk-A7CA5CJR.cjs +1 -0
  7. package/dist/chunk-E5PO4ZUE.js +4 -0
  8. package/dist/chunk-GGNOJ77I.js +0 -0
  9. package/dist/chunk-GV6YH6UO.js +0 -0
  10. package/dist/chunk-MIMRANFI.cjs +1 -0
  11. package/dist/chunk-OOW4ISC7.js +1 -0
  12. package/dist/chunk-PTW7Z2XZ.cjs +4 -0
  13. package/dist/chunk-QNTSKZUU.cjs +1 -0
  14. package/dist/chunk-SFZRYJZ2.cjs +1 -0
  15. package/dist/helpers/catalog.cjs +1 -0
  16. package/dist/helpers/catalog.d.cts +46 -0
  17. package/dist/helpers/catalog.d.ts +46 -0
  18. package/dist/helpers/catalog.js +1 -0
  19. package/dist/helpers/index.cjs +1 -0
  20. package/dist/helpers/index.d.cts +4 -0
  21. package/dist/helpers/index.d.ts +4 -0
  22. package/dist/helpers/index.js +1 -0
  23. package/dist/helpers/pnpm-workspace.cjs +1 -0
  24. package/dist/helpers/pnpm-workspace.d.cts +28 -0
  25. package/dist/helpers/pnpm-workspace.d.ts +28 -0
  26. package/dist/helpers/pnpm-workspace.js +1 -0
  27. package/dist/helpers/replace-deps-aliases.cjs +1 -0
  28. package/dist/helpers/replace-deps-aliases.d.cts +11 -0
  29. package/dist/helpers/replace-deps-aliases.d.ts +11 -0
  30. package/dist/helpers/replace-deps-aliases.js +1 -0
  31. package/dist/index.cjs +1 -0
  32. package/dist/index.d.cts +4 -0
  33. package/dist/index.d.ts +4 -0
  34. package/dist/index.js +1 -0
  35. package/dist/types.cjs +1 -0
  36. package/dist/types.d.cts +63 -0
  37. package/dist/types.d.ts +63 -0
  38. package/dist/types.js +1 -0
  39. package/package.json +110 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Update package.json dependencies currently using `catalog:` or `workspace:*` to use the pnpm catalog dependencies actual versions and the local workspace versions respectively.
3
+ *
4
+ * @param packageRoot - The root directory of the package to update. Defaults to the current working directory.
5
+ * @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(packageRoot)`.
6
+ * @returns A promise that resolves when the package.json file has been updated.
7
+ * @throws Will throw an error if no package.json file is found in the package root, or if a dependency is marked as `catalog:` but no catalog exists.
8
+ */
9
+ declare function replaceDepsAliases(packageRoot?: string, workspaceRoot?: string): Promise<any>;
10
+
11
+ export { replaceDepsAliases };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Update package.json dependencies currently using `catalog:` or `workspace:*` to use the pnpm catalog dependencies actual versions and the local workspace versions respectively.
3
+ *
4
+ * @param packageRoot - The root directory of the package to update. Defaults to the current working directory.
5
+ * @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(packageRoot)`.
6
+ * @returns A promise that resolves when the package.json file has been updated.
7
+ * @throws Will throw an error if no package.json file is found in the package root, or if a dependency is marked as `catalog:` but no catalog exists.
8
+ */
9
+ declare function replaceDepsAliases(packageRoot?: string, workspaceRoot?: string): Promise<any>;
10
+
11
+ export { replaceDepsAliases };
@@ -0,0 +1 @@
1
+ export{a as replaceDepsAliases}from'../chunk-OOW4ISC7.js';import'../chunk-37NNBVUD.js';import'../chunk-E5PO4ZUE.js';
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ 'use strict';require('./chunk-SFZRYJZ2.cjs'),require('./chunk-QNTSKZUU.cjs');var chunkMIMRANFI_cjs=require('./chunk-MIMRANFI.cjs'),chunkA7CA5CJR_cjs=require('./chunk-A7CA5CJR.cjs'),chunkPTW7Z2XZ_cjs=require('./chunk-PTW7Z2XZ.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkMIMRANFI_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkA7CA5CJR_cjs.a}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkA7CA5CJR_cjs.b}});Object.defineProperty(exports,"upgradeCatalogPackage",{enumerable:true,get:function(){return chunkA7CA5CJR_cjs.c}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkPTW7Z2XZ_cjs.c}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkPTW7Z2XZ_cjs.d}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkPTW7Z2XZ_cjs.e}});
@@ -0,0 +1,4 @@
1
+ export { UpgradeCatalogPackageOptions, getCatalog, setCatalog, upgradeCatalogPackage } from './helpers/catalog.cjs';
2
+ export { getPnpmWorkspaceFilePath, readPnpmWorkspaceFile, writePnpmWorkspaceFile } from './helpers/pnpm-workspace.cjs';
3
+ export { replaceDepsAliases } from './helpers/replace-deps-aliases.cjs';
4
+ export { PnpmWorkspaceFile } from './types.cjs';
@@ -0,0 +1,4 @@
1
+ export { UpgradeCatalogPackageOptions, getCatalog, setCatalog, upgradeCatalogPackage } from './helpers/catalog.js';
2
+ export { getPnpmWorkspaceFilePath, readPnpmWorkspaceFile, writePnpmWorkspaceFile } from './helpers/pnpm-workspace.js';
3
+ export { replaceDepsAliases } from './helpers/replace-deps-aliases.js';
4
+ export { PnpmWorkspaceFile } from './types.js';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-OOW4ISC7.js';export{a as getCatalog,b as setCatalog,c as upgradeCatalogPackage}from'./chunk-37NNBVUD.js';export{c as getPnpmWorkspaceFilePath,d as readPnpmWorkspaceFile,e as writePnpmWorkspaceFile}from'./chunk-E5PO4ZUE.js';
package/dist/types.cjs ADDED
@@ -0,0 +1 @@
1
+ 'use strict';require('./chunk-SFZRYJZ2.cjs');
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Type definition for the structure of a `pnpm-workspace.yaml` file.
3
+ */
4
+ interface PnpmWorkspaceFile {
5
+ catalog?: Record<string, string>;
6
+ packages?: string[];
7
+ nohoist?: string[];
8
+ publicHoistPattern?: string[];
9
+ global?: {
10
+ storeDir?: string;
11
+ virtualStoreDir?: string;
12
+ lockfileDir?: string;
13
+ networkConcurrency?: number;
14
+ fetchRetries?: number;
15
+ fetchRetryFactor?: number;
16
+ fetchRetryMintimeout?: number;
17
+ fetchRetryMaxtimeout?: number;
18
+ };
19
+ hooks?: Record<string, string>;
20
+ ignoredPackages?: string[];
21
+ shamefullyHoist?: boolean;
22
+ useGitBranchLockfile?: boolean;
23
+ linkWorkspacePackages?: boolean;
24
+ virtualStoreDir?: string;
25
+ lockfileDir?: string;
26
+ storeDir?: string;
27
+ neverBuiltDependencies?: string[];
28
+ packageExtensions?: Record<string, Record<string, string>>;
29
+ unsafePerm?: boolean;
30
+ autoInstallPeers?: boolean;
31
+ nodeLinker?: "hoisted" | "isolated" | "pnp";
32
+ installPeers?: boolean;
33
+ sideEffectsCache?: boolean;
34
+ sideEffectsCacheReadonly?: boolean;
35
+ lockfileOnly?: boolean;
36
+ preferFrozenLockfile?: boolean;
37
+ frozenLockfile?: boolean;
38
+ verifyStoreIntegrity?: boolean;
39
+ virtualStoreDirPattern?: string;
40
+ shamefullyFlatten?: boolean;
41
+ strictPeerDependencies?: boolean;
42
+ include?: string[];
43
+ exclude?: string[];
44
+ packageImportMethod?: "hardlink" | "copy" | "clone";
45
+ importers?: Record<string, {
46
+ specifiers?: Record<string, string>;
47
+ dependencies?: Record<string, string>;
48
+ devDependencies?: Record<string, string>;
49
+ peerDependencies?: Record<string, string>;
50
+ optionalDependencies?: Record<string, string>;
51
+ packageExtensions?: Record<string, Record<string, string>>;
52
+ publishConfig?: Record<string, any>;
53
+ engines?: Record<string, string>;
54
+ os?: string[];
55
+ cpu?: string[];
56
+ scripts?: Record<string, string>;
57
+ prepare?: boolean;
58
+ buildIndex?: number;
59
+ linkWorkspacePackages?: boolean;
60
+ }>;
61
+ }
62
+
63
+ export type { PnpmWorkspaceFile };
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Type definition for the structure of a `pnpm-workspace.yaml` file.
3
+ */
4
+ interface PnpmWorkspaceFile {
5
+ catalog?: Record<string, string>;
6
+ packages?: string[];
7
+ nohoist?: string[];
8
+ publicHoistPattern?: string[];
9
+ global?: {
10
+ storeDir?: string;
11
+ virtualStoreDir?: string;
12
+ lockfileDir?: string;
13
+ networkConcurrency?: number;
14
+ fetchRetries?: number;
15
+ fetchRetryFactor?: number;
16
+ fetchRetryMintimeout?: number;
17
+ fetchRetryMaxtimeout?: number;
18
+ };
19
+ hooks?: Record<string, string>;
20
+ ignoredPackages?: string[];
21
+ shamefullyHoist?: boolean;
22
+ useGitBranchLockfile?: boolean;
23
+ linkWorkspacePackages?: boolean;
24
+ virtualStoreDir?: string;
25
+ lockfileDir?: string;
26
+ storeDir?: string;
27
+ neverBuiltDependencies?: string[];
28
+ packageExtensions?: Record<string, Record<string, string>>;
29
+ unsafePerm?: boolean;
30
+ autoInstallPeers?: boolean;
31
+ nodeLinker?: "hoisted" | "isolated" | "pnp";
32
+ installPeers?: boolean;
33
+ sideEffectsCache?: boolean;
34
+ sideEffectsCacheReadonly?: boolean;
35
+ lockfileOnly?: boolean;
36
+ preferFrozenLockfile?: boolean;
37
+ frozenLockfile?: boolean;
38
+ verifyStoreIntegrity?: boolean;
39
+ virtualStoreDirPattern?: string;
40
+ shamefullyFlatten?: boolean;
41
+ strictPeerDependencies?: boolean;
42
+ include?: string[];
43
+ exclude?: string[];
44
+ packageImportMethod?: "hardlink" | "copy" | "clone";
45
+ importers?: Record<string, {
46
+ specifiers?: Record<string, string>;
47
+ dependencies?: Record<string, string>;
48
+ devDependencies?: Record<string, string>;
49
+ peerDependencies?: Record<string, string>;
50
+ optionalDependencies?: Record<string, string>;
51
+ packageExtensions?: Record<string, Record<string, string>>;
52
+ publishConfig?: Record<string, any>;
53
+ engines?: Record<string, string>;
54
+ os?: string[];
55
+ cpu?: string[];
56
+ scripts?: Record<string, string>;
57
+ prepare?: boolean;
58
+ buildIndex?: number;
59
+ linkWorkspacePackages?: boolean;
60
+ }>;
61
+ }
62
+
63
+ export type { PnpmWorkspaceFile };
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ import'./chunk-GGNOJ77I.js';
package/package.json ADDED
@@ -0,0 +1,110 @@
1
+ {
2
+ "name": "@storm-software/pnpm-tools",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.",
6
+ "repository": {
7
+ "type": "github",
8
+ "url": "https://github.com/storm-software/storm-ops",
9
+ "directory": "packages/pnpm-tools"
10
+ },
11
+ "private": false,
12
+ "bin": {
13
+ "storm-pnpm": "./bin/storm-pnpm.js",
14
+ "storm-pnpm-cjs": "./bin/storm-pnpm.cjs",
15
+ "storm-pnpm-esm": "./bin/storm-pnpm.js"
16
+ },
17
+ "main": "./dist/index.cjs",
18
+ "module": "./dist/index.js",
19
+ "exports": {
20
+ "./package.json": "./package.json",
21
+ "./index": {
22
+ "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
23
+ "require": {
24
+ "types": "./dist/index.d.cts",
25
+ "default": "./dist/index.cjs"
26
+ },
27
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
28
+ },
29
+ ".": {
30
+ "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
31
+ "require": {
32
+ "types": "./dist/index.d.cts",
33
+ "default": "./dist/index.cjs"
34
+ },
35
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
36
+ },
37
+ "./types": {
38
+ "import": { "types": "./dist/types.d.ts", "default": "./dist/types.js" },
39
+ "require": {
40
+ "types": "./dist/types.d.cts",
41
+ "default": "./dist/types.cjs"
42
+ },
43
+ "default": { "types": "./dist/types.d.ts", "default": "./dist/types.js" }
44
+ },
45
+ "./plugins/*": {
46
+ "import": {
47
+ "types": "./dist/plugins/*.d.ts",
48
+ "default": "./dist/plugins/*.js"
49
+ },
50
+ "require": {
51
+ "types": "./dist/plugins/*.d.cts",
52
+ "default": "./dist/plugins/*.cjs"
53
+ },
54
+ "default": {
55
+ "types": "./dist/plugins/*.d.ts",
56
+ "default": "./dist/plugins/*.js"
57
+ }
58
+ },
59
+ "./helpers": {
60
+ "import": {
61
+ "types": "./dist/helpers/index.d.ts",
62
+ "default": "./dist/helpers/index.js"
63
+ },
64
+ "require": {
65
+ "types": "./dist/helpers/index.d.cts",
66
+ "default": "./dist/helpers/index.cjs"
67
+ },
68
+ "default": {
69
+ "types": "./dist/helpers/index.d.ts",
70
+ "default": "./dist/helpers/index.js"
71
+ }
72
+ },
73
+ "./helpers/*": {
74
+ "import": {
75
+ "types": "./dist/helpers/*.d.ts",
76
+ "default": "./dist/helpers/*.js"
77
+ },
78
+ "require": {
79
+ "types": "./dist/helpers/*.d.cts",
80
+ "default": "./dist/helpers/*.cjs"
81
+ },
82
+ "default": {
83
+ "types": "./dist/helpers/*.d.ts",
84
+ "default": "./dist/helpers/*.js"
85
+ }
86
+ }
87
+ },
88
+ "types": "./dist/index.d.ts",
89
+ "dependencies": {
90
+ "@pnpm/plugin-better-defaults": "^0.2.1",
91
+ "@pnpm/plugin-esm-node-path": "^0.1.2",
92
+ "@storm-software/config": "workspace:*",
93
+ "@storm-software/config-tools": "workspace:*",
94
+ "@storm-software/npm-tools": "workspace:*",
95
+ "commander": "catalog:",
96
+ "defu": "catalog:",
97
+ "js-yaml": "catalog:",
98
+ "prettier": "catalog:",
99
+ "prettier-plugin-pkg": "^0.18.1",
100
+ "semver": "7.6.2"
101
+ },
102
+ "devDependencies": {
103
+ "@pnpm/types": "^1000.8.0",
104
+ "@types/js-yaml": "catalog:",
105
+ "@types/node": "catalog:",
106
+ "tsup": "catalog:"
107
+ },
108
+ "publishConfig": { "access": "public" },
109
+ "gitHead": "512d1169996114a42d66c6fbbcd38bb04b5fc695"
110
+ }