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

fix: exports field of package used deprecated syntax #4437

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Aug 19, 2023

☑️ Resolves

Fixes eslint issues of libraries using the package like:

"@nextcloud/vue/dist/Components/NcButton.js" is not found n/no-missing-import

Using directory exports is deprecated since Node 14, instead wildcard exports should be used.
This causes eslint-plugin-n to fail because it does not support the deprecated syntax.

See server PR as example of failing lint: https://github.com/nextcloud/server/actions/runs/5908640226/job/16028330790?pr=39970

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

Fixes eslint issues of libraries using the package like:
> "@nextcloud/vue/dist/Components/NcButton.js" is not found        n/no-missing-import

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux added 3. to review Waiting for reviews regression Regression of a previous working feature labels Aug 19, 2023
@susnux susnux added this to the 8.0.0 milestone Aug 19, 2023
Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

Looks correct according to the current documentation.

The API was deprecated since Node 16 (though, I have found neither mentions about deprecation in Node 14 nor mentions about trailing slash pattern support).

https://nodejs.org/docs/latest-v16.x/api/packages.html#subpath-folder-mappings

@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 22, 2023
@Pytal Pytal merged commit 402440a into master Aug 22, 2023
16 checks passed
@Pytal Pytal deleted the fix/exports branch August 22, 2023 00:32
@susnux
Copy link
Contributor Author

susnux commented Aug 22, 2023

@ShGKme

(though, I have found neither mentions about deprecation in Node 14 nor mentions about trailing slash pattern support).

See DEP0148: Deprecated since Node 14 and removed with Node 17:
https://nodejs.org/api/deprecations.html#dep0148-folder-mappings-in-exports-trailing-

@skjnldsv skjnldsv added the bug Something isn't working label Aug 24, 2023
@skjnldsv
Copy link
Contributor

Please set enhancement or bug label next time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working regression Regression of a previous working feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants