ember-cli 4.4.0 → 4.6.0-beta.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/.github/workflows/ci.yml +4 -4
- package/CHANGELOG.md +74 -0
- package/blueprints/addon/additional-dev-dependencies.json +1 -1
- package/blueprints/addon/files/.github/workflows/ci.yml +6 -3
- package/blueprints/addon/files/.travis.yml +2 -2
- package/blueprints/addon/files/CONTRIBUTING.md +1 -1
- package/blueprints/addon/files/README.md +1 -1
- package/blueprints/addon/index.js +3 -4
- package/blueprints/app/files/.github/workflows/ci.yml +4 -2
- package/blueprints/app/files/.travis.yml +2 -2
- package/blueprints/app/files/README.md +1 -1
- package/blueprints/app/files/config/environment.js +0 -4
- package/blueprints/app/files/package.json +11 -12
- package/blueprints/app/index.js +2 -0
- package/blueprints/blueprint/index.js +0 -16
- package/blueprints/in-repo-addon/index.js +6 -3
- package/blueprints/server/index.js +21 -4
- package/blueprints/vendor-shim/index.js +13 -0
- package/docs/build/data.json +117 -106
- package/lib/broccoli/ember-addon.js +1 -1
- package/lib/broccoli/ember-app.js +30 -4
- package/lib/broccoli/vendor-prefix.js +7 -0
- package/lib/cli/cli.js +6 -4
- package/lib/cli/index.js +1 -1
- package/lib/cli/lookup-command.js +6 -2
- package/lib/commands/destroy.js +1 -1
- package/lib/commands/generate.js +3 -3
- package/lib/commands/init.js +1 -2
- package/lib/models/addon.js +1 -18
- package/lib/models/blueprint.js +19 -11
- package/lib/models/command.js +10 -15
- package/lib/models/project.js +8 -8
- package/lib/tasks/addon-install.js +1 -1
- package/lib/tasks/create-and-step-into-directory.js +2 -26
- package/lib/tasks/generate-from-blueprint.js +1 -1
- package/lib/tasks/install-blueprint.js +1 -1
- package/lib/tasks/server/express-server.js +1 -1
- package/lib/tasks/server/livereload-server.js +1 -1
- package/lib/utilities/directory-for-package-name.js +31 -0
- package/lib/utilities/find-addon-by-name.js +4 -37
- package/lib/utilities/is-live-reload-request.js +1 -11
- package/lib/utilities/markdown-color.js +1 -1
- package/lib/utilities/sequence.js +7 -5
- package/package.json +28 -28
- package/tests/helpers/copy-fixture-files.js +4 -1
- package/tests/helpers/default-packager.js +0 -1
- package/tests/helpers/fixturify-project.js +1 -1
- package/tests/helpers/run-command.js +1 -1
- package/blueprints/server/files/server/.eslintrc.js +0 -5
- package/lib/errors/cli.js +0 -3
- package/lib/errors/silent.js +0 -19
- package/lib/utilities/default-targets.js +0 -5
- package/lib/utilities/deprecate.js +0 -9
|
@@ -1,34 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function unscope(name) {
|
|
4
|
-
if (name[0] !== '@') {
|
|
5
|
-
return name;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
return name.slice(name.indexOf('/') + 1);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
3
|
let HAS_FOUND_ADDON_BY_NAME = Object.create(null);
|
|
12
|
-
let HAS_FOUND_ADDON_BY_UNSCOPED_NAME = Object.create(null);
|
|
13
|
-
/*
|
|
14
|
-
Finds an addon given a specific name. Due to older versions of ember-cli
|
|
15
|
-
not properly supporting scoped packages it was (at one point) common practice
|
|
16
|
-
to have `package.json` include a scoped name but `index.js` having an unscoped
|
|
17
|
-
name.
|
|
18
|
-
|
|
19
|
-
Changes to the blueprints and addon model (in ~ 3.4+) have made it much clearer
|
|
20
|
-
that both `package.json` and `index.js` `name`'s should match. At some point
|
|
21
|
-
this will be "forced" and no longer optional.
|
|
22
4
|
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
/*
|
|
6
|
+
Finds an addon given a specific name.
|
|
25
7
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- unscoped (leaf portion) index.js name matches unscoped requested name
|
|
8
|
+
The `name` value in an addon's `package.json` file takes priority over the
|
|
9
|
+
`name` value in an addon's `index.js` file.
|
|
29
10
|
*/
|
|
30
11
|
module.exports = function findAddonByName(addons, name) {
|
|
31
|
-
let unscopedName = unscope(name);
|
|
32
12
|
let exactMatchFromPkg = addons.find((addon) => addon.pkg && addon.pkg.name === name);
|
|
33
13
|
|
|
34
14
|
if (exactMatchFromPkg) {
|
|
@@ -51,22 +31,9 @@ module.exports = function findAddonByName(addons, name) {
|
|
|
51
31
|
return exactMatchFromIndex;
|
|
52
32
|
}
|
|
53
33
|
|
|
54
|
-
let unscopedMatchFromIndex = addons.find((addon) => addon.name && unscope(addon.name) === unscopedName);
|
|
55
|
-
if (unscopedMatchFromIndex) {
|
|
56
|
-
if (HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] !== true) {
|
|
57
|
-
HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] = true;
|
|
58
|
-
console.trace(
|
|
59
|
-
`Finding a scoped addon via its unscoped name is deprecated. You searched for \`${name}\` which we found as \`${unscopedMatchFromIndex.name}\` in '${unscopedMatchFromIndex.root}'`
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return unscopedMatchFromIndex;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
34
|
return null;
|
|
67
35
|
};
|
|
68
36
|
|
|
69
37
|
module.exports._clearCaches = function () {
|
|
70
38
|
HAS_FOUND_ADDON_BY_NAME = Object.create(null);
|
|
71
|
-
HAS_FOUND_ADDON_BY_UNSCOPED_NAME = Object.create(null);
|
|
72
39
|
};
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const cleanBaseUrl = require('clean-base-url');
|
|
4
|
-
const deprecate = require('./deprecate');
|
|
5
4
|
|
|
6
5
|
module.exports = function isLiveReloadRequest(url, liveReloadPrefix) {
|
|
7
|
-
|
|
8
|
-
if (url === `${cleanBaseUrl(liveReloadPrefix)}livereload`) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (regex.test(url)) {
|
|
11
|
-
//version needs to be updated according to the this PR (https://github.com/ember-cli/ember-cli-inject-live-reload/pull/55)
|
|
12
|
-
//in master of ember-cli-inject-live-reload.
|
|
13
|
-
deprecate(`Upgrade ember-cli-inject-live-reload version to 1.10.0 or above`, true);
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
return false;
|
|
6
|
+
return url === `${cleanBaseUrl(liveReloadPrefix)}livereload`;
|
|
17
7
|
};
|
|
@@ -4,7 +4,7 @@ const fs = require('fs');
|
|
|
4
4
|
|
|
5
5
|
const chalk = require('chalk');
|
|
6
6
|
const SilentError = require('silent-error');
|
|
7
|
-
const merge = require('ember-cli-lodash-subset')
|
|
7
|
+
const { merge } = require('ember-cli-lodash-subset');
|
|
8
8
|
|
|
9
9
|
let colors = ['red', 'green', 'blue', 'cyan', 'magenta', 'yellow', 'black', 'white', 'grey', 'gray'];
|
|
10
10
|
let backgroundColors = ['bgRed', 'bgGreen', 'bgBlue', 'bgCyan', 'bgMagenta', 'bgYellow', 'bgWhite', 'bgBlack'];
|
|
@@ -27,14 +27,16 @@
|
|
|
27
27
|
* @return Promise<Array>
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
|
-
module.exports = function sequence(tasks) {
|
|
30
|
+
module.exports = async function sequence(tasks) {
|
|
31
31
|
let length = tasks.length;
|
|
32
|
-
let
|
|
33
|
-
let results = new Array(length);
|
|
32
|
+
let results = [];
|
|
34
33
|
|
|
35
34
|
for (let i = 0; i < length; ++i) {
|
|
36
|
-
|
|
35
|
+
let task = tasks[i];
|
|
36
|
+
let prevResult = results[i - 1];
|
|
37
|
+
|
|
38
|
+
results.push(typeof task === 'function' ? await task(prevResult) : await task);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
return
|
|
41
|
+
return results;
|
|
40
42
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0-beta.1",
|
|
4
4
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"test:slow": "node --unhandled-rejections=strict tests/runner slow"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/core": "^7.
|
|
41
|
-
"@babel/plugin-transform-modules-amd": "^7.
|
|
40
|
+
"@babel/core": "^7.18.6",
|
|
41
|
+
"@babel/plugin-transform-modules-amd": "^7.18.6",
|
|
42
42
|
"amd-name-resolver": "^1.3.1",
|
|
43
43
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
44
44
|
"bower-config": "^1.4.3",
|
|
45
45
|
"bower-endpoint-parser": "0.2.2",
|
|
46
46
|
"broccoli": "^3.5.2",
|
|
47
47
|
"broccoli-amd-funnel": "^2.0.1",
|
|
48
|
-
"broccoli-babel-transpiler": "^7.8.
|
|
48
|
+
"broccoli-babel-transpiler": "^7.8.1",
|
|
49
49
|
"broccoli-builder": "^0.18.14",
|
|
50
50
|
"broccoli-concat": "^4.2.5",
|
|
51
51
|
"broccoli-config-loader": "^1.0.1",
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"calculate-cache-key-for-tree": "^2.0.0",
|
|
62
62
|
"capture-exit": "^2.0.0",
|
|
63
63
|
"chalk": "^4.1.2",
|
|
64
|
-
"ci-info": "^3.3.
|
|
64
|
+
"ci-info": "^3.3.1",
|
|
65
65
|
"clean-base-url": "^1.0.0",
|
|
66
66
|
"compression": "^1.7.4",
|
|
67
67
|
"configstore": "^5.0.1",
|
|
68
68
|
"console-ui": "^3.1.2",
|
|
69
69
|
"core-object": "^3.1.5",
|
|
70
70
|
"dag-map": "^2.0.2",
|
|
71
|
-
"diff": "^5.
|
|
71
|
+
"diff": "^5.1.0",
|
|
72
72
|
"ember-cli-is-package-missing": "^1.0.0",
|
|
73
73
|
"ember-cli-lodash-subset": "^2.0.1",
|
|
74
74
|
"ember-cli-normalize-entity-name": "^1.0.0",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"ensure-posix-path": "^1.1.1",
|
|
79
79
|
"execa": "^5.1.1",
|
|
80
80
|
"exit": "^0.1.2",
|
|
81
|
-
"express": "^4.
|
|
82
|
-
"filesize": "^
|
|
81
|
+
"express": "^4.18.1",
|
|
82
|
+
"filesize": "^9.0.11",
|
|
83
83
|
"find-up": "^5.0.0",
|
|
84
84
|
"find-yarn-workspace-root": "^2.0.0",
|
|
85
85
|
"fixturify-project": "^2.1.1",
|
|
86
|
-
"fs-extra": "^
|
|
86
|
+
"fs-extra": "^10.1.0",
|
|
87
87
|
"fs-tree-diff": "^2.0.1",
|
|
88
88
|
"get-caller-file": "^2.0.5",
|
|
89
89
|
"git-repo-info": "^2.1.1",
|
|
@@ -96,38 +96,38 @@
|
|
|
96
96
|
"inflection": "^1.13.1",
|
|
97
97
|
"is-git-url": "^1.0.0",
|
|
98
98
|
"is-language-code": "^3.1.0",
|
|
99
|
-
"isbinaryfile": "^
|
|
99
|
+
"isbinaryfile": "^5.0.0",
|
|
100
100
|
"js-yaml": "^3.14.0",
|
|
101
101
|
"leek": "0.0.24",
|
|
102
102
|
"lodash.template": "^4.5.0",
|
|
103
|
-
"markdown-it": "^
|
|
103
|
+
"markdown-it": "^13.0.1",
|
|
104
104
|
"markdown-it-terminal": "0.2.1",
|
|
105
|
-
"minimatch": "^5.0
|
|
105
|
+
"minimatch": "^5.1.0",
|
|
106
106
|
"morgan": "^1.10.0",
|
|
107
107
|
"nopt": "^3.0.6",
|
|
108
|
-
"npm-package-arg": "^
|
|
108
|
+
"npm-package-arg": "^9.0.2",
|
|
109
109
|
"p-defer": "^3.0.0",
|
|
110
110
|
"portfinder": "^1.0.28",
|
|
111
111
|
"promise-map-series": "^0.3.0",
|
|
112
112
|
"promise.hash.helper": "^1.0.8",
|
|
113
113
|
"quick-temp": "^0.1.8",
|
|
114
114
|
"remove-types": "^1.0.0",
|
|
115
|
-
"resolve": "^1.
|
|
116
|
-
"resolve-package-path": "^
|
|
115
|
+
"resolve": "^1.22.1",
|
|
116
|
+
"resolve-package-path": "^4.0.3",
|
|
117
117
|
"safe-stable-stringify": "^2.3.1",
|
|
118
118
|
"sane": "^5.0.1",
|
|
119
119
|
"semver": "^7.3.5",
|
|
120
120
|
"silent-error": "^1.1.1",
|
|
121
|
-
"sort-package-json": "^1.
|
|
121
|
+
"sort-package-json": "^1.57.0",
|
|
122
122
|
"symlink-or-copy": "^1.3.1",
|
|
123
123
|
"temp": "0.9.4",
|
|
124
|
-
"testem": "^3.
|
|
124
|
+
"testem": "^3.7.0",
|
|
125
125
|
"tiny-lr": "^2.0.0",
|
|
126
126
|
"tree-sync": "^2.1.0",
|
|
127
127
|
"uuid": "^8.3.2",
|
|
128
128
|
"walk-sync": "^2.2.0",
|
|
129
129
|
"watch-detector": "^1.0.1",
|
|
130
|
-
"workerpool": "^6.2.
|
|
130
|
+
"workerpool": "^6.2.1",
|
|
131
131
|
"yam": "^1.0.0"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
@@ -142,23 +142,23 @@
|
|
|
142
142
|
"ember-cli-blueprint-test-helpers": "^0.19.2",
|
|
143
143
|
"ember-cli-internal-test-helpers": "^0.9.1",
|
|
144
144
|
"eslint": "^8.10.0",
|
|
145
|
-
"eslint-config-prettier": "^
|
|
145
|
+
"eslint-config-prettier": "^8.5.0",
|
|
146
146
|
"eslint-plugin-chai-expect": "^3.0.0",
|
|
147
|
-
"eslint-plugin-mocha": "^
|
|
147
|
+
"eslint-plugin-mocha": "^10.0.5",
|
|
148
148
|
"eslint-plugin-node": "^11.1.0",
|
|
149
|
-
"eslint-plugin-prettier": "^4.
|
|
149
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
150
150
|
"fixturify": "^2.1.0",
|
|
151
|
-
"jsdom": "^
|
|
151
|
+
"jsdom": "^20.0.0",
|
|
152
152
|
"latest-version": "^5.1.0",
|
|
153
|
-
"mocha": "^
|
|
154
|
-
"nock": "^13.2.
|
|
153
|
+
"mocha": "^10.0.0",
|
|
154
|
+
"nock": "^13.2.8",
|
|
155
155
|
"nyc": "^15.1.0",
|
|
156
156
|
"prettier": "2.6.2",
|
|
157
|
-
"release-it": "^
|
|
157
|
+
"release-it": "^15.1.1",
|
|
158
158
|
"rimraf": "^3.0.2",
|
|
159
159
|
"strip-ansi": "^6.0.0",
|
|
160
|
-
"supertest": "^6.
|
|
161
|
-
"testdouble": "^3.16.
|
|
160
|
+
"supertest": "^6.2.3",
|
|
161
|
+
"testdouble": "^3.16.5",
|
|
162
162
|
"tmp": "^0.2.1",
|
|
163
163
|
"websocket": "^1.0.32",
|
|
164
164
|
"which": "2.0.2",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"yuidocjs": "0.10.2"
|
|
167
167
|
},
|
|
168
168
|
"engines": {
|
|
169
|
-
"node": ">=
|
|
169
|
+
"node": ">= 14"
|
|
170
170
|
},
|
|
171
171
|
"publishConfig": {
|
|
172
172
|
"registry": "https://registry.npmjs.org"
|
|
@@ -6,5 +6,8 @@ const path = require('path');
|
|
|
6
6
|
let rootPath = process.cwd();
|
|
7
7
|
|
|
8
8
|
module.exports = function copyFixtureFiles(sourceDir) {
|
|
9
|
-
return fs.copy(path.join(rootPath, 'tests', 'fixtures', sourceDir), '.', {
|
|
9
|
+
return fs.copy(path.join(rootPath, 'tests', 'fixtures', sourceDir), '.', {
|
|
10
|
+
dereference: true,
|
|
11
|
+
overwrite: true,
|
|
12
|
+
});
|
|
10
13
|
};
|
|
@@ -132,7 +132,6 @@ const DEFAULT_SOURCE = {
|
|
|
132
132
|
'ember-cli-sri': '^2.1.0',
|
|
133
133
|
'ember-cli-uglify': '^2.0.0',
|
|
134
134
|
'ember-data': '~3.0.0-beta.1',
|
|
135
|
-
'ember-export-application-global': '^2.0.0',
|
|
136
135
|
'ember-load-initializers': '^1.0.0',
|
|
137
136
|
'ember-qunit': '^3.4.1',
|
|
138
137
|
'ember-resolver': '^4.0.0',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const merge = require('ember-cli-lodash-subset')
|
|
4
|
+
const { merge } = require('ember-cli-lodash-subset');
|
|
5
5
|
const FixturifyProject = require('fixturify-project');
|
|
6
6
|
const Project = require('../../lib/models/project');
|
|
7
7
|
const MockCLI = require('./mock-cli');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const chalk = require('chalk');
|
|
4
4
|
const spawn = require('child_process').spawn;
|
|
5
|
-
const defaults = require('ember-cli-lodash-subset')
|
|
5
|
+
const { defaults } = require('ember-cli-lodash-subset');
|
|
6
6
|
const killCliProcess = require('./kill-cli-process');
|
|
7
7
|
const logOnFailure = require('./log-on-failure');
|
|
8
8
|
let debug = require('heimdalljs-logger')('run-command');
|
package/lib/errors/cli.js
DELETED
package/lib/errors/silent.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const SilentError = require('silent-error');
|
|
4
|
-
const deprecate = require('../utilities/deprecate');
|
|
5
|
-
|
|
6
|
-
Object.defineProperty(module, 'exports', {
|
|
7
|
-
get() {
|
|
8
|
-
// Get the call stack so we can let the user know what module is using the deprecated function.
|
|
9
|
-
let stack = new Error().stack;
|
|
10
|
-
stack = stack.split('\n')[5];
|
|
11
|
-
stack = stack.replace(' at ', ' ');
|
|
12
|
-
|
|
13
|
-
deprecate(
|
|
14
|
-
`\`ember-cli/lib/errors/silent.js\` is deprecated, use \`silent-error\` instead. Required here: \n${stack.toString()}`,
|
|
15
|
-
true
|
|
16
|
-
);
|
|
17
|
-
return SilentError;
|
|
18
|
-
},
|
|
19
|
-
});
|