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

Migrate lib/index to ESM #7159

Merged
merged 5 commits into from Sep 11, 2023
Merged

Migrate lib/index to ESM #7159

merged 5 commits into from Sep 11, 2023

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Aug 27, 2023

Which issue, if any, is this issue related to?

Ref #5291

Is there anything in the PR that needs further explanation?

This PR needs to wait for the merge of:

@changeset-bot
Copy link

changeset-bot bot commented Aug 27, 2023

⚠️ No Changeset found

Latest commit: 07f6c36

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

package.json Outdated Show resolved Hide resolved
@ybiquitous ybiquitous marked this pull request as ready for review September 7, 2023 22:55
@ybiquitous
Copy link
Member Author

This is now ready for review. 👌🏼

lib/index.mjs Show resolved Hide resolved
Copy link
Member

@mattxwang mattxwang left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your continued work on this!

@@ -3,21 +3,21 @@
const checkAgainstRule = require('./utils/checkAgainstRule.cjs');
const createPlugin = require('./createPlugin.cjs');
const createStylelint = require('./createStylelint.cjs');
const formatters = require('./formatters/index.cjs');
const index$1 = require('./formatters/index.cjs');
Copy link
Member

Choose a reason for hiding this comment

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

I'm definitely not the biggest fan of index and index$1, though since this is internal only to this file (i.e. it gets renamed on export as stylelint) and is auto-generated, I think this is fine (i.e. not merge-blocking).

I do wonder if we can set some sort of rollup configuration option to change how these identifiers are generated? But very low-priority work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I searched for an option you thought, but unfortunately, I cannot find it. (Please let me know if you find it instead 🙏🏼 )
https://rollupjs.org/configuration-options/

The simplest way could be to rename from formatters/index.mjs to formatters.mjs, but I'd like to avoid doing it for now so that we could easily trace commit history.

@ybiquitous ybiquitous merged commit ed3240f into v16 Sep 11, 2023
14 checks passed
@ybiquitous ybiquitous deleted the esm-index branch September 11, 2023 01:05
ybiquitous added a commit that referenced this pull request Sep 28, 2023
ybiquitous added a commit that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants