ember-cli 4.11.0-beta.0 → 4.11.1-beta.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 +34 -3
- package/bin/ember +0 -0
- package/blueprints/addon/additional-package.json +2 -2
- package/blueprints/addon/files/.github/workflows/ci.yml +1 -2
- package/blueprints/addon/files/.travis.yml +1 -2
- package/blueprints/addon/files/README.md +2 -2
- package/blueprints/addon/files/addon-config/ember-try.js +4 -22
- package/blueprints/addon/files/npmignore +2 -0
- package/blueprints/addon/index.js +0 -7
- package/blueprints/app/files/.eslintrc.js +8 -4
- package/blueprints/app/files/.stylelintignore +8 -0
- package/blueprints/app/files/.stylelintrc.js +5 -0
- package/blueprints/app/files/app/styles/app.css +1 -0
- package/blueprints/app/files/ember-cli-build.js +0 -13
- package/blueprints/app/files/package.json +30 -23
- package/blueprints/in-repo-addon/files/__root__/__name__/index.js +0 -0
- package/blueprints/in-repo-addon/index.js +0 -0
- package/blueprints/lib/index.js +0 -0
- package/docs/build/data.json +459 -459
- package/lib/broccoli/default-packager.js +0 -3
- package/lib/commands/addon.js +13 -0
- package/lib/commands/new.js +2 -14
- package/lib/commands/test.js +3 -2
- package/lib/models/blueprint.js +10 -18
- package/lib/tasks/interactive-new.js +6 -4
- package/lib/tasks/npm-task.js +0 -20
- package/lib/tasks/transforms/amd/index.js +2 -2
- package/package.json +20 -18
- package/tests/helpers/assert-version-lock.js +1 -1
- package/lib/commands/uninstall-npm.js +0 -19
|
@@ -557,10 +557,7 @@ module.exports = class DefaultPackager {
|
|
|
557
557
|
};
|
|
558
558
|
|
|
559
559
|
let stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree);
|
|
560
|
-
stylesAndVendor = this._debugTree(stylesAndVendor, 'mu-layout:addonsPreprocessTree:css');
|
|
561
|
-
|
|
562
560
|
let preprocessedStyles = preprocessCss(stylesAndVendor, '/app/styles', '/assets', options);
|
|
563
|
-
preprocessedStyles = this._debugTree(preprocessedStyles, 'mu-layout:preprocess:css');
|
|
564
561
|
|
|
565
562
|
let vendorStyles = [];
|
|
566
563
|
for (let outputFile in this.styleOutputFiles) {
|
package/lib/commands/addon.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const SilentError = require('silent-error');
|
|
3
4
|
const NewCommand = require('./new');
|
|
4
5
|
|
|
5
6
|
module.exports = NewCommand.extend({
|
|
@@ -30,4 +31,16 @@ module.exports = NewCommand.extend({
|
|
|
30
31
|
],
|
|
31
32
|
|
|
32
33
|
anonymousOptions: ['<addon-name>'],
|
|
34
|
+
|
|
35
|
+
run(commandOptions, commandArguments) {
|
|
36
|
+
let addonName = commandArguments[0];
|
|
37
|
+
|
|
38
|
+
if (addonName) {
|
|
39
|
+
return this._super(commandOptions, commandArguments);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return Promise.reject(
|
|
43
|
+
new SilentError('The `ember addon` command requires a name to be specified. For more details, run `ember help`.')
|
|
44
|
+
);
|
|
45
|
+
},
|
|
33
46
|
});
|
package/lib/commands/new.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const fs = require('fs-extra');
|
|
4
3
|
const chalk = require('chalk');
|
|
5
4
|
const Command = require('../models/command');
|
|
6
5
|
const Project = require('../models/project');
|
|
@@ -115,7 +114,7 @@ module.exports = Command.extend({
|
|
|
115
114
|
project: Project.nullProject(this.ui, this.cli),
|
|
116
115
|
});
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
await this.runTask('CreateAndStepIntoDirectory', {
|
|
119
118
|
projectName,
|
|
120
119
|
directoryName: commandOptions.directory,
|
|
121
120
|
dryRun: commandOptions.dryRun,
|
|
@@ -123,17 +122,6 @@ module.exports = Command.extend({
|
|
|
123
122
|
|
|
124
123
|
initCommand.project.root = process.cwd();
|
|
125
124
|
|
|
126
|
-
|
|
127
|
-
let response = await initCommand.run(commandOptions, rawArgs);
|
|
128
|
-
return response;
|
|
129
|
-
} catch (err) {
|
|
130
|
-
let { initialDirectory, projectDirectory } = opts;
|
|
131
|
-
|
|
132
|
-
process.chdir(initialDirectory);
|
|
133
|
-
await fs.remove(projectDirectory);
|
|
134
|
-
|
|
135
|
-
console.log(chalk.red(`Error creating new application. Removing generated directory \`./${projectDirectory}\``));
|
|
136
|
-
throw err;
|
|
137
|
-
}
|
|
125
|
+
return await initCommand.run(commandOptions, rawArgs);
|
|
138
126
|
},
|
|
139
127
|
});
|
package/lib/commands/test.js
CHANGED
|
@@ -10,8 +10,6 @@ const fs = require('fs');
|
|
|
10
10
|
const temp = require('temp');
|
|
11
11
|
temp.track();
|
|
12
12
|
|
|
13
|
-
require('express').static.mime.define({ 'application/wasm': ['wasm'] });
|
|
14
|
-
|
|
15
13
|
let defaultPort = 7357;
|
|
16
14
|
|
|
17
15
|
module.exports = Command.extend({
|
|
@@ -81,6 +79,9 @@ module.exports = Command.extend({
|
|
|
81
79
|
init() {
|
|
82
80
|
this._super.apply(this, arguments);
|
|
83
81
|
|
|
82
|
+
// Make sure Testem supports the Wasm MIME type:
|
|
83
|
+
require('express').static.mime.define({ 'application/wasm': ['wasm'] });
|
|
84
|
+
|
|
84
85
|
this.Builder = this.Builder || Builder;
|
|
85
86
|
this.Watcher = this.Watcher || Watcher;
|
|
86
87
|
|
package/lib/models/blueprint.js
CHANGED
|
@@ -23,7 +23,6 @@ const EOL = require('os').EOL;
|
|
|
23
23
|
const bowEpParser = require('bower-endpoint-parser');
|
|
24
24
|
const logger = require('heimdalljs-logger')('ember-cli:blueprint');
|
|
25
25
|
const normalizeEntityName = require('ember-cli-normalize-entity-name');
|
|
26
|
-
const { removeTypes } = require('remove-types');
|
|
27
26
|
const isAddon = require('../utilities/is-addon');
|
|
28
27
|
const { deprecate } = require('../debug');
|
|
29
28
|
|
|
@@ -532,6 +531,7 @@ let Blueprint = CoreObject.extend({
|
|
|
532
531
|
async convertToJS(fileInfo) {
|
|
533
532
|
let rendered = await fileInfo.render();
|
|
534
533
|
|
|
534
|
+
const { removeTypes } = require('remove-types');
|
|
535
535
|
const transformed = await removeTypes(rendered);
|
|
536
536
|
|
|
537
537
|
fileInfo.rendered = transformed;
|
|
@@ -1508,23 +1508,6 @@ let Blueprint = CoreObject.extend({
|
|
|
1508
1508
|
Blueprint.lookup = function (name, options) {
|
|
1509
1509
|
options = options || {};
|
|
1510
1510
|
|
|
1511
|
-
if (name.includes(path.sep)) {
|
|
1512
|
-
let blueprintPath = path.resolve(name);
|
|
1513
|
-
let isNameAPath = Boolean(blueprintPath);
|
|
1514
|
-
|
|
1515
|
-
if (isNameAPath) {
|
|
1516
|
-
if (Blueprint._existsSync(blueprintPath)) {
|
|
1517
|
-
return Blueprint.load(blueprintPath, options.blueprintOptions);
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
if (!options.ignoreMissing) {
|
|
1521
|
-
throw new SilentError(`Unknown blueprint: ${name}`);
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
return;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
1511
|
let lookupPaths = generateLookupPaths(options.paths);
|
|
1529
1512
|
|
|
1530
1513
|
let lookupPath;
|
|
@@ -1536,6 +1519,15 @@ Blueprint.lookup = function (name, options) {
|
|
|
1536
1519
|
}
|
|
1537
1520
|
}
|
|
1538
1521
|
|
|
1522
|
+
// Check if `name` itself is a path to a blueprint:
|
|
1523
|
+
if (name.includes(path.sep)) {
|
|
1524
|
+
let blueprintPath = path.resolve(name);
|
|
1525
|
+
|
|
1526
|
+
if (Blueprint._existsSync(blueprintPath)) {
|
|
1527
|
+
return Blueprint.load(blueprintPath, options.blueprintOptions);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1539
1531
|
if (!options.ignoreMissing) {
|
|
1540
1532
|
throw new SilentError(`Unknown blueprint: ${name}`);
|
|
1541
1533
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const inquirer = require('inquirer');
|
|
4
|
-
const { isLangCode } = require('is-language-code');
|
|
5
|
-
const osLocale = require('os-locale');
|
|
6
|
-
|
|
7
3
|
const Task = require('../models/task');
|
|
8
4
|
const isValidProjectName = require('../utilities/valid-project-name');
|
|
9
5
|
|
|
@@ -11,6 +7,8 @@ const DEFAULT_LOCALE = 'en-US';
|
|
|
11
7
|
|
|
12
8
|
class InteractiveNewTask extends Task {
|
|
13
9
|
async run(newCommandOptions, _testAnswers) {
|
|
10
|
+
const inquirer = require('inquirer');
|
|
11
|
+
|
|
14
12
|
let prompt = inquirer.createPromptModule();
|
|
15
13
|
let questions = await this.getQuestions(newCommandOptions);
|
|
16
14
|
let answers = await prompt(questions, _testAnswers);
|
|
@@ -24,6 +22,8 @@ class InteractiveNewTask extends Task {
|
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
async getQuestions(newCommandOptions = {}) {
|
|
25
|
+
const { isLangCode } = require('is-language-code');
|
|
26
|
+
|
|
27
27
|
return [
|
|
28
28
|
{
|
|
29
29
|
name: 'blueprint',
|
|
@@ -145,6 +145,8 @@ class InteractiveNewTask extends Task {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
getUserLocale() {
|
|
148
|
+
const osLocale = require('os-locale');
|
|
149
|
+
|
|
148
150
|
return osLocale();
|
|
149
151
|
}
|
|
150
152
|
}
|
package/lib/tasks/npm-task.js
CHANGED
|
@@ -25,8 +25,6 @@ class NpmTask extends Task {
|
|
|
25
25
|
|
|
26
26
|
// The command to run: can be 'install' or 'uninstall'
|
|
27
27
|
this.command = '';
|
|
28
|
-
|
|
29
|
-
this.versionConstraints = '3 || 4 || 5 || 6 || 7 || 8';
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
get packageManagerOutputName() {
|
|
@@ -115,24 +113,6 @@ class NpmTask extends Task {
|
|
|
115
113
|
let version = result.stdout;
|
|
116
114
|
logger.info('npm --version: %s', version);
|
|
117
115
|
|
|
118
|
-
let ok = semver.satisfies(version, this.versionConstraints);
|
|
119
|
-
if (!ok) {
|
|
120
|
-
logger.warn('npm --version is outside of version constraint: %s', this.versionConstraints);
|
|
121
|
-
|
|
122
|
-
let below = semver.ltr(version, this.versionConstraints);
|
|
123
|
-
if (below) {
|
|
124
|
-
throw new SilentError(
|
|
125
|
-
'Ember CLI is now using the global npm, but your npm version is outdated.\n' +
|
|
126
|
-
'Please update your global npm version by running: npm install -g npm'
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
this.ui.writeWarnLine(
|
|
131
|
-
'Ember CLI is using the global npm, but your npm version has not yet been ' +
|
|
132
|
-
'verified to work with the current Ember CLI release.'
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
116
|
return { name: 'npm', version };
|
|
137
117
|
} catch (error) {
|
|
138
118
|
logger.error('npm --version failed: %s', error);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const shimAmd = require('./amd-shim');
|
|
4
|
-
|
|
5
3
|
class AmdTransformAddon {
|
|
6
4
|
/**
|
|
7
5
|
* This addon is used to register a custom AMD transform for app and addons to use.
|
|
@@ -15,6 +13,8 @@ class AmdTransformAddon {
|
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
importTransforms() {
|
|
16
|
+
const shimAmd = require('./amd-shim');
|
|
17
|
+
|
|
18
18
|
return {
|
|
19
19
|
amd: {
|
|
20
20
|
transform: (tree, options) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.1-beta.0",
|
|
4
4
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -37,8 +37,8 @@
|
|
|
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.21.0",
|
|
41
|
+
"@babel/plugin-transform-modules-amd": "^7.20.11",
|
|
42
42
|
"amd-name-resolver": "^1.3.1",
|
|
43
43
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
44
44
|
"bower-config": "^1.4.3",
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
"ember-cli-normalize-entity-name": "^1.0.0",
|
|
75
75
|
"ember-cli-preprocess-registry": "^3.3.0",
|
|
76
76
|
"ember-cli-string-utils": "^1.1.0",
|
|
77
|
-
"ember-source-channel-url": "^3.0.0",
|
|
78
77
|
"ensure-posix-path": "^1.1.1",
|
|
79
78
|
"execa": "^5.1.1",
|
|
80
79
|
"exit": "^0.1.2",
|
|
@@ -83,11 +82,11 @@
|
|
|
83
82
|
"find-up": "^5.0.0",
|
|
84
83
|
"find-yarn-workspace-root": "^2.0.0",
|
|
85
84
|
"fixturify-project": "^2.1.1",
|
|
86
|
-
"fs-extra": "^
|
|
85
|
+
"fs-extra": "^11.1.0",
|
|
87
86
|
"fs-tree-diff": "^2.0.1",
|
|
88
87
|
"get-caller-file": "^2.0.5",
|
|
89
88
|
"git-repo-info": "^2.1.1",
|
|
90
|
-
"glob": "^8.0
|
|
89
|
+
"glob": "^8.1.0",
|
|
91
90
|
"heimdalljs": "^0.2.6",
|
|
92
91
|
"heimdalljs-fs-monitor": "^1.1.1",
|
|
93
92
|
"heimdalljs-graph": "^1.0.0",
|
|
@@ -103,7 +102,7 @@
|
|
|
103
102
|
"lodash.template": "^4.5.0",
|
|
104
103
|
"markdown-it": "^13.0.1",
|
|
105
104
|
"markdown-it-terminal": "^0.4.0",
|
|
106
|
-
"minimatch": "^
|
|
105
|
+
"minimatch": "^7.4.1",
|
|
107
106
|
"morgan": "^1.10.0",
|
|
108
107
|
"nopt": "^3.0.6",
|
|
109
108
|
"npm-package-arg": "^10.1.0",
|
|
@@ -116,7 +115,7 @@
|
|
|
116
115
|
"remove-types": "^1.0.0",
|
|
117
116
|
"resolve": "^1.22.1",
|
|
118
117
|
"resolve-package-path": "^4.0.3",
|
|
119
|
-
"safe-stable-stringify": "^2.
|
|
118
|
+
"safe-stable-stringify": "^2.4.2",
|
|
120
119
|
"sane": "^5.0.1",
|
|
121
120
|
"semver": "^7.3.5",
|
|
122
121
|
"silent-error": "^1.1.1",
|
|
@@ -126,15 +125,14 @@
|
|
|
126
125
|
"testem": "^3.10.1",
|
|
127
126
|
"tiny-lr": "^2.0.0",
|
|
128
127
|
"tree-sync": "^2.1.0",
|
|
129
|
-
"uuid": "^
|
|
128
|
+
"uuid": "^9.0.0",
|
|
130
129
|
"walk-sync": "^3.0.0",
|
|
131
130
|
"watch-detector": "^1.0.2",
|
|
132
|
-
"workerpool": "^6.
|
|
131
|
+
"workerpool": "^6.4.0",
|
|
133
132
|
"yam": "^1.0.0"
|
|
134
133
|
},
|
|
135
134
|
"devDependencies": {
|
|
136
|
-
"@
|
|
137
|
-
"@octokit/rest": "^19.0.5",
|
|
135
|
+
"@octokit/rest": "^19.0.7",
|
|
138
136
|
"broccoli-plugin": "^4.0.3",
|
|
139
137
|
"broccoli-test-helper": "^2.0.0",
|
|
140
138
|
"chai": "^4.3.7",
|
|
@@ -143,14 +141,14 @@
|
|
|
143
141
|
"chai-jest-snapshot": "^2.0.0",
|
|
144
142
|
"ember-cli-blueprint-test-helpers": "^0.19.2",
|
|
145
143
|
"ember-cli-internal-test-helpers": "^0.9.1",
|
|
146
|
-
"eslint": "^8.
|
|
147
|
-
"eslint-config-prettier": "^8.
|
|
144
|
+
"eslint": "^8.35.0",
|
|
145
|
+
"eslint-config-prettier": "^8.6.0",
|
|
148
146
|
"eslint-plugin-chai-expect": "^3.0.0",
|
|
149
147
|
"eslint-plugin-mocha": "^10.1.0",
|
|
150
148
|
"eslint-plugin-n": "^15.3.0",
|
|
151
149
|
"eslint-plugin-prettier": "^4.2.1",
|
|
152
|
-
"fixturify": "^
|
|
153
|
-
"jsdom": "^
|
|
150
|
+
"fixturify": "^3.0.0",
|
|
151
|
+
"jsdom": "^21.1.0",
|
|
154
152
|
"latest-version": "^5.1.0",
|
|
155
153
|
"mocha": "^10.0.0",
|
|
156
154
|
"nock": "^13.2.9",
|
|
@@ -163,7 +161,7 @@
|
|
|
163
161
|
"testdouble": "^3.16.6",
|
|
164
162
|
"tmp": "^0.2.1",
|
|
165
163
|
"websocket": "^1.0.32",
|
|
166
|
-
"which": "
|
|
164
|
+
"which": "3.0.0",
|
|
167
165
|
"yuidoc-ember-cli-theme": "^1.0.4",
|
|
168
166
|
"yuidocjs": "0.10.2"
|
|
169
167
|
},
|
|
@@ -186,5 +184,9 @@
|
|
|
186
184
|
"tokenRef": "GITHUB_AUTH"
|
|
187
185
|
}
|
|
188
186
|
},
|
|
189
|
-
"trackingCode": "UA-49225444-1"
|
|
187
|
+
"trackingCode": "UA-49225444-1",
|
|
188
|
+
"volta": {
|
|
189
|
+
"node": "14.21.3",
|
|
190
|
+
"yarn": "1.22.19"
|
|
191
|
+
}
|
|
190
192
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const Command = require('../models/command');
|
|
4
|
-
const SilentError = require('silent-error');
|
|
5
|
-
|
|
6
|
-
module.exports = Command.extend({
|
|
7
|
-
name: 'uninstall:npm',
|
|
8
|
-
description: 'Npm package uninstall are now managed by the user.',
|
|
9
|
-
works: 'insideProject',
|
|
10
|
-
skipHelp: true,
|
|
11
|
-
|
|
12
|
-
anonymousOptions: ['<package-names...>'],
|
|
13
|
-
|
|
14
|
-
run() {
|
|
15
|
-
let err = 'This command has been removed. Please use `npm uninstall ';
|
|
16
|
-
err += '<packageName> --save-dev` instead.';
|
|
17
|
-
return Promise.reject(new SilentError(err));
|
|
18
|
-
},
|
|
19
|
-
});
|