Skip to content

Update types & ember to 4.x #1472

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

Merged
merged 4 commits into from
Feb 3, 2022

Conversation

mydea
Copy link
Contributor

@mydea mydea commented Jan 25, 2022

This PR updates all dev dependencies of types to their latest version, as far as possible.
It also updates the documentation for how to import/extend the TestContext type.

Closes #1470

@chriskrycho chriskrycho added BREAKING This is a breaking change! Do not merge without major version release. build Ideas for or bugs with the build process dependencies Pull requests that update a dependency file docs labels Jan 25, 2022
@chriskrycho
Copy link
Member

Thanks for this! I have been independently working on a similar branch, so this is great. I think it needs one more change: bumping the supported Node version everywhere it's specified (engines, CI, etc.) up to at least v12 – that will make the remaining CI jobs pass, I think.

@mydea
Copy link
Contributor Author

mydea commented Jan 26, 2022

I have updated node to 12 everywhere (and setup CI to use the pinned volta version, so this only needs to be set in a single place).

FYI I have also tried to update all other dev dependencies (basically yarn ember-cli-update etc.), but that lead to major issues with the tests. I think it has something to do with how ember-auto-import etc. works, and probably requires some more thought - e.g. the skeleton app for the build testing was not really outputting the given app/app.ts file at all, for whatever reason, but the generated dist/asets/skeleton-app.js file had a content like this:

'use strict';



;

;define('skeleton-app/config/environment', [], function() {
  var prefix = 'skeleton-app';
try {
  var metaName = prefix + '/config/environment';
  var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content');
  var config = JSON.parse(decodeURIComponent(rawConfig));

  var exports = { 'default': config };

  Object.defineProperty(exports, '__esModule', { value: true });

  return exports;
}
catch(err) {
  throw new Error('Could not read config from meta tag with name "' + metaName + '".');
}

});

;
          if (!runningTests) {
            require("skeleton-app/app")["default"].create({});
          }
        
//# sourceMappingURL=skeleton-app.map

If there is anybody is interesting in looking at what I've done so far, you can see it here:
https://github.com/mydea/ember-cli-typescript/tree/fn/update-ember-cli

@chriskrycho chriskrycho merged commit a9b1a37 into typed-ember:master Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING This is a breaking change! Do not merge without major version release. build Ideas for or bugs with the build process dependencies Pull requests that update a dependency file docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Types for ember-test-helpers are confusing
2 participants