Skip to content

Commit

Permalink
Merge pull request #104 from villander/upgrate-octane
Browse files Browse the repository at this point in the history
Update addon to [email protected]
  • Loading branch information
rwjblue authored Jul 28, 2020
2 parents 2f7a652 + 656e48e commit 87c3225
Show file tree
Hide file tree
Showing 9 changed files with 2,178 additions and 384 deletions.
36 changes: 34 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,45 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
ecmaVersion: 2018,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
};
131 changes: 61 additions & 70 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,74 @@
/* eslint-env node */
module.exports = {
scenarios: [
{
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-8'
},
resolutions: {
'ember': 'lts-2-8'
'use strict';

const getChannelURL = require('ember-source-channel-url');

module.exports = async function() {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-release',
bower: {
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
{
name: 'ember-lts-3.8',
npm: {
devDependencies: {
'ember-source': '~3.8.0'
}
}
},
npm: {
devDependencies: {
'ember-source': null
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release')
}
}
}
},
{
name: 'ember-beta',
bower: {
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta')
}
}
},
npm: {
devDependencies: {
'ember-source': null
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary')
}
}
}
},
{
name: 'ember-canary',
bower: {
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
},
// The default `.travis.yml` runs this scenario via `yarn 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',
npm: {
devDependencies: {}
}
},
npm: {
devDependencies: {
'ember-source': null
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
]
};
};
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"broccoli-asset-rev": "^3.0.0",
"broccoli-test-helper": "^2.0.0",
"co": "^4.6.0",
"ember-cli": "~3.8.1",
"ember-cli": "~3.12.0",
"ember-cli-dependency-checker": "^3.1.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-htmlbars": "^3.0.1",
Expand All @@ -38,7 +38,8 @@
"ember-load-initializers": "^2.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^5.1.3",
"ember-source": "~2.14.1",
"ember-source": "~3.12.0",
"eslint-plugin-node": "^11.0.0",
"loader.js": "^4.7.0",
"mocha": "^6.0.2",
"test-generator-plugin": "link:./tests/dummy/lib/test-generator-plugin"
Expand All @@ -47,7 +48,7 @@
"broccoli-caching-writer": "^3.0.3",
"broccoli-funnel": "^2.0.2",
"broccoli-merge-trees": "^3.0.2",
"ember-cli-babel": "^7.5.0",
"ember-cli-babel": "^7.7.3",
"fs-extra": "^7.0.1",
"object-assign": "^4.1.0",
"walk-sync": "^1.1.3"
Expand Down
7 changes: 4 additions & 3 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ module.exports = {
mode: 'ci',
args: [
// --no-sandbox is needed when running Chrome inside a container
process.env.TRAVIS ? '--no-sandbox' : null,

'--disable-gpu',
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900'
].filter(Boolean)
Expand Down
20 changes: 1 addition & 19 deletions testem.sauce.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,11 @@ module.exports = {
"--url"
],
"protocol": "browser"
},
"SL_IE10": {
"exe": "./node_modules/.bin/ember-cli-sauce",
"args": [
"-b",
"internet explorer",
"-v",
"10",
"--visibility",
"public",
"--platform",
"Windows 8",
"--attach",
"--no-connect",
"--url"
],
"protocol": "browser"
}
},
"launch_in_ci": [
"SL_CHROME",
"SL_EDGE",
"SL_IE11",
"SL_IE10",
"SL_IE11"
]
};
21 changes: 18 additions & 3 deletions tests/dummy/app/initializers/router-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,30 @@ function initialize() {

hasRan = true;

//TODO: this reopen should be done outside of the initialize function
Ember.Router.reopen({
assetLoader: Ember.inject.service(),

_getHandlerFunction() {
const originalFunction = this._super(...arguments);
setupRouter() {
let isSetup = this._super(...arguments);
// Different versions of routerMicrolib use the names `getRoute` vs
// `getHandler`.
if (this._routerMicrolib.getRoute !== undefined) {
this._routerMicrolib.getRoute = this._handlerResolver(
this._routerMicrolib.getRoute.bind(this._routerMicrolib)
);
} else if (this._routerMicrolib.getHandler !== undefined) {
this._routerMicrolib.getHandler = this._handlerResolver(
this._routerMicrolib.getHandler.bind(this._routerMicrolib)
);
}
return isSetup;
},

_handlerResolver(original) {
return (name) => {
return this.get('assetLoader').loadBundle('test').then(() => {
return originalFunction(name);
return original(name);
});
};
}
Expand Down
21 changes: 21 additions & 0 deletions tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "ember-cli",
"version": "3.12.0",
"blueprints": [
{
"name": "addon",
"outputRepo": "https://github.com/ember-cli/ember-addon-output",
"codemodsSource": "ember-addon-codemods-manifest@1",
"isBaseBlueprint": true,
"options": [
"--yarn",
"--no-welcome"
]
}
]
}
]
}
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function(environment) {
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Expand Down
Loading

0 comments on commit 87c3225

Please sign in to comment.