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

Upgrade to Ember 3.28 #448

Merged
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
30 changes: 14 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,15 @@ module.exports = {
// node files
{
files: [
'.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: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
'tests/dummy/config/scenarios.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',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -56,5 +49,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ jobs:
fail-fast: true
matrix:
ember-try-scenario: [
ember-lts-3.16,
ember-lts-3.20,
ember-lts-3.24,
ember-release,
ember-beta,
ember-default-with-jquery,
ember-classic
ember-classic,
]
allow-failure: [false]
include:
Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand All @@ -17,6 +19,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`
* `yarn lint`
* `yarn lint:fix`

## Running tests

Expand Down
14 changes: 14 additions & 0 deletions config/deprecation-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,19 @@ self.deprecationWorkflow.config = {
{ handler: 'silence', matchId: 'ember-runtime.deprecate-copy-copyable' },
{ handler: 'silence', matchId: 'array.new-array-wrapper' },
{ handler: 'silence', matchId: 'object.new-constructor' },
{
handler: 'silence',
matchId: 'deprecated-run-loop-and-computed-dot-access',
},
{ handler: 'silence', matchId: 'ember-source.deprecation-without-for' },
{ handler: 'silence', matchId: 'ember-source.deprecation-without-since' },
{ handler: 'silence', matchId: 'deprecate-fetch-ember-data-support' },
{ handler: 'silence', matchId: 'this-property-fallback' },
{ handler: 'silence', matchId: 'implicit-injections' },
{
handler: 'silence',
matchId: 'ember.built-in-components.legacy-arguments',
},
{ handler: 'silence', matchId: 'routing.transition-methods' },
],
};
10 changes: 6 additions & 4 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ module.exports = async function () {
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 All @@ -32,6 +32,7 @@ module.exports = async function () {
},
{
name: 'ember-beta',
allowedToFail: true,
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
Expand All @@ -40,6 +41,7 @@ module.exports = async function () {
},
{
name: 'ember-canary',
allowedToFail: true,
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
Expand Down
7 changes: 7 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ module.exports = function (defaults) {
},
});

/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/

return app.toTree();
};
40 changes: 21 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"homepage": "https://github.com/adopted-ember-addons/ember-data-factory-guy",
"scripts": {
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"build": "ember build --environment=production",
Expand All @@ -22,34 +22,35 @@
"test:ember-compatibility": "ember try:each"
},
"engines": {
"node": "10.* || >= 12"
"node": "12.* || 14.* || >= 16"
},
"license": "MIT",
"dependencies": {
"broccoli-funnel": "^3.0.4",
"broccoli-merge-trees": "^4.2.0",
"ember-auto-import": "^1.11.2",
"ember-cli-babel": "^7.26.3",
"ember-auto-import": "^1.11.3",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"pretender": "^3.4.3",
"resolve": "^1.20.0",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.1.4",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@ember/test-helpers": "^2.4.2",
"@embroider/test-setup": "^0.43.5",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"active-model-adapter": "^2.2.0",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.11.2",
"ember-cli": "~3.24.0",
"ember-cli": "~3.28.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-deprecation-workflow": "^1.0.1",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-terser": "^4.0.2",
"ember-data": "~3.9",
"ember-data-model-fragments": "^4.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
Expand All @@ -58,24 +59,25 @@
"ember-inflector": "^4.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-page-title": "^6.0.3",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-sinon": "5.0.0",
"ember-source": "~3.24.0",
"ember-source": "~3.28.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.15.0",
"ember-template-lint": "^3.6.0",
"ember-test-selectors": "^5.0.0",
"ember-try": "^1.4.0",
"eslint": "^7.24.0",
"eslint-config-prettier": "^8.2.0",
"eslint-plugin-ember": "^10.1.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"loader.js": "4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.13.0",
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^1.6.0"
},
"resolutions": {
Expand Down
5 changes: 0 additions & 5 deletions tests/.eslintrc.js

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/components/single-user.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Projects:
{{/each}}
</ul>

{{input class="project-title" type="textbox" value=this.projectTitle}}
<label>Project title{{input class="project-title" type="textbox" value=this.projectTitle}}</label>
<button class="add-project" type="button" {{action 'addProject' user projectTitle}}>Add Project</button>
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/components/user-search.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div>Search For User:</div>
{{input class="user-name" type="textbox" value=this.userName}}
<label>Username: {{input class="user-name" type="textbox" value=this.userName}}</label>
<button class="find-user" type="button" {{action "findUsers" userName}}>Go</button>
2 changes: 1 addition & 1 deletion tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.24.0",
"version": "3.28.0",
"blueprints": [
{
"name": "addon",
Expand Down
15 changes: 15 additions & 0 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ const browsers = [
'last 1 Safari versions',
];

// 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,
};
2 changes: 1 addition & 1 deletion 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/dummy.js"></script>
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/active-model-adapter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ module(serializer, function (hooks) {

await run(async () => profile.save());

assert.ok(profile.get('camelCaseDescription') === customDescription);
assert.strictEqual(
profile.get('camelCaseDescription'),
customDescription
);
});
});

Expand Down
1 change: 1 addition & 0 deletions tests/unit/drf-adapter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module(serializer, function (hooks) {
// drf serializer takes the previous and next and extracts the page number
// so this needed it's own test
test('with proxy payload', function (assert) {
assert.expect(1);
run(() => {
let done = assert.async();
let json = buildList('profile', 2).add({
Expand Down
Loading