Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to v3.28 with ember-cli-update #743

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
43 changes: 26 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
},
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended'],
Expand Down Expand Up @@ -36,39 +41,43 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'test/**/*.js',
'tests/dummy/config/**/*.js'
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
excludedFiles: ['app/**', 'addon-test-support/**', 'addon/**', 'tests/dummy/app/**'],
parserOptions: {
sourceType: 'script'
sourceType: 'script',
},
env: {
browser: false,
node: true
node: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
// node tests
{
files: ['test/**/*.js'],
env: {
mocha: true
mocha: true,
node: true
},
rules: {
'node/no-unpublished-require': 'off',
'node/no-extraneous-require': 'off'
}
}
]
],
};
15 changes: 14 additions & 1 deletion .github/workflows/CI.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 12.x
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn lint:js

Expand All @@ -30,8 +34,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn test

Expand All @@ -45,8 +51,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: PREFER_NATIVE=true yarn test

Expand All @@ -60,8 +68,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: NATIVE_PROMISE=true yarn test

Expand All @@ -75,8 +85,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn run test:node

Expand All @@ -88,7 +100,7 @@ jobs:
needs: ember-tests

strategy:
fail-fast: true
fail-fast: false
matrix:
ember-try-scenario:
- ember-lts-3.4
Expand All @@ -105,6 +117,7 @@ jobs:
allow-failure: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 12.x
- name: install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# misc
/.sass-cache
/.eslintcache
/connect.lock
/coverage/*
/libpeerconnection.log
Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand All @@ -25,6 +27,7 @@
/npm-debug.log*
/testem.js
/tests/
/yarn-error.log
/yarn.lock
/yarn-error.log
.gitkeep
Expand Down
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true,
};
1 change: 1 addition & 0 deletions addon/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
import Mix from '@ember/polyfills/types';

export type Nullable<T> = T | null | undefined;
Expand Down
1 change: 1 addition & 0 deletions addon/utils/mung-options-for-fetch.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
import { assign } from '@ember/polyfills';
import { serializeQueryParams } from './serialize-query-params';
import {
Expand Down
71 changes: 45 additions & 26 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use strict';

const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function() {
module.exports = async function () {
return {
useYarn: true,
scenarios: [
Expand Down Expand Up @@ -50,57 +51,75 @@ module.exports = async function() {
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.24.0'
'ember-source': '~3.24.3'
}
}
},
{
name: 'ember-lts-3.28',
npm: {
devDependencies: {
'ember-source': '~3.28.0',
},
},
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release')
}
}
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta')
}
}
'ember-source': await getChannelURL('beta'),
},
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary')
}
}
'ember-source': await getChannelURL('canary'),
},
},
},
// The default `.travis.yml` runs this scenario via `npm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
}),
},
npm: {
devDependencies: {}
}
devDependencies: {
'@ember/jquery': '^1.1.0',
},
},
},
{
name: 'ember-default-with-jquery',
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false,
}),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
}
]
'ember-source': '~3.28.0',
},
ember: {
edition: 'classic',
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
4 changes: 2 additions & 2 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = function(/* environment, appConfig */) {
return { };
module.exports = function (/* environment, appConfig */) {
return {};
};
11 changes: 9 additions & 2 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
// Add options here
'ember-fetch': {
Expand All @@ -18,5 +18,12 @@ module.exports = function(defaults) {
behave. You most likely want to be modifying `./index.js` or app's build file
*/

return app.toTree();
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
};
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const TEMPLATE_PATH = path.resolve(__dirname + '/assets/browser-fetch.js.t');
* global, but we can rely on the fact that Ember users are using modules.)
*/
module.exports = {
name: 'ember-fetch',
name: require('./package').name,

/*
* The `included` hook is invoked at the very beginning of the build process.
Expand Down
Loading
Loading