Skip to content

Comments

fix(resolve): handle package.json with UTF-8 BOM#19000

Merged
sapphi-red merged 3 commits intovitejs:mainfrom
SeraphimKaito:fix/issues-18911
Dec 24, 2024
Merged

fix(resolve): handle package.json with UTF-8 BOM#19000
sapphi-red merged 3 commits intovitejs:mainfrom
SeraphimKaito:fix/issues-18911

Conversation

@SeraphimKaito
Copy link
Contributor

fix #18911

Description

Fix package.json BOM handling in loadPackageData

Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Would you also add a test case in playground/resolve/package.json?

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Dec 18, 2024
@SeraphimKaito
Copy link
Contributor Author

Thank you for the PR! Would you also add a test case in playground/resolve/package.json?

of course.

@SeraphimKaito SeraphimKaito force-pushed the fix/issues-18911 branch 2 times, most recently from 7c97a37 to e2736a1 Compare December 18, 2024 12:10
@sapphi-red sapphi-red changed the title fix(node): stripe bom fix: handle package.json with UTF-8 BOM Dec 19, 2024
@sapphi-red sapphi-red changed the title fix: handle package.json with UTF-8 BOM fix(resolve): handle package.json with UTF-8 BOM Dec 19, 2024
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Thanks!

@sapphi-red sapphi-red merged commit 902567a into vitejs:main Dec 24, 2024
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 26, 2024
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | vite    | 6.0.5 | 6.0.6 |


## [v6.0.6](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small606-2024-12-26-small)

-   fix: replace runner-side path normalization with `fetchModule`-side resolve ([#18361](vitejs/vite#18361)) ([9f10261](vitejs/vite@9f10261)), closes [#18361](vitejs/vite#18361)
-   fix(css): resolve style tags in HTML files correctly for lightningcss ([#19001](vitejs/vite#19001)) ([afff05c](vitejs/vite@afff05c)), closes [#19001](vitejs/vite#19001)
-   fix(css): show correct error when unknown placeholder is used for CSS modules pattern in lightningcs ([9290d85](vitejs/vite@9290d85)), closes [#19070](vitejs/vite#19070)
-   fix(resolve): handle package.json with UTF-8 BOM ([#19000](vitejs/vite#19000)) ([902567a](vitejs/vite@902567a)), closes [#19000](vitejs/vite#19000)
-   fix(ssrTransform): preserve line offset when transforming imports ([#19004](vitejs/vite#19004)) ([1aa434e](vitejs/vite@1aa434e)), closes [#19004](vitejs/vite#19004)
-   chore: fix typo in comment ([#19067](vitejs/vite#19067)) ([eb06ec3](vitejs/vite@eb06ec3)), closes [#19067](vitejs/vite#19067)
-   chore: update comment about `build.target` ([#19047](vitejs/vite#19047)) ([0e9e81f](vitejs/vite@0e9e81f)), closes [#19047](vitejs/vite#19047)
-   revert: unpin esbuild version ([#19043](vitejs/vite#19043)) ([8bfe247](vitejs/vite@8bfe247)), closes [#19043](vitejs/vite#19043)
-   test(ssr): test virtual module with query ([#19044](vitejs/vite#19044)) ([a1f4b46](vitejs/vite@a1f4b46)), closes [#19044](vitejs/vite#19044)
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2-edge-case Bug, but has workaround or limited in scope (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UTF-8 with BOM is not parsed correctly in imported package.json

2 participants