ember-try 4.0.0 → 5.0.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/.release-plan.json +4 -11
- package/CHANGELOG.md +21 -0
- package/README.md +2 -0
- package/lib/dependency-manager-adapters/pnpm.js +90 -2
- package/package.json +5 -4
package/.release-plan.json
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
"solution": {
|
|
3
3
|
"ember-try": {
|
|
4
4
|
"impact": "major",
|
|
5
|
-
"oldVersion": "
|
|
6
|
-
"newVersion": "
|
|
5
|
+
"oldVersion": "4.0.0",
|
|
6
|
+
"newVersion": "5.0.0",
|
|
7
|
+
"tagName": "latest",
|
|
7
8
|
"constraints": [
|
|
8
9
|
{
|
|
9
10
|
"impact": "major",
|
|
@@ -13,14 +14,6 @@
|
|
|
13
14
|
"impact": "minor",
|
|
14
15
|
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
15
16
|
},
|
|
16
|
-
{
|
|
17
|
-
"impact": "patch",
|
|
18
|
-
"reason": "Appears in changelog section :bug: Bug Fix"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"impact": "patch",
|
|
22
|
-
"reason": "Appears in changelog section :memo: Documentation"
|
|
23
|
-
},
|
|
24
17
|
{
|
|
25
18
|
"impact": "patch",
|
|
26
19
|
"reason": "Appears in changelog section :house: Internal"
|
|
@@ -29,5 +22,5 @@
|
|
|
29
22
|
"pkgJSONPath": "./package.json"
|
|
30
23
|
}
|
|
31
24
|
},
|
|
32
|
-
"description": "## Release (
|
|
25
|
+
"description": "## Release (2026-11-12)\n\n* ember-try 5.0.0 (major)\n\n#### :boom: Breaking Change\n* `ember-try`\n * [#1110](https://github.com/ember-cli/ember-try/pull/1110) Drop support for Node versions below 22.12 ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n\n#### :rocket: Enhancement\n* `ember-try`\n * [#1109](https://github.com/ember-cli/ember-try/pull/1109) Write pnpm overrides to pnpm-workspace.yaml on pnpm 11 and later ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n\n#### :house: Internal\n* `ember-try`\n * [#1113](https://github.com/ember-cli/ember-try/pull/1113) Update release-plan for OIDC ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#1112](https://github.com/ember-cli/ember-try/pull/1112) Make the smoke test app pass on Ember 7 ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n\n#### Committers: 2\n- @NullVoxPopuli's reduced-access machine account for AI usage ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
|
|
33
26
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Release (2026-11-12)
|
|
4
|
+
|
|
5
|
+
* ember-try 5.0.0 (major)
|
|
6
|
+
|
|
7
|
+
#### :boom: Breaking Change
|
|
8
|
+
* `ember-try`
|
|
9
|
+
* [#1110](https://github.com/ember-cli/ember-try/pull/1110) Drop support for Node versions below 22.12 ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
|
|
10
|
+
|
|
11
|
+
#### :rocket: Enhancement
|
|
12
|
+
* `ember-try`
|
|
13
|
+
* [#1109](https://github.com/ember-cli/ember-try/pull/1109) Write pnpm overrides to pnpm-workspace.yaml on pnpm 11 and later ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
|
|
14
|
+
|
|
15
|
+
#### :house: Internal
|
|
16
|
+
* `ember-try`
|
|
17
|
+
* [#1113](https://github.com/ember-cli/ember-try/pull/1113) Update release-plan for OIDC ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
18
|
+
* [#1112](https://github.com/ember-cli/ember-try/pull/1112) Make the smoke test app pass on Ember 7 ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
|
|
19
|
+
|
|
20
|
+
#### Committers: 2
|
|
21
|
+
- @NullVoxPopuli's reduced-access machine account for AI usage ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
|
|
22
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
23
|
+
|
|
3
24
|
## Release (2025-03-07)
|
|
4
25
|
|
|
5
26
|
ember-try 4.0.0 (major)
|
package/README.md
CHANGED
|
@@ -207,6 +207,8 @@ The `name` can be used to try just one scenario using the `ember try:one` comman
|
|
|
207
207
|
|
|
208
208
|
If you include `packageManager: 'yarn'` in your `ember-try` config, all npm scenarios will use `yarn` for install with the `--no-lockfile` option. At cleanup, your dependencies will be restored to their prior state.
|
|
209
209
|
|
|
210
|
+
pnpm 11 and later do not read the `pnpm` field in `package.json`. With these versions, `ember-try` writes the scenario `pnpm.overrides` to the `overrides` setting in `pnpm-workspace.yaml`, and restores that file at cleanup.
|
|
211
|
+
|
|
210
212
|
##### Pnpm
|
|
211
213
|
|
|
212
214
|
If you include `packageManager: 'pnpm'` in your `ember-try` config, all npm scenarios will use `pnpm` for install with the `--no-lockfile` options. At cleanup, your dependencies will be restored to their prior state.
|
|
@@ -1,18 +1,106 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const path = require('node:path');
|
|
3
5
|
const semver = require('semver');
|
|
6
|
+
const YAML = require('yaml');
|
|
4
7
|
const { LOCKFILE } = require('../utils/package-managers');
|
|
5
8
|
const { BaseAdapter } = require('./base');
|
|
6
9
|
|
|
10
|
+
const WORKSPACE_YAML = 'pnpm-workspace.yaml';
|
|
11
|
+
|
|
7
12
|
module.exports = class PnpmAdapter extends BaseAdapter {
|
|
8
13
|
defaultInstallOptions = ['--no-lockfile', '--ignore-scripts'];
|
|
9
14
|
lockfile = LOCKFILE.pnpm;
|
|
10
15
|
name = 'pnpm';
|
|
11
16
|
overridesKey = 'pnpm.overrides';
|
|
12
17
|
|
|
18
|
+
pnpmVersion = null;
|
|
19
|
+
workspaceOverrides = null;
|
|
20
|
+
|
|
13
21
|
async setup() {
|
|
14
22
|
await this._throwOnResolutionMode();
|
|
15
23
|
await super.setup();
|
|
24
|
+
await this.backup.addFile(WORKSPACE_YAML);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async applyDependencySet(dependencySet) {
|
|
28
|
+
await super.applyDependencySet(dependencySet);
|
|
29
|
+
|
|
30
|
+
if (this.workspaceOverrides !== null) {
|
|
31
|
+
this._writeWorkspaceOverrides(this.workspaceOverrides);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async cleanup() {
|
|
36
|
+
if (this.workspaceOverrides !== null) {
|
|
37
|
+
if (fs.existsSync(this.backup.pathForFile(WORKSPACE_YAML))) {
|
|
38
|
+
await this.backup.restoreFile(WORKSPACE_YAML);
|
|
39
|
+
} else {
|
|
40
|
+
await fs.remove(path.join(this.cwd, WORKSPACE_YAML));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
await super.cleanup();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_packageJSONForDependencySet(packageJSON, dependencySet) {
|
|
48
|
+
if (!this._readsWorkspaceSettings()) {
|
|
49
|
+
return super._packageJSONForDependencySet(packageJSON, dependencySet);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// pnpm 11 and later ignore the `pnpm` field in package.json
|
|
53
|
+
const originalPnpmField = packageJSON.pnpm;
|
|
54
|
+
|
|
55
|
+
packageJSON.pnpm = { overrides: { ...this._readWorkspaceOverrides() } };
|
|
56
|
+
|
|
57
|
+
const result = super._packageJSONForDependencySet(packageJSON, dependencySet);
|
|
58
|
+
|
|
59
|
+
this.workspaceOverrides = result.pnpm.overrides;
|
|
60
|
+
|
|
61
|
+
if (originalPnpmField === undefined) {
|
|
62
|
+
delete result.pnpm;
|
|
63
|
+
} else {
|
|
64
|
+
result.pnpm = originalPnpmField;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
_readsWorkspaceSettings() {
|
|
71
|
+
return this.pnpmVersion !== null && semver.satisfies(this.pnpmVersion, '>=11.0.0');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
_readWorkspaceDocument() {
|
|
75
|
+
const backupFile = this.backup.pathForFile(WORKSPACE_YAML);
|
|
76
|
+
|
|
77
|
+
if (fs.existsSync(backupFile)) {
|
|
78
|
+
return YAML.parseDocument(fs.readFileSync(backupFile, 'utf-8'));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return new YAML.Document({});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
_readWorkspaceOverrides() {
|
|
85
|
+
return this._readWorkspaceDocument().toJS()?.overrides ?? {};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
_writeWorkspaceOverrides(overrides) {
|
|
89
|
+
const hasOverrides = Object.keys(overrides).length > 0;
|
|
90
|
+
|
|
91
|
+
if (!hasOverrides && !fs.existsSync(this.backup.pathForFile(WORKSPACE_YAML))) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const document = this._readWorkspaceDocument();
|
|
96
|
+
|
|
97
|
+
if (!hasOverrides) {
|
|
98
|
+
document.delete('overrides');
|
|
99
|
+
} else {
|
|
100
|
+
document.set('overrides', overrides);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
fs.writeFileSync(path.join(this.cwd, WORKSPACE_YAML), document.toString());
|
|
16
104
|
}
|
|
17
105
|
|
|
18
106
|
/**
|
|
@@ -24,10 +112,10 @@ module.exports = class PnpmAdapter extends BaseAdapter {
|
|
|
24
112
|
* @returns Promise<void>
|
|
25
113
|
*/
|
|
26
114
|
async _throwOnResolutionMode() {
|
|
27
|
-
|
|
115
|
+
this.pnpmVersion = await this._getPnpmVersion();
|
|
28
116
|
let resolutionMode = await this._getResolutionMode();
|
|
29
117
|
|
|
30
|
-
if (this._isResolutionModeWrong(
|
|
118
|
+
if (this._isResolutionModeWrong(this.pnpmVersion, resolutionMode)) {
|
|
31
119
|
throw new Error(
|
|
32
120
|
'You are using an old version of pnpm that uses wrong resolution mode that violates ember-try expectations. Please either upgrade pnpm or set `resolution-mode` to `highest` in `.npmrc`.',
|
|
33
121
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-try",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "An ember-cli addon to test against multiple dependencies, such as ember and ember-data.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"rimraf": "^3.0.2",
|
|
34
34
|
"semver": "^7.6.3",
|
|
35
35
|
"temp-dir": "^2.0.0",
|
|
36
|
-
"walk-sync": "^2.2.0"
|
|
36
|
+
"walk-sync": "^2.2.0",
|
|
37
|
+
"yaml": "^2.9.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@babel/core": "^7.26.0",
|
|
@@ -49,12 +50,12 @@
|
|
|
49
50
|
"mocha": "^11.0.1",
|
|
50
51
|
"nyc": "^17.1.0",
|
|
51
52
|
"prettier": "^3.4.2",
|
|
52
|
-
"release-plan": "^0.
|
|
53
|
+
"release-plan": "^0.18.0",
|
|
53
54
|
"sinon": "^19.0.2",
|
|
54
55
|
"tmp-sync": "^1.1.0"
|
|
55
56
|
},
|
|
56
57
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
58
|
+
"node": ">= 22.12.0"
|
|
58
59
|
},
|
|
59
60
|
"publishConfig": {
|
|
60
61
|
"registry": "https://registry.npmjs.org"
|