@dotpi/tools 2.12.1 → 2.12.3

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.
@@ -124,12 +124,12 @@ dotpi echo_info "Install Node.js"
124
124
  word_size="$(dotpi file_word_size "$(which file)" )"
125
125
  if [[ $word_size == "32" ]] ; then
126
126
  if [[ "$(uname -m)" == "armv6l" ]] ; then
127
- node_arch=armv6l
127
+ node_arch="armv6l"
128
128
  else
129
- node_arch=armv7l
129
+ node_arch="armv7l"
130
130
  fi
131
131
  else
132
- node_arch=arm64
132
+ node_arch="arm64"
133
133
  fi
134
134
 
135
135
  # install n for sudo usage
@@ -214,8 +214,8 @@ n_path_to_symlinks
214
214
  # pnpm is mandatory for node modules
215
215
  for package in "${dotpi_node_install_default[@]}" "${dotpi_node_install[@]}" ; do
216
216
  npm -g install "$package" || {
217
- error_exit $? "npm install ${package}" $error_exit_code_node
218
- }
217
+ error_exit $? "npm install ${package}" $error_exit_code_node
218
+ }
219
219
  done
220
220
 
221
221
  # update: pnpm
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/module",
3
- "version": "1.11.1",
3
+ "version": "1.11.3",
4
4
  "description": "dotpi module management",
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,7 +11,7 @@
11
11
  "@dotpi/javascript": "^1.6.3",
12
12
  "execa": "^9.5.2",
13
13
  "globby": "^14.0.2",
14
- "pnpm": "^12.18.0"
14
+ "pnpm": "^11.28.11"
15
15
  },
16
- "gitHead": "a0e9b7158609d564e8696a93f6e86c00dcfdf29e"
16
+ "gitHead": "ccbf0c420071191a5cf2a454e0d7d575ca23adf8"
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.3",
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.3",
15
15
  "commander": "^12.1.0"
16
16
  },
17
- "gitHead": "a0e9b7158609d564e8696a93f6e86c00dcfdf29e"
17
+ "gitHead": "ccbf0c420071191a5cf2a454e0d7d575ca23adf8"
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.3",
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.3",
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": "ccbf0c420071191a5cf2a454e0d7d575ca23adf8"
50
50
  }