Skip to content

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/eslintrc@3.3.0 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
@fasttime fasttime added this to Triage Mar 8, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Mar 8, 2025
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
@github-project-automation github-project-automation bot moved this from Needs Triage to Complete in Triage Mar 10, 2025
@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.

3 participants