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

feat!: PackageJson and TsConfig traits #360

Merged
merged 10 commits into from
Jan 20, 2025

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Jan 18, 2025

This introduces PackageJson and TsConfig traits. The old structs have been renamed to PackageJsonSerde and TsConfigSerderespectively. Both are behind thefs_cachefeature flag now.serdeas a dependency has become optional and is only needed for thefs_cache` feature too.

For now, I have opted not to replace the FileSystem::read_to_string() method with trait-specific versions yet, since this functionality is now all encapsulated within the FsCache. Consumers that wish to use custom implementation of the manifest traits most likely want to use a custom cache altogether (I know this will be true for Biome at least), so I didn't see much reason for additional complexity and breaking changes there now.

I'm still working on a Biome PoC based on this, so I'll keep the PR on Draft until I can verify everything works. Feedback is certainly already welcome! Update: See biomejs/biome#4929

Copy link

codspeed-hq bot commented Jan 18, 2025

CodSpeed Performance Report

Merging #360 will not alter performance

Comparing arendjr:manifest-traits (28355ed) with main (2098f8a)

Summary

✅ 3 untouched benchmarks

@arendjr
Copy link
Contributor Author

arendjr commented Jan 20, 2025

Biome PR seems to be coming along well, so I think from our side this is good 👍

See: biomejs/biome#4929

@arendjr arendjr marked this pull request as ready for review January 20, 2025 16:23
@Boshen Boshen merged commit 7777d62 into oxc-project:main Jan 20, 2025
13 checks passed
@Boshen Boshen changed the title Manifest traits feat: PackageJson and TsConfig traits Jan 20, 2025
@Boshen Boshen changed the title feat: PackageJson and TsConfig traits feat!: PackageJson and TsConfig traits Jan 20, 2025
This was referenced Feb 10, 2025
Boshen pushed a commit that referenced this pull request Feb 10, 2025
## 🤖 New release

* `oxc_resolver`: 4.0.0 -> 4.0.1 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[4.0.0](oxc_resolver-v3.0.3...oxc_resolver-v4.0.0)
- 2025-01-20

### <!-- 0 -->Features

- [**breaking**] generic fs cache `type Resolver =
ResolverGeneric<FsCache<FileSystemOs>>` (#358)
- [**breaking**] `PackageJson` and `TsConfig` traits (#360)

### <!-- 2 -->Performance

- use papaya instead of dashmap (#356)
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants