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

[BUGFIX]: Fix errors while running yarn start #7146

Merged
merged 3 commits into from
May 10, 2020
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
2 changes: 1 addition & 1 deletion packages/-ember-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"build": "ember build",
"build:production": "ember build --environment=production",
"start": "ember server",
"start": "ember serve",
"docs": "mkdir -p dist && ember ember-cli-yuidoc",
"test": "ember test",
"test:all": "ember try:each",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ module('@ember-data/model klass.modelName', function(hooks) {
assert.strictEqual(
startsWith(e.message, `Cannot assign to read only property 'modelName' of `) ||
// IE11 has a different message
startsWith(e.message, `Assignment to read-only properties is not allowed in strict mode`),
startsWith(e.message, `Assignment to read-only properties is not allowed in strict mode`) ||
// Safari aso has a different message
startsWith(e.message, `Attempted to assign to readonly property`),
true,
`modelName is immutable: ${e.message}`
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DEBUG } from '@glimmer/env';

import { skip, test } from 'qunit';

import VERSION, { COMPAT_VERSION } from '@ember-data/unpublished-test-infra/version';
import VERSION, { COMPAT_VERSION } from '@ember-data/unpublished-test-infra/test-support/version';

// small comparison function for major and minor semver values
function gte(EDVersion, DeprecationVersion) {
Expand Down
16 changes: 8 additions & 8 deletions packages/unpublished-test-infra/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

// eslint-disable-next-line node/no-unpublished-require
const merge = require('broccoli-merge-trees');
const version = require('@ember-data/private-build-infra/src/create-version-module');
const addonBuildConfigForDataPackage = require('@ember-data/private-build-infra/src/addon-build-config-for-data-package');

Expand All @@ -8,12 +9,11 @@ const name = require('./package').name;
const addonBaseConfig = addonBuildConfigForDataPackage(name);

module.exports = Object.assign({}, addonBaseConfig, {
treeForAddon() {
if (process.env.EMBER_CLI_TEST_COMMAND) {
const options = this.getEmberDataConfig();
let compatVersion = options.compatWith;
let tree = version(compatVersion);
return this.debugTree(this._super.treeForAddon.call(this, tree), 'addon-output');
}
treeForAddonTestSupport(existingTree) {
const options = this.getEmberDataConfig();
let compatVersion = options.compatWith;
let tree = merge([existingTree, version(compatVersion)]);

return this.debugTree(this._super.treeForAddonTestSupport.call(this, tree), 'test-support');
},
});
1 change: 1 addition & 0 deletions packages/unpublished-test-infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"testem": "^3.0.3"
},
"devDependencies": {
"broccoli-merge-trees": "^4.2.0",
"@ember/optional-features": "^1.3.0",
"ember-cli": "~3.18.0",
"ember-cli-dependency-checker": "^3.2.0",
Expand Down