@internetderdinge/api 1.229.17 → 1.229.22

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": "@internetderdinge/api",
3
- "version": "1.229.17",
3
+ "version": "1.229.22",
4
4
  "description": "Shared OpenIoT API modules",
5
5
  "main": "dist/src/index.js",
6
6
  "type": "module",
@@ -15,7 +15,6 @@
15
15
  "deps:versions": "node --input-type=module -e \"import { createRequire } from 'node:module'; const require = createRequire(import.meta.url); const out = (name) => { const pkgPath = require.resolve(name + '/package.json'); const version = require(pkgPath).version; console.log(name + '@' + version + ' -> ' + pkgPath); }; out('zod'); out('@asteasolutions/zod-to-openapi');\"",
16
16
  "deploy:version": "node ./scripts/release-version.mjs",
17
17
  "release:paperless": "node ./scripts/release-and-sync-paperless.mjs",
18
- "release:paperless:publish": "node ./scripts/release-and-sync-paperless.mjs --publish",
19
18
  "lint": "eslint .",
20
19
  "lint:fix": "eslint . --fix"
21
20
  },
@@ -68,25 +68,38 @@ const updateDependencyVersion = (
68
68
  }
69
69
 
70
70
  const currentRange = dependencies[dependencyName];
71
- const currentDependencyMin = semver.minVersion(currentRange);
72
- if (!currentDependencyMin) {
73
- throw new Error(
74
- `Unsupported dependency version for ${dependencyName} in ${packageJsonPath}: ${currentRange}`,
75
- );
71
+ const isLocalReference = /^(file:|link:|workspace:|portal:)/.test(
72
+ currentRange,
73
+ );
74
+ let currentDependencyVersion = null;
75
+
76
+ if (!isLocalReference) {
77
+ const currentDependencyMin = semver.minVersion(currentRange);
78
+ if (!currentDependencyMin) {
79
+ throw new Error(
80
+ `Unsupported dependency version for ${dependencyName} in ${packageJsonPath}: ${currentRange}`,
81
+ );
82
+ }
83
+ currentDependencyVersion = currentDependencyMin.version;
76
84
  }
77
- const currentDependencyVersion = currentDependencyMin.version;
78
85
 
79
- if (expectedVersion && currentDependencyVersion !== expectedVersion) {
86
+ if (
87
+ expectedVersion &&
88
+ currentDependencyVersion &&
89
+ currentDependencyVersion !== expectedVersion
90
+ ) {
80
91
  throw new Error(
81
92
  `paperlesspaper-api dependency is ${currentRange} (expected ${expectedVersion}). Update it before bumping.`,
82
93
  );
83
94
  }
84
95
 
85
- const prefix = currentRange.startsWith("^")
86
- ? "^"
87
- : currentRange.startsWith("~")
88
- ? "~"
89
- : "";
96
+ // Convert local references (e.g. file:.yalc/...) to a published semver dependency.
97
+ const prefix =
98
+ isLocalReference || currentRange.startsWith("^")
99
+ ? "^"
100
+ : currentRange.startsWith("~")
101
+ ? "~"
102
+ : "";
90
103
 
91
104
  dependencies[dependencyName] = `${prefix}${newVersion}`;
92
105
  packageJson.dependencies = dependencies;