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

(Real™ package™)™ #425

Merged
merged 11 commits into from
Jul 2, 2024
Merged

(Real™ package™)™ #425

merged 11 commits into from
Jul 2, 2024

Conversation

NullVoxPopuli
Copy link
Sponsor Contributor

@NullVoxPopuli NullVoxPopuli commented Mar 4, 2024

Replaces: #345

BREAKING:

  • requires ember-auto-import or embroider
  • drop support for ember-source < 3.28
  • drop support for ember-cli < 3.28

Maybe breaking:

Overall output:

❯ cat dist/index.js | wc -l
     142

❯ cat declarations/index.d.ts | wc -l
     160

A note on the diff:
image

image


a type=module packages is more of a real package than a v2 addon (currently) because v2 addons are often CJS masquerading as ESM. When a package.json does not have type=module specified, it's assumed that the .js extension means "Common JS" / require. This isn't great if we want to be better integrated with broader ecosystem tooling. So, since @ember/string does not depend on any ember APIs, it's actually a great candidate for using real ESM, ahead of auto-import/embroider releasing fixes for ESM "ember-addon" packages. (An ember-addon is a package with ember-addon in its keywords list)

Where'd the test-app go?

I deleted it. This work is under the assumption that, because we don't use anything from ember, and because vitest knows nothing about ember, some basic unit tests ensure that the package works, and would be compatible with all versions of ember that have ember-auto-import or are using embroider.

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review March 4, 2024 16:04
@NullVoxPopuli NullVoxPopuli changed the title Real package (Real™ package™)™ Mar 4, 2024
package.json Outdated Show resolved Hide resolved
"volta": {
"node": "12.22.3",
"yarn": "1.22.11"
"node": "20.11.1",
Copy link

Choose a reason for hiding this comment

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

Node is here v20, but in ci scripts v18... maybe its better to hold sync

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

good point -- node is actually irrelevant now, so I can clean up CI a bit, let it be defaults.

babel.config.json Outdated Show resolved Hide resolved
@ef4 ef4 added the breaking label Jul 2, 2024
@ef4 ef4 merged commit 16a5a0e into emberjs:master Jul 2, 2024
9 checks passed
@NullVoxPopuli NullVoxPopuli deleted the real-package branch July 2, 2024 16:19
@github-actions github-actions bot mentioned this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants