Skip to content

Commit

Permalink
Merge branch 'beta' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Selden committed Jun 25, 2021
2 parents 638aba9 + ebd76ef commit 8b20fba
Show file tree
Hide file tree
Showing 100 changed files with 2,457 additions and 895 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
- ENABLE_ALL_EXPERIMENTS
- PACKAGER
- EMBROIDER
- CLASSIC

steps:
- uses: actions/checkout@v2
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
# ember-cli Changelog


## v3.27.0-beta.2

#### Blueprint Changes

- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.27.0-beta.1...v3.27.0-beta.2)
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.27.0-beta.1...v3.27.0-beta.2)

#### Changelog

- [#9504](https://github.com/ember-cli/ember-cli/pull/9504) Update minimum version of broccoli-concat to address a major issue with cache invalidation [@brendenpalmer](https://github.com/brendenpalmer)
- [#9535](https://github.com/ember-cli/ember-cli/pull/9535) Disable Embroider by default. [@rwjblue](https://github.com/rwjblue)
- [#9557](https://github.com/ember-cli/ember-cli/pull/9557) Update app and addon blueprint dependencies to latest. [@rwjblue](https://github.com/rwjblue)
- [#9558](https://github.com/ember-cli/ember-cli/pull/9558) Switch from `octane` template lint config to `recommended` [@bmish](https://github.com/bmish)

Thank you to all who took the time to contribute!

## v3.27.1-beta.1

#### Blueprint Changes

- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.26.0...v3.27.0-beta.1)
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.26.0...v3.27.0-beta.1)

#### Changelog

- [#9453](https://github.com/ember-cli/ember-cli/pull/9453) Prevent "yarn-error.log" files being published for addons [@bertdeblock](https://github.com/bertdeblock)
- [#9392](https://github.com/ember-cli/ember-cli/pull/9392) / [#9484](https://github.com/ember-cli/ember-cli/pull/9484) Add eslint-plugin-qunit to blueprint [@bmish](https://github.com/bmish)
- [#9454](https://github.com/ember-cli/ember-cli/pull/9454) / [#9492](https://github.com/ember-cli/ember-cli/pull/9492) Add --embroider as an option for new and init [@thoov](https://github.com/thoov)
- [#9456](https://github.com/ember-cli/ember-cli/pull/9456) Add `.*/` to eslint ignore [@chancancode](https://github.com/chancancode)
- [#9469](https://github.com/ember-cli/ember-cli/pull/9469) Run `lint:fix` script automatically after blueprint generation [@rpemberton](https://github.com/rpemberton)
- [#9480](https://github.com/ember-cli/ember-cli/pull/9480) Refactor getPort to only check required port [@Cartmanishere](https://github.com/Cartmanishere)
- [#9485](https://github.com/ember-cli/ember-cli/pull/9485) Add Ember 3.24 LTS to ember-try configuration [@bertdeblock](https://github.com/bertdeblock)
- [#9488](https://github.com/ember-cli/ember-cli/pull/9488) Update supported Ember version in addon blueprint [@bertdeblock](https://github.com/bertdeblock)
- [#9490](https://github.com/ember-cli/ember-cli/pull/9490) Prevent window.Ember deprecation on Ember 3.27+. [@rwjblue](https://github.com/rwjblue)
- [#9491](https://github.com/ember-cli/ember-cli/pull/9491) Update supported Ember CLI version in addon blueprint [@bertdeblock](https://github.com/bertdeblock)
- [#9495](https://github.com/ember-cli/ember-cli/pull/9495) Enable Embroider by default for new projects [@thoov](https://github.com/thoov)
- [#9500](https://github.com/ember-cli/ember-cli/pull/9500) Fix `lint:fix` script for Windows users [@lupestro](https://github.com/lupestro)

Thank you to all who took the time to contribute!


## v3.26.1

#### Blueprint Changes
Expand Down
2 changes: 1 addition & 1 deletion blueprints/addon/additional-dev-dependencies.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"@embroider/test-setup": "^0.37.0",
"@embroider/test-setup": "^0.41.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-try": "^1.4.0",
"ember-source-channel-url": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion blueprints/addon/files/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-lts-3.24
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
Expand Down
4 changes: 2 additions & 2 deletions blueprints/addon/files/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
Compatibility
------------------------------------------------------------------------------

* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Ember.js v3.20 or above
* Ember CLI v3.20 or above
* Node.js v10 or above


Expand Down
8 changes: 4 additions & 4 deletions blueprints/addon/files/addon-config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ module.exports = async function () {
<% if (yarn) { %>useYarn: true,
<% } %>scenarios: [
{
name: 'ember-lts-3.16',
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.16.0',
'ember-source': '~3.20.5',
},
},
},
{
name: 'ember-lts-3.20',
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
'ember-source': '~3.24.3',
},
},
},
Expand Down
1 change: 1 addition & 0 deletions blueprints/addon/files/npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
1 change: 1 addition & 0 deletions blueprints/app/files/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
5 changes: 5 additions & 0 deletions blueprints/app/files/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,10 @@ module.exports = {
'node/no-unpublished-require': 'off',
},<% } %>
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
2 changes: 1 addition & 1 deletion blueprints/app/files/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'octane',
extends: 'recommended',
};
20 changes: 14 additions & 6 deletions blueprints/app/files/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ const browsers = [
'last 1 Safari versions',
];

const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}
// Ember's browser support policy is changing, and IE11 support will end in
// v4.0 onwards.
//
// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy
//
// If you need IE11 support on a version of Ember that still offers support
// for it, uncomment the code block below.
//
// const isCI = Boolean(process.env.CI);
// const isProduction = process.env.EMBER_ENV === 'production';
//
// if (isCI || isProduction) {
// browsers.push('ie 11');
// }

module.exports = {
browsers,
Expand Down
8 changes: 7 additions & 1 deletion blueprints/app/files/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ module.exports = function (defaults) {
// along with the exports of each module as its value.

<% if (embroider) { %>const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack);<% } else { %>return app.toTree();<% } %>
return require('@embroider/compat').compatBuild(app, Webpack, {
skipBabel: [
{
package: 'qunit',
},
],
});<% } else { %>return app.toTree();<% } %>
};
38 changes: 20 additions & 18 deletions blueprints/app/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand All @@ -25,43 +25,45 @@
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5<% if (embroider) { %>",
"@embroider/compat": "^0.37.0",
"@embroider/core": "^0.37.0",
"@embroider/webpack": "^0.37.0<% } %>",
"@embroider/compat": "^0.41.0",
"@embroider/core": "^0.41.0",
"@embroider/webpack": "^0.41.0<% } %>",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.11.2",
"ember-auto-import": "^1.11.3",
"ember-cli": "~<%= emberCLIVersion %>",
"ember-cli-app-version": "^5.0.0",
"ember-cli-babel": "^7.26.3",
"ember-cli-babel": "^7.26.6",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-data": "~3.26.0",
"ember-cli-terser": "^4.0.2",
"ember-data": "~3.27.1",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^8.0.4",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-page-title": "^6.2.1",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~3.26.1",
"ember-template-lint": "^3.2.0<% if (welcome) { %>",
"ember-source": "~3.27.2",
"ember-template-lint": "^3.4.2<% if (welcome) { %>",
"ember-welcome-page": "^4.0.0<% } %>",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.3.0",
"eslint": "^7.27.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.4.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-qunit": "^6.1.1",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.14.1",
"qunit-dom": "^1.6.0"
"prettier": "^2.3.0",
"qunit": "^2.15.0",
"qunit-dom": "^1.6.0<% if (embroider) { %>",
"webpack": "^5.38.1<% } %>"
},
"engines": {
"node": "10.* || >= 12"
Expand Down
2 changes: 1 addition & 1 deletion blueprints/app/files/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
</div>

<script src="/testem.js" integrity=""></script>
<script src="/testem.js" integrity="" data-embroider-ignore></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/<%= name %>.js"></script>
Expand Down
9 changes: 6 additions & 3 deletions blueprints/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@ module.exports = {
let rawName = entity.name;
let name = stringUtil.dasherize(rawName);
let namespace = stringUtil.classify(rawName);
let embroider = isExperimentEnabled('EMBROIDER') || options.embroider;

let hasOptions = !options.welcome || options.yarn;
let hasOptions = !options.welcome || options.yarn || embroider;
let blueprintOptions = '';
if (hasOptions) {
let indent = `\n `;
let outdent = `\n `;

blueprintOptions =
indent +
[!options.welcome && '"--no-welcome"', options.yarn && '"--yarn"'].filter(Boolean).join(',\n ') +
[!options.welcome && '"--no-welcome"', options.yarn && '"--yarn"', embroider && '"--embroider"']
.filter(Boolean)
.join(',\n ') +
outdent;
}

Expand All @@ -43,7 +46,7 @@ module.exports = {
welcome: options.welcome,
blueprint: 'app',
blueprintOptions,
embroider: isExperimentEnabled('EMBROIDER'),
embroider,
lang: options.lang,
};
},
Expand Down
1 change: 1 addition & 0 deletions dev/update-blueprint-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const PACKAGE_FILES = [
'../tests/fixtures/app/npm/package.json',
'../tests/fixtures/app/yarn/package.json',
'../tests/fixtures/app/embroider/package.json',
'../tests/fixtures/app/embroider-yarn/package.json',
'../tests/fixtures/app/embroider-no-welcome/package.json',
'../tests/fixtures/addon/defaults/package.json',
'../tests/fixtures/addon/yarn/package.json',
Expand Down
1 change: 1 addition & 0 deletions lib/commands/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = Command.extend({
{ name: 'classic', type: Boolean, default: false, aliases: ['c'] },
{ name: 'dummy', type: Boolean, default: false, aliases: ['dum', 'id'] },
{ name: 'in-repo-addon', type: String, default: null, aliases: ['in-repo', 'ir'] },
{ name: 'lint-fix', type: Boolean, default: true },
{
name: 'in',
type: String,
Expand Down
2 changes: 2 additions & 0 deletions lib/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = Command.extend({
{ name: 'blueprint', type: String, aliases: ['b'] },
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
{ name: 'skip-bower', type: Boolean, default: false, aliases: ['sb'] },
{ name: 'lint-fix', type: Boolean, default: true },
{
name: 'welcome',
type: Boolean,
Expand All @@ -35,6 +36,7 @@ module.exports = Command.extend({
type: String,
description: 'Sets the base human language of the application via index.html',
},
{ name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' },
],

anonymousOptions: ['<glob-pattern>'],
Expand Down
1 change: 1 addition & 0 deletions lib/commands/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = Command.extend({
type: String,
description: 'Sets the base human language of the application via index.html',
},
{ name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' },
],

anonymousOptions: ['<app-name>'],
Expand Down
28 changes: 19 additions & 9 deletions lib/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,25 @@ module.exports = Command.extend({
},

async _checkExpressPort(commandOptions) {
let foundPort = await getPort({ port: commandOptions.port, host: commandOptions.host });
if (commandOptions.port !== foundPort && commandOptions.port !== 0) {
let message = `Port ${commandOptions.port} is already in use.`;
return Promise.reject(new SilentError(message));
let portOptions = { port: commandOptions.port, host: commandOptions.host };
if (commandOptions.port !== 0) {
portOptions.stopPort = commandOptions.port;
}
try {
let foundPort = await getPort(portOptions);
commandOptions.port = foundPort;
commandOptions.liveReloadPort = commandOptions.liveReloadPort || commandOptions.port;
return commandOptions;
} catch (err) {
let message;
if (commandOptions.port === 0) {
message = `No open port found above ${commandOptions.port}`;
} else if (commandOptions.port < 1024) {
message = `Port ${commandOptions.port} is already in use or you do not have permissions to use this port.`;
} else {
message = `Port ${commandOptions.port} is already in use.`;
}
throw new SilentError(message);
}

// otherwise, our found port is good
commandOptions.port = foundPort;
commandOptions.liveReloadPort = commandOptions.liveReloadPort || commandOptions.port;
return commandOptions;
},
});
6 changes: 5 additions & 1 deletion lib/experiments/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const chalk = require('chalk');
const availableExperiments = Object.freeze(['PACKAGER', 'EMBROIDER']);
const availableExperiments = Object.freeze(['PACKAGER', 'EMBROIDER', 'CLASSIC']);

const deprecatedExperiments = Object.freeze(['BROCCOLI_WATCHER', 'PACKAGER']);
const enabledExperiments = Object.freeze([]);
Expand All @@ -20,6 +20,10 @@ function isExperimentEnabled(experimentName) {
return true;
}

if (process.env.EMBER_CLI_CLASSIC && experimentName === 'EMBROIDER') {
return false;
}

let experimentEnvironmentVariable = `EMBER_CLI_${experimentName}`;
let experimentValue = process.env[experimentEnvironmentVariable];

Expand Down
Loading

0 comments on commit 8b20fba

Please sign in to comment.