ember-try 2.0.0 → 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,5 +1,50 @@
1
1
  # Changelog
2
2
 
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
+
28
+ ## v3.0.0-beta.1 (2023-03-01)
29
+
30
+ #### :boom: Breaking Change
31
+ * [#913](https://github.com/ember-cli/ember-try/pull/913) Bump node to supported versions ([@hjdivad](https://github.com/hjdivad))
32
+
33
+ #### :bug: Bug Fix
34
+ * [#912](https://github.com/ember-cli/ember-try/pull/912) Downgraded fs-extra version to 6.x to fix a fs.copy related issue. ([@larry-x-yu](https://github.com/larry-x-yu))
35
+
36
+ #### :memo: Documentation
37
+ * [#798](https://github.com/ember-cli/ember-try/pull/798) Fix a link in CHANGELOG.md ([@lolmaus](https://github.com/lolmaus))
38
+
39
+ #### :house: Internal
40
+ * [#788](https://github.com/ember-cli/ember-try/pull/788) tests/npm-adapter: Use async/await instead of promise chains ([@Turbo87](https://github.com/Turbo87))
41
+
42
+ #### Committers: 4
43
+ - Andrey Mikhaylov (lolmaus) ([@lolmaus](https://github.com/lolmaus))
44
+ - David J. Hamilton ([@hjdivad](https://github.com/hjdivad))
45
+ - Tobias Bieniek ([@Turbo87](https://github.com/Turbo87))
46
+ - [@larry-x-yu](https://github.com/larry-x-yu)
47
+
3
48
  ## v2.0.0 (2021-11-04)
4
49
 
5
50
  #### :boom: Breaking Change
@@ -36,8 +81,7 @@
36
81
 
37
82
  **Implemented enhancements:**
38
83
 
39
- - Add support for merging/clobbering `ember` in `package.json`. [\#429](https://github.com/ember-c
40
- li/ember-try/pull/429) ([rwjblue](https://github.com/rwjblue))
84
+ - Add support for merging/clobbering `ember` in `package.json`. [\#429](https://github.com/ember-cli/ember-try/pull/429) ([rwjblue](https://github.com/rwjblue))
41
85
 
42
86
  ## [v1.3.0](https://github.com/ember-cli/ember-try/tree/v1.3.0)
43
87
 
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 if (!mgrOptions.includes('--frozen-lockfile=false')) {
101
- mgrOptions.push('--frozen-lockfile=false');
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
@@ -36,10 +36,6 @@ module.exports = {
36
36
  })
37
37
  );
38
38
  } else if (config.usePnpm) {
39
- console.warn(
40
- 'pnpm support is experimental for now. if you notice any problems please open an issue.'
41
- );
42
-
43
39
  adapters.push(
44
40
  new PnpmAdapter({
45
41
  cwd: root,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-try",
3
- "version": "2.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",
@@ -35,9 +35,10 @@
35
35
  "debug": "^4.3.2",
36
36
  "ember-try-config": "^4.0.0",
37
37
  "execa": "^4.1.0",
38
- "fs-extra": "^9.0.1",
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,7 +61,7 @@
60
61
  "tmp-sync": "^1.1.0"
61
62
  },
62
63
  "engines": {
63
- "node": "10.* || 12.* || >= 14.*"
64
+ "node": "16.* || >= 18.*"
64
65
  },
65
66
  "publishConfig": {
66
67
  "registry": "https://registry.npmjs.org"