ember.nvp 1.11.0 → 1.11.1
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/.release-plan.json +6 -6
- package/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/utils/npm.js +33 -3
- package/test/ember.nvp/npm.test.ts +29 -0
package/.release-plan.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"solution": {
|
|
3
3
|
"ember.nvp": {
|
|
4
|
-
"impact": "
|
|
5
|
-
"oldVersion": "1.
|
|
6
|
-
"newVersion": "1.11.
|
|
4
|
+
"impact": "patch",
|
|
5
|
+
"oldVersion": "1.11.0",
|
|
6
|
+
"newVersion": "1.11.1",
|
|
7
7
|
"tagName": "latest",
|
|
8
8
|
"constraints": [
|
|
9
9
|
{
|
|
10
|
-
"impact": "
|
|
11
|
-
"reason": "Appears in changelog section :
|
|
10
|
+
"impact": "patch",
|
|
11
|
+
"reason": "Appears in changelog section :bug: Bug Fix"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"pkgJSONPath": "./package.json"
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"oldVersion": "1.2.0"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
"description": "## Release (2026-09-30)\n\n* ember.nvp 1.11.
|
|
26
|
+
"description": "## Release (2026-09-30)\n\n* ember.nvp 1.11.1 (patch)\n\n#### :bug: Bug Fix\n* `ember.nvp`\n * [#148](https://github.com/NullVoxPopuli/ember.nvp/pull/148) Keep update runs working for deprecated and non-registry deps ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n\n#### Committers: 1\n- @NullVoxPopuli's reduced-access machine account for AI usage ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n"
|
|
27
27
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## Release (2026-09-30)
|
|
4
4
|
|
|
5
|
+
* ember.nvp 1.11.1 (patch)
|
|
6
|
+
|
|
7
|
+
#### :bug: Bug Fix
|
|
8
|
+
* `ember.nvp`
|
|
9
|
+
* [#148](https://github.com/NullVoxPopuli/ember.nvp/pull/148) Keep update runs working for deprecated and non-registry deps ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
|
|
10
|
+
|
|
11
|
+
#### Committers: 1
|
|
12
|
+
- @NullVoxPopuli's reduced-access machine account for AI usage ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
|
|
13
|
+
|
|
14
|
+
## Release (2026-09-30)
|
|
15
|
+
|
|
5
16
|
* ember.nvp 1.11.0 (minor)
|
|
6
17
|
|
|
7
18
|
#### :rocket: Enhancement
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember.nvp",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "ember project generator, alternative to the official blueprints, but more modern -- hopefully one day to upstream back in to ember-cli / official blueprints",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/src/utils/npm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import latestVersion from "latest-version";
|
|
1
|
+
import latestVersion, { VersionNotFoundError } from "latest-version";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
|
|
@@ -56,12 +56,12 @@ export async function getLatest(deps) {
|
|
|
56
56
|
version =
|
|
57
57
|
"link:" + resolve(join(import.meta.dirname, "../../packages", LOCAL_PACKAGES[dep]));
|
|
58
58
|
} else if (alias) {
|
|
59
|
-
version = `npm:${alias.name}@${await
|
|
59
|
+
version = `npm:${alias.name}@${await resolveVersion(alias.name, alias.range)}`;
|
|
60
60
|
} else {
|
|
61
61
|
if (range == "workspace:*") {
|
|
62
62
|
range = "latest";
|
|
63
63
|
}
|
|
64
|
-
version = await
|
|
64
|
+
version = isFromRegistry(range) ? await resolveVersion(dep, range) : range;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
CACHE[dep] ||= {};
|
|
@@ -74,6 +74,36 @@ export async function getLatest(deps) {
|
|
|
74
74
|
return Object.fromEntries(results);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* git, file, link, url, and catalog specs have no registry version to bump to.
|
|
79
|
+
*
|
|
80
|
+
* Semver ranges and dist-tags never contain `:` or `/`.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} range
|
|
83
|
+
*/
|
|
84
|
+
function isFromRegistry(range) {
|
|
85
|
+
return !/[:/]/.test(range);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Deprecated versions are skipped when the range allows another version.
|
|
90
|
+
*
|
|
91
|
+
* A package can deprecate a whole major (ESLint 9, once 10 was out).
|
|
92
|
+
* An existing project can still ask for that range.
|
|
93
|
+
*
|
|
94
|
+
* @param {string} name
|
|
95
|
+
* @param {string} range
|
|
96
|
+
*/
|
|
97
|
+
async function resolveVersion(name, range) {
|
|
98
|
+
try {
|
|
99
|
+
return await latestVersion(name, { version: range });
|
|
100
|
+
} catch (error) {
|
|
101
|
+
if (!(error instanceof VersionNotFoundError)) throw error;
|
|
102
|
+
|
|
103
|
+
return await latestVersion(name, { version: range, omitDeprecated: false });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
77
107
|
/**
|
|
78
108
|
* An npm alias installs a package under another name:
|
|
79
109
|
*
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { getLatest } from "#utils/npm.js";
|
|
3
|
+
|
|
4
|
+
describe("getLatest", () => {
|
|
5
|
+
it("resolves a range where every version is deprecated", async () => {
|
|
6
|
+
// ESLint deprecated all of 9.x once 10 was out
|
|
7
|
+
const { eslint } = await getLatest({ eslint: "^9.39.2" });
|
|
8
|
+
|
|
9
|
+
expect(eslint).toMatch(/^9\.39\.\d+$/);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("still prefers versions that are not deprecated", async () => {
|
|
13
|
+
const { eslint } = await getLatest({ eslint: "^10.0.0" });
|
|
14
|
+
|
|
15
|
+
expect(eslint).toMatch(/^10\.\d+\.\d+$/);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("keeps specs that do not come from the registry", async () => {
|
|
19
|
+
const specs = {
|
|
20
|
+
"@embroider/try": "github:NullVoxPopuli/try#768631a",
|
|
21
|
+
"my-local": "file:../my-local",
|
|
22
|
+
"my-linked": "link:../my-linked",
|
|
23
|
+
"my-tarball": "https://example.com/my-tarball.tgz",
|
|
24
|
+
"my-catalog": "catalog:",
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
expect(await getLatest(specs)).toEqual(specs);
|
|
28
|
+
});
|
|
29
|
+
});
|