@dotpi/tools 2.12.1 → 2.12.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/module",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "dotpi module management",
5
5
  "type": "module",
6
6
  "exports": {
@@ -13,5 +13,5 @@
13
13
  "globby": "^14.0.2",
14
14
  "pnpm": "^12.18.0"
15
15
  },
16
- "gitHead": "a0e9b7158609d564e8696a93f6e86c00dcfdf29e"
16
+ "gitHead": "8e3d88682521a27d6e8b57e16b8292421db5a749"
17
17
  }
@@ -1,4 +1,3 @@
1
- import fs from 'node:fs/promises';
2
1
  import path from 'node:path';
3
2
 
4
3
  import { $ } from 'execa';
@@ -7,9 +6,8 @@ import { symlink } from '@dotpi/javascript/filesystem.js';
7
6
  import * as echo from '@dotpi/javascript/echo.js';
8
7
 
9
8
  import { dotpiConfigurationGet } from './configuration.js';
10
- import { definitionGet } from './definition.js';
11
9
 
12
- import { createRequire } from 'node:module';
10
+ import { pnpmExecutable } from './pnpm.js';
13
11
 
14
12
  export function installCommandDefine({program}) {
15
13
  program
@@ -92,16 +90,6 @@ export async function install(modules = [], {
92
90
  path.join(dotpiModulesDestination, 'dotpi_modules')
93
91
  );
94
92
 
95
- // Resolve pnpm's package.json, then read its "bin" entry
96
- const require = createRequire(import.meta.url);
97
- const pnpmPackagePath = require.resolve('pnpm/package.json');
98
- const pnpmPackage = require(pnpmPackagePath);
99
- const pnpmExecutableRelativePath = (typeof pnpmPackage.bin === 'string'
100
- ? pnpmPackage.bin
101
- : pnpmPackage.bin.pnpm
102
- );
103
- const pnpmExecutable = path.join(path.dirname(pnpmPackagePath), pnpmExecutableRelativePath);
104
-
105
93
  // There is no prefix for pnpm install, use cwd of command
106
94
  cwd = dotpiModulesDestination;
107
95
  output = await $({
@@ -0,0 +1,16 @@
1
+ import { createRequire } from 'node:module';
2
+ import path from 'node:path';
3
+
4
+ // Resolve pnpm's package.json, then read its "bin" entry
5
+ const require = createRequire(import.meta.url);
6
+ const pnpmPackagePath = require.resolve('pnpm/package.json');
7
+ const pnpmPackage = require(pnpmPackagePath);
8
+ const pnpmExecutableRelativePath = (typeof pnpmPackage.bin === 'string'
9
+ ? pnpmPackage.bin
10
+ : pnpmPackage.bin.pnpm
11
+ );
12
+
13
+ export const pnpmExecutable = path.join(
14
+ path.dirname(pnpmPackagePath),
15
+ pnpmExecutableRelativePath,
16
+ );
@@ -9,6 +9,8 @@ import * as echo from '@dotpi/javascript/echo.js';
9
9
  import { dotpiConfigurationGet } from './configuration.js';
10
10
  import { definitionGet } from './definition.js';
11
11
 
12
+ import { pnpmExecutable } from './pnpm.js';
13
+
12
14
  export async function uninstallCommandDefine({program}) {
13
15
  program
14
16
  .command('uninstall [modules...]')
@@ -161,7 +163,7 @@ export async function uninstall(modules = [], {
161
163
  env: { FORCE_COLOR: 'true' }, // do not remove colors
162
164
  verbose: (verbose === 'full' ? 'full' : 'none'),
163
165
  })`
164
- npx pnpm
166
+ ${pnpmExecutable}
165
167
  remove
166
168
  --
167
169
  ${moduleName}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/module-module",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "dotpi module management",
5
5
  "type": "module",
6
6
  "bin": "./bin/dotpi_module",
@@ -11,8 +11,8 @@
11
11
  "license": "BSD-3-clause",
12
12
  "dependencies": {
13
13
  "@dotpi/javascript": "^1.6.3",
14
- "@dotpi/module": "^1.11.1",
14
+ "@dotpi/module": "^1.11.2",
15
15
  "commander": "^12.1.0"
16
16
  },
17
- "gitHead": "a0e9b7158609d564e8696a93f6e86c00dcfdf29e"
17
+ "gitHead": "8e3d88682521a27d6e8b57e16b8292421db5a749"
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/tools",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": "Set of scripts for managing dotpi fleets of Raspberry Pi",
5
5
  "author": "Jean-Philippe Lambert",
6
6
  "contributors": [
@@ -37,7 +37,7 @@
37
37
  "license": "BSD-3-Clause",
38
38
  "dependencies": {
39
39
  "@dotpi/javascript": "^1.6.3",
40
- "@dotpi/module": "^1.11.1",
40
+ "@dotpi/module": "^1.11.2",
41
41
  "chalk": "^5.3.0",
42
42
  "commander": "^12.1.0",
43
43
  "prompts": "^2.4.2",
@@ -46,5 +46,5 @@
46
46
  "devDependencies": {
47
47
  "lerna": "^8.2.4"
48
48
  },
49
- "gitHead": "a0e9b7158609d564e8696a93f6e86c00dcfdf29e"
49
+ "gitHead": "8e3d88682521a27d6e8b57e16b8292421db5a749"
50
50
  }