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

[v2 backport] Pass owner instead of registry to ember-data's setupContainer #1388

Open
wants to merge 2 commits into
base: v2-x
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
18 changes: 5 additions & 13 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: 10.x
- uses: volta-cli/action@v4
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn lint
- run: yarn test
Expand All @@ -31,9 +29,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: 12.x
- uses: volta-cli/action@v4
- run: yarn install --no-lockfile
- run: yarn test

Expand Down Expand Up @@ -64,17 +60,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: 12.x
- uses: volta-cli/action@v4
- name: install dependencies
run: yarn install --frozen-lockfile
- name: test
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup

types:
runs-on: ubuntu-latest

needs: test

strategy:
Expand All @@ -86,9 +80,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: 12.x
- uses: volta-cli/action@v4
- name: install dependencies
run: yarn install --frozen-lockfile
- name: install TS version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function (resolver: Resolver) {
// correctly for the tests; that's why we import and call setupContainer
// here; also see https://github.com/emberjs/data/issues/4071 for context
let setupContainer = require('ember-data/setup-container')['default'];
setupContainer(registry || container);
setupContainer(owner);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This likely needs some variety of version detection to pass the appropriate bits from Ember depending on its version (and potentially depending on the Ember Data version as well?). I don't have the relevant context there, but based on the test failures for older versions of Ember, I think that's the likely issue.

However, given v3 is out now, it is almost certainly better to upgrade to that instead of trying to do this, if at all possible!

}

return {
Expand Down
3 changes: 3 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ module.exports = async function () {
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
'@ember/string': '3.1.1',
},
},
},
Expand All @@ -108,6 +109,7 @@ module.exports = async function () {
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
'@ember/string': '3.1.1',
},
},
},
Expand All @@ -116,6 +118,7 @@ module.exports = async function () {
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
'@ember/string': '3.1.1',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
}
},
"volta": {
"node": "12.22.4",
"node": "14.21.3",
"yarn": "1.22.4"
},
"typesVersions": {
Expand Down