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: correct types field in package.json #184

Merged
merged 1 commit into from
Mar 10, 2025
Merged

fix: correct types field in package.json #184

merged 1 commit into from
Mar 10, 2025

Conversation

fasttime
Copy link
Member

@fasttime fasttime commented Mar 8, 2025

This PR fixes an incorrect path in the types field in packages.json, originally reported in #183. I think the incorrect types field would only cause a problem on old versions of TypeScript (<4.5) that don't honor the exports field, but since the types field is there it should be corrected.

Repro

I also noticed that Rollup is issuing warnings during the build because of undeclared external modules that had recently the node: prefix added (see output below), and I updated the Rollup config to remove the warnings.

$ npm run build    

> @eslint/[email protected] build
> rollup -c && node -e "fs.copyFileSync('./lib/types/index.d.ts', './dist/eslintrc.d.cts')"


./lib/index.js → dist/eslintrc.cjs...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
node:fs (imported by lib/config-array-factory.js)
node:module (imported by lib/config-array-factory.js, lib/shared/relative-module-resolver.js)
node:path (imported by lib/config-array-factory.js, lib/cascading-config-array-factory.js, lib/config-array/ignore-pattern.js, lib/config-array/override-tester.js, lib/flat-compat.js, lib/shared/deprecation-warnings.js)
node:os (imported by lib/cascading-config-array-factory.js)
node:util (imported by lib/config-array/config-dependency.js, lib/config-array/override-tester.js, lib/shared/config-validator.js)
node:assert (imported by lib/config-array/ignore-pattern.js, lib/config-array/override-tester.js)
created dist/eslintrc.cjs in 64ms

./lib/index-universal.js → dist/eslintrc-universal.cjs...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
node:util (imported by lib/shared/config-validator.js)
node:path (imported by lib/shared/deprecation-warnings.js)
created dist/eslintrc-universal.cjs in 13ms

refs #183

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Mar 8, 2025
@fasttime fasttime marked this pull request as ready for review March 8, 2025 18:59
Copy link
Member

@nzakas nzakas 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.

@nzakas nzakas merged commit 2f4cf3f into main Mar 10, 2025
13 checks passed
@nzakas nzakas deleted the fix-types-field branch March 10, 2025 14:23
@github-actions github-actions bot mentioned this pull request Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

2 participants