@pronto-tools-and-more/cli 10.32.0 → 10.34.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/cli",
3
- "version": "10.32.0",
3
+ "version": "10.34.0",
4
4
  "description": "",
5
5
  "main": "src/main.js",
6
6
  "type": "module",
@@ -15,7 +15,7 @@
15
15
  "author": "",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@pronto-tools-and-more/pronto": "10.32.0"
18
+ "@pronto-tools-and-more/pronto": "10.34.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^22.10.0"
@@ -0,0 +1,10 @@
1
+ export const isOldNodeVersionError = (error) => {
2
+ if (
3
+ error &&
4
+ error instanceof TypeError &&
5
+ error.message.includes("resolve is not a function")
6
+ ) {
7
+ return true;
8
+ }
9
+ return false;
10
+ };
@@ -1,11 +1,17 @@
1
- import { fileURLToPath } from 'node:url'
1
+ import { fileURLToPath } from "node:url";
2
+ import * as IsOldNodeVersionError from "../IsOldNodeVersionError/IsOldNodeVersionError.js";
2
3
 
3
4
  export const resolveBin = (name) => {
4
5
  try {
5
- const uri = import.meta.resolve(name)
6
- const path = fileURLToPath(uri)
7
- return path
8
- } catch {
9
- return ''
6
+ const uri = import.meta.resolve(name);
7
+ const path = fileURLToPath(uri);
8
+ return path;
9
+ } catch (error) {
10
+ if (IsOldNodeVersionError.isOldNodeVersionError(error)) {
11
+ console.warn(
12
+ "[pronto] older node versions are not supported. Try using a newer version like node 22."
13
+ );
14
+ }
15
+ return "";
10
16
  }
11
- }
17
+ };