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

Bump deps, drop node 6 #348

Merged
merged 3 commits into from
Nov 3, 2019
Merged
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
24 changes: 9 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['ember'],
Expand All @@ -14,10 +15,11 @@ module.exports = {
Headers: 'off',
Request: 'off',
Response: 'off',
AbortController: 'off',
AbortController: 'off'
},
rules: {
'no-console': ["error", { allow: ['warn'] }]
'ember/no-jquery': 'error',
'no-console': ['error', { allow: ['warn'] }]
},
overrides: [
// TypeScript files
Expand All @@ -43,15 +45,9 @@ module.exports = {
'test/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon-test-support/**',
'addon/**',
'tests/dummy/app/**'
],
excludedFiles: ['app/**', 'addon-test-support/**', 'addon/**', 'tests/dummy/app/**'],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
Expand All @@ -64,11 +60,9 @@ module.exports = {
},
// node tests
{
files: [
'test/**/*.js',
],
files: ['test/**/*.js'],
env: {
mocha: true,
mocha: true
},
rules: {
'node/no-unpublished-require': 'off',
Expand Down
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "6"
- "8"

addons:
chrome: stable
Expand Down Expand Up @@ -41,8 +41,9 @@ jobs:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: "Additional Tests"
env: EMBER_TRY_SCENARIO=ember-lts-2.16
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ HTML5 [fetch](https://fetch.spec.whatwg.org) polyfill from [github](https://gith

* `ember install ember-fetch`

ember-fetch requries ember-cli 2.13 or above.

## Usage

```js
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ init:
environment:
MOCHA_REPORTER: "mocha-appveyor-reporter"
matrix:
- nodejs_version: "6"
- nodejs_version: "8"
- nodejs_version: "10"

Expand Down
138 changes: 68 additions & 70 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,81 @@

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

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary')
]).then((urls) => {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-2.16',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true })
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.16.0'
}
module.exports = async function() {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
},
{
name: 'ember-lts-2.18',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true })
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1',
'ember-source': '~2.18.0'
}
}
},
{
name: 'ember-lts-3.8',
npm: {
devDependencies: {
'ember-source': '~3.8.0'
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
{
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-source': '~3.12.0'
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release')
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta')
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'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',
npm: {
devDependencies: {}
}
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
]
};
});
}
]
};
};
31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,28 @@
"broccoli-debug": "^0.6.5",
"broccoli-merge-trees": "^3.0.0",
"broccoli-rollup": "^2.1.1",
"broccoli-stew": "^2.1.0",
"broccoli-stew": "^3.0.0",
"broccoli-templater": "^2.0.1",
"calculate-cache-key-for-tree": "^2.0.0",
"caniuse-api": "^3.0.0",
"ember-cli-babel": "^6.8.2",
"ember-cli-babel": "^7.10.0",
"ember-cli-typescript": "^2.0.2",
"node-fetch": "^2.6.0",
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"@ember/optional-features": "^0.7.0",
"@types/ember": "^3.1.0",
"@types/ember-data": "^3.1.7",
"@types/ember-qunit": "^3.4.6",
"@types/ember-test-helpers": "^1.0.5",
"@types/ember-testing-helpers": "^0.0.3",
"@types/ember__test-helpers": "^0.7.8",
"@types/qunit": "^2.9.0",
"@types/rsvp": "^4.0.2",
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"@types/rsvp": "^4.0.3",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"babel-eslint": "^10.0.2",
"broccoli-asset-rev": "^3.0.0",
"broccoli-test-helper": "^2.0.0",
"chai": "^4.1.2",
Expand All @@ -56,37 +59,37 @@
"ember-cli": "~3.9.0",
"ember-cli-addon-tests": "^0.11.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-fastboot": "^2.1.1",
"ember-cli-fastboot": "^2.1.3",
"ember-cli-htmlbars": "^3.0.1",
"ember-cli-inject-live-reload": "^2.0.1",
"ember-cli-pretender": "^3.1.1",
"ember-cli-qunit": "^4.3.2",
"ember-cli-release": "^0.2.9",
"ember-cli-typescript": "^1.5.0",
"ember-cli-uglify": "^2.0.0",
"ember-cli-typescript-blueprints": "^2.0.0",
"ember-cli-uglify": "^3.0.0",
"ember-data": "~3.10.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-load-initializers": "^2.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^5.1.3",
"ember-source": "~3.11.0",
"ember-source-channel-url": "^1.0.1",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.2.1",
"eslint": "^5.16.0",
"eslint-plugin-ember": "^6.7.0",
"eslint-plugin-node": "^8.0.0",
"eslint": "^6.1.0",
"eslint-plugin-ember": "^6.9.1",
"eslint-plugin-node": "^9.1.0",
"fs-extra": "^8.0.1",
"glob": "^7.1.4",
"lerna-changelog": "^0.8.2",
"loader.js": "^4.2.3",
"mocha": "^6.1.4",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"resolutions": {
"**/engine.io": "~3.3.0"
},
"engines": {
"node": "6.* || 8.* || >= 10"
"node": "8.* || >= 10"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/root-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { setupApplicationTest } from 'ember-qunit';
import { visit, click, find, currentRouteName } from '@ember/test-helpers';
import Pretender from 'pretender';
import fetch from 'fetch';
import $ from 'jquery';

var server;

module('Acceptance: Root', function(hooks) {
Expand All @@ -29,8 +29,8 @@ module('Acceptance: Root', function(hooks) {
await visit('/');

assert.equal(currentRouteName(), 'index');
assert.equal($.trim($('.fetch').text()), 'Hello World! fetch');
assert.equal($.trim($('.ajax').text()), 'Hello World! ajax');
assert.equal(this.element.querySelector('.fetch').textContent.trim(), 'Hello World! fetch');
assert.equal(this.element.querySelector('.ajax').textContent.trim(), 'Hello World! ajax');
});

test('posting a string', function(assert) {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"alwaysStrict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
Expand Down Expand Up @@ -42,4 +43,4 @@
"test-support/**/*",
"addon-test-support/**/*"
]
}
}
6 changes: 6 additions & 0 deletions types/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Types for compiled templates
declare module 'ember-fetch/templates/*' {
import { TemplateFactory } from 'htmlbars-inline-precompile';
const tmpl: TemplateFactory;
export default tmpl;
}
Loading