ember-try 3.0.0-beta.1 → 3.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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
## v3.0.0 (2023-08-16)
|
|
6
|
+
|
|
7
|
+
#### :boom: Breaking Change
|
|
8
|
+
* [#920](https://github.com/ember-cli/ember-try/pull/920) Drop Node.js 14 support ([@SergeAstapov](https://github.com/SergeAstapov))
|
|
9
|
+
|
|
10
|
+
#### :rocket: Enhancement
|
|
11
|
+
* [#960](https://github.com/ember-cli/ember-try/pull/960) Use pnpm's --no-lockfile ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
12
|
+
* [#956](https://github.com/ember-cli/ember-try/pull/956) Remove warning about pnpm ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
13
|
+
* [#850](https://github.com/ember-cli/ember-try/pull/850) Add support for npm overrides ([@mansona](https://github.com/mansona))
|
|
14
|
+
|
|
15
|
+
#### :memo: Documentation
|
|
16
|
+
* [#957](https://github.com/ember-cli/ember-try/pull/957) Document pnpm options and behavior ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
17
|
+
|
|
18
|
+
#### :house: Internal
|
|
19
|
+
* [#934](https://github.com/ember-cli/ember-try/pull/934) Update github CI yaml ([@mansona](https://github.com/mansona))
|
|
20
|
+
* [#933](https://github.com/ember-cli/ember-try/pull/933) Update smoke test to fix CI ([@mansona](https://github.com/mansona))
|
|
21
|
+
* [#893](https://github.com/ember-cli/ember-try/pull/893) update smoke-test-app to fix CI ([@mansona](https://github.com/mansona))
|
|
22
|
+
|
|
23
|
+
#### Committers: 3
|
|
24
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
25
|
+
- Sergey Astapov ([@SergeAstapov](https://github.com/SergeAstapov))
|
|
26
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
27
|
+
|
|
4
28
|
## v3.0.0-beta.1 (2023-03-01)
|
|
5
29
|
|
|
6
30
|
#### :boom: Breaking Change
|
package/README.md
CHANGED
|
@@ -120,6 +120,11 @@ module.exports = async function() {
|
|
|
120
120
|
dependencies will be restored to their prior state.
|
|
121
121
|
*/
|
|
122
122
|
useYarn: true,
|
|
123
|
+
/*
|
|
124
|
+
If set to true, all npm scenarios will use `pnpm` for install with the `--no-lockfile` options. At cleanup, your
|
|
125
|
+
dependencies will be restored to their prior state.
|
|
126
|
+
*/
|
|
127
|
+
usePnpm: true,
|
|
123
128
|
|
|
124
129
|
/*
|
|
125
130
|
buildManagerOptions allows you to opt-out of the default options such as `--ignore-engines --no-lockfile`.
|
|
@@ -143,6 +148,14 @@ module.exports = async function() {
|
|
|
143
148
|
devDependencies: {
|
|
144
149
|
'ember-source': '2.11.0'
|
|
145
150
|
},
|
|
151
|
+
/*
|
|
152
|
+
You can optionally define npm or pnpm overrides to enforce a specific dependency version
|
|
153
|
+
to be installed. This is useful if other libraries you depend on include different
|
|
154
|
+
versions of a package. This does nothing if `useYarn` is true;
|
|
155
|
+
*/
|
|
156
|
+
overrides: {
|
|
157
|
+
'lodash': '5.0.0'
|
|
158
|
+
}
|
|
146
159
|
/*
|
|
147
160
|
When `useYarn` is true, you can optionally define yarn resolutions to enforce a
|
|
148
161
|
specific dependency version to be installed. This is useful if other libraries
|
|
@@ -198,9 +211,14 @@ The `name` can be used to try just one scenario using the `ember try:one` comman
|
|
|
198
211
|
|
|
199
212
|
If you include `useYarn: true` 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.
|
|
200
213
|
|
|
214
|
+
##### Pnpm
|
|
215
|
+
|
|
216
|
+
If you include `usePnpm: true` 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.
|
|
217
|
+
|
|
218
|
+
|
|
201
219
|
##### A note on npm scenarios with lockfiles
|
|
202
220
|
|
|
203
|
-
Lockfiles are ignored by `ember-try`. (`yarn` will run with `--no-lockfile` and `npm` will be run with `--no-shrinkwrap`).
|
|
221
|
+
Lockfiles are ignored by `ember-try`. (`yarn` will run with `--no-lockfile` and `npm` will be run with `--no-shrinkwrap` and `pnpm` will be run with `--no-lockfile`).
|
|
204
222
|
When testing various scenarios, it's important to "float" dependencies so that the scenarios are run with the latest satisfying versions of dependencies a user of the project would get.
|
|
205
223
|
|
|
206
224
|
##### Workspaces
|
|
@@ -8,6 +8,7 @@ const path = require('path');
|
|
|
8
8
|
const debug = require('debug')('ember-try:dependency-manager-adapter:npm');
|
|
9
9
|
const rimraf = util.promisify(require('rimraf'));
|
|
10
10
|
const chalk = require('chalk');
|
|
11
|
+
const semver = require('semver');
|
|
11
12
|
|
|
12
13
|
module.exports = CoreObject.extend({
|
|
13
14
|
init() {
|
|
@@ -178,6 +179,8 @@ module.exports = CoreObject.extend({
|
|
|
178
179
|
|
|
179
180
|
if (this.useYarnCommand) {
|
|
180
181
|
this._overridePackageJSONDependencies(packageJSON, depSet, 'resolutions');
|
|
182
|
+
} else {
|
|
183
|
+
this._overridePackageJSONDependencies(packageJSON, depSet, 'overrides');
|
|
181
184
|
}
|
|
182
185
|
|
|
183
186
|
return packageJSON;
|
|
@@ -200,6 +203,18 @@ module.exports = CoreObject.extend({
|
|
|
200
203
|
delete packageJSON[kindOfDependency][packageName];
|
|
201
204
|
} else {
|
|
202
205
|
packageJSON[kindOfDependency][packageName] = version;
|
|
206
|
+
|
|
207
|
+
// in npm we need to always add an override if the version is a pre-release
|
|
208
|
+
if (
|
|
209
|
+
!this.useYarnCommand &&
|
|
210
|
+
(semver.prerelease(version) || /^https*:\/\/.*\.tg*z/.test(version))
|
|
211
|
+
) {
|
|
212
|
+
if (!packageJSON.overrides) {
|
|
213
|
+
packageJSON.overrides = {};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
packageJSON.overrides[packageName] = `$${packageName}`;
|
|
217
|
+
}
|
|
203
218
|
}
|
|
204
219
|
});
|
|
205
220
|
},
|
|
@@ -97,8 +97,10 @@ module.exports = CoreObject.extend({
|
|
|
97
97
|
if (!Array.isArray(mgrOptions)) {
|
|
98
98
|
throw new Error('buildManagerOptions must return an array of options');
|
|
99
99
|
}
|
|
100
|
-
} else
|
|
101
|
-
mgrOptions.
|
|
100
|
+
} else {
|
|
101
|
+
if (!mgrOptions.includes('--no-lockfile')) {
|
|
102
|
+
mgrOptions.push('--no-lockfile');
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
// Note: We are explicitly *not* using `--no-lockfile` here, so that we
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-try",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.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",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"fs-extra": "^6.0.1",
|
|
39
39
|
"resolve": "^1.20.0",
|
|
40
40
|
"rimraf": "^3.0.2",
|
|
41
|
+
"semver": "^7.5.4",
|
|
41
42
|
"walk-sync": "^2.2.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
@@ -60,11 +61,10 @@
|
|
|
60
61
|
"tmp-sync": "^1.1.0"
|
|
61
62
|
},
|
|
62
63
|
"engines": {
|
|
63
|
-
"node": "
|
|
64
|
+
"node": "16.* || >= 18.*"
|
|
64
65
|
},
|
|
65
66
|
"publishConfig": {
|
|
66
|
-
"registry": "https://registry.npmjs.org"
|
|
67
|
-
"tag": "beta"
|
|
67
|
+
"registry": "https://registry.npmjs.org"
|
|
68
68
|
},
|
|
69
69
|
"ember-addon": {
|
|
70
70
|
"configPath": "tests/dummy/config"
|