KEMBAR78
feat: merge from upstream `oxc-project/oxc-resolver` - 3rd by JounQin · Pull Request #62 · unrs/unrs-resolver · GitHub
Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Apr 11, 2025

close #30


Important

This PR adds RISC-V support, refactors tsconfig handling for better path resolution, and updates dependencies and configurations.

  • New Features:
    • Added RISC-V target architecture support in .github/workflows/release-napi.yml and npm/package.json.
    • Introduced new tsconfig files for enhanced module resolution and aliasing in fixtures/tsconfig/cases/paths_template_variable/.
  • Refactor:
    • Refactored TsConfig trait in src/tsconfig.rs to handle ${configDir} template variable and improve path resolution.
    • Updated get_tsconfig() in src/fs_cache.rs to use build() method for tsconfig processing.
  • Chores:
    • Updated dependencies in Cargo.lock and Cargo.toml.
    • Improved error handling in .github/workflows/release-plz.yml by updating release-plz-action version.
    • Cleaned up author information in Cargo.toml.

This description was created by Ellipsis for b7830b8. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • New Features

    • Expanded platform support by adding a new target architecture for RISC-V.
    • Introduced new configuration files to enhance module resolution and aliasing.
  • Chores

    • Improved deployment workflows with stricter error handling and updated tooling.
    • Cleaned up redundant configuration files and updated author information.
  • Refactor

    • Standardized module path references in configuration and tests to streamline resolution.
    • Updated paths in TypeScript configurations to reflect new directory structures.

renovate bot and others added 6 commits April 6, 2025 18:05
This PR contains the following updates:

| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |  |  |  |  |
| [@napi-rs/cli](https://redirect.github.com/napi-rs/napi-rs) |
devDependencies | patch | [`3.0.0-alpha.76` ->
`3.0.0-alpha.77`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.76/3.0.0-alpha.77)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.77?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.77?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.76/3.0.0-alpha.77?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.76/3.0.0-alpha.77?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [@napi-rs/wasm-runtime](https://redirect.github.com/napi-rs/napi-rs)
([source](https://redirect.github.com/napi-rs/napi-rs/tree/HEAD/wasi-runtime))
| devDependencies | patch | [`0.2.7` ->
`0.2.8`](https://renovatebot.com/diffs/npm/@napi-rs%2fwasm-runtime/0.2.7/0.2.8)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fwasm-runtime/0.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fwasm-runtime/0.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fwasm-runtime/0.2.7/0.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fwasm-runtime/0.2.7/0.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/node](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| devDependencies | minor | [`22.13.14` ->
`22.14.0`](https://renovatebot.com/diffs/npm/@types%2fnode/22.13.14/22.14.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/22.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/22.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/22.13.14/22.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/22.13.14/22.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pnpm](https://pnpm.io)
([source](https://redirect.github.com/pnpm/pnpm/tree/HEAD/pnpm)) |
packageManager | patch | [`10.7.0` ->
`10.7.1`](https://renovatebot.com/diffs/npm/pnpm/10.7.0/10.7.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/10.7.0/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/10.7.0/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [typescript](https://www.typescriptlang.org/)
([source](https://redirect.github.com/microsoft/TypeScript)) |
devDependencies | patch | [`5.8.2` ->
`5.8.3`](https://renovatebot.com/diffs/npm/typescript/5.8.2/5.8.3) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.8.2/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.8.2/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://redirect.github.com/vitest-dev/vitest)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| devDependencies | minor | [`3.0.9` ->
`3.1.1`](https://renovatebot.com/diffs/npm/vitest/3.0.9/3.1.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/3.0.9/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/3.0.9/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary>

###
[`v3.0.0-alpha.77`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.76...@napi-rs/cli@3.0.0-alpha.77)

[Compare
Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.76...@napi-rs/cli@3.0.0-alpha.77)

</details>

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/wasm-runtime)</summary>

###
[`v0.2.8`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/wasm-runtime@0.2.7...@napi-rs/wasm-runtime@0.2.8)

[Compare
Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/wasm-runtime@0.2.7...@napi-rs/wasm-runtime@0.2.8)

</details>

<details>
<summary>pnpm/pnpm (pnpm)</summary>

###
[`v10.7.1`](https://redirect.github.com/pnpm/pnpm/releases/tag/v10.7.1):
pnpm 10.7.1

[Compare
Source](https://redirect.github.com/pnpm/pnpm/compare/v10.7.0...v10.7.1)

#### Patch Changes

- `pnpm config set` should convert the settings to their correct type
before adding them to `pnpm-workspace.yaml`
[#&#8203;9355](https://redirect.github.com/pnpm/pnpm/issues/9355).
- `pnpm config get` should read auth related settings via npm CLI
[#&#8203;9345](https://redirect.github.com/pnpm/pnpm/issues/9345).
- Replace leading `~/` in a path in `.npmrc` with the home directory
[#&#8203;9217](https://redirect.github.com/pnpm/pnpm/issues/9217).

#### Platinum Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
<a href="https://bit.dev/?utm_source=pnpm&utm_medium=release_notes"
target="_blank"><img src="https://pnpm.io/img/users/bit.svg" width="80"
alt="Bit"></a>
      </td>
      <td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes"
target="_blank"><img src="https://pnpm.io/img/users/sanity.svg"
width="180" alt="Bit"></a>
      </td>
      <td align="center" valign="middle">
<a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/syntaxfm.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
<img src="https://pnpm.io/img/users/syntaxfm.svg" width="90"
alt="Syntax" />
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>

#### Gold Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220"
alt="Discord" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://uscreen.de/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/uscreen.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/uscreen_light.svg" />
<img src="https://pnpm.io/img/users/uscreen.svg" width="180"
alt="u|screen" />
          </picture>
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a
href="https://www.jetbrains.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/jetbrains.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/jetbrains.svg" />
<img src="https://pnpm.io/img/users/jetbrains.svg" width="180"
alt="JetBrains" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/nx.svg?0" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/nx_light.svg?0" />
<img src="https://pnpm.io/img/users/nx.svg" width="70" alt="Nx" />
          </picture>
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a
href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220"
alt="CodeRabbit" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://route4me.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
<img src="https://pnpm.io/img/users/route4me.svg" width="220"
alt="Route4Me" />
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190"
alt="Workleap" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a
href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190"
alt="Stackblitz" />
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>

</details>

<details>
<summary>microsoft/TypeScript (typescript)</summary>

###
[`v5.8.3`](https://redirect.github.com/microsoft/TypeScript/compare/v5.8.2...68cead182cc24afdc3f1ce7c8ff5853aba14b65a)

[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.8.2...68cead182cc24afdc3f1ce7c8ff5853aba14b65a)

</details>

<details>
<summary>vitest-dev/vitest (vitest)</summary>

###
[`v3.1.1`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v3.1.1)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v3.1.0...v3.1.1)

#####    🐞 Bug Fixes

-   **reporter**:
- Report tests in correct order  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7752](https://redirect.github.com/vitest-dev/vitest/issues/7752)
[<samp>(b166e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b166efa2)
- Print test only once in the verbose mode  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7738](https://redirect.github.com/vitest-dev/vitest/issues/7738)
[<samp>(69ca4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/69ca425c)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v3.1.0...v3.1.1)

###
[`v3.1.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v3.1.0)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v3.0.9...v3.1.0)

##### 🚀 Features

- Introduce `%$` option to add number of the test to its title - by
[@&#8203;kemuridama](https://redirect.github.com/kemuridama) in
[https://github.com/vitest-dev/vitest/issues/7412](https://redirect.github.com/vitest-dev/vitest/issues/7412)
[<samp>(df347)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/df3477076)
- Add `diff.maxDepth` option and set non-`Infinity` value as a default
to reduce crash - by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7481](https://redirect.github.com/vitest-dev/vitest/issues/7481)
[<samp>(eacab)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/eacab25e7)
- Allow array element for `test.each/for` title formatting - by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7522](https://redirect.github.com/vitest-dev/vitest/issues/7522)
[<samp>(ea3d6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ea3d67b03)
- Add "configureVitest" plugin hook - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/7349](https://redirect.github.com/vitest-dev/vitest/issues/7349)
[<samp>(20a5d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/20a5d4bfc)
- Support `--configLoader` CLI option - by
[@&#8203;Carnageous](https://redirect.github.com/Carnageous) and
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7574](https://redirect.github.com/vitest-dev/vitest/issues/7574)
[<samp>(2a852)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2a8520a83)
- Added `vitest-browser-lit` to `vitest init browser` and docs - by
[@&#8203;EskiMojo14](https://redirect.github.com/EskiMojo14) and
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7705](https://redirect.github.com/vitest-dev/vitest/issues/7705)
[<samp>(5659a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5659a0e0c)
- Use providers request interception for module mocking - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7576](https://redirect.github.com/vitest-dev/vitest/issues/7576)
[<samp>(7883a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7883acd63)
-   **browser**:
- Introduce `and`, `or` and `filter` locators - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/7463](https://redirect.github.com/vitest-dev/vitest/issues/7463)
[<samp>(63949)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/63949b1d7)
-   **reporter**:
- Always render test time - by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) and
[@&#8203;spamshaker](https://redirect.github.com/spamshaker) in
[https://github.com/vitest-dev/vitest/issues/7529](https://redirect.github.com/vitest-dev/vitest/issues/7529)
[<samp>(5eba6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5eba60ae1)
- `--silent=passed-only` to log failed tasks only - by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/7530](https://redirect.github.com/vitest-dev/vitest/issues/7530)
[<samp>(f9e1c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f9e1cb494)
-   **runner**:
- Add `test.scoped` to override `test.extend` fixtures per-suite - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7233](https://redirect.github.com/vitest-dev/vitest/issues/7233)
[<samp>(e5851)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e5851e4b8)
-   **vitest**:
- Allow conditional `context.skip(boolean)` - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/7659](https://redirect.github.com/vitest-dev/vitest/issues/7659)
[<samp>(6adec)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6adecb903)
- Support rolldown-vite in NormalizeUrlPlugin - by
[@&#8203;sapphi-red](https://redirect.github.com/sapphi-red) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7739](https://redirect.github.com/vitest-dev/vitest/issues/7739)
[<samp>(1ef31)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1ef31a7bb)

##### 🐞 Bug Fixes

- Update test stats regularly - by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7700](https://redirect.github.com/vitest-dev/vitest/issues/7700)
[<samp>(b7953)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b7953487b)
- Fix vm tests flakiness - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7741](https://redirect.github.com/vitest-dev/vitest/issues/7741)
[<samp>(2702c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2702cf424)
- Set `diff.expand: false` as default - by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7697](https://redirect.github.com/vitest-dev/vitest/issues/7697)
[<samp>(f3420)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f34206536)
-   **browser**:
- Correctly calculate timeout in hooks when actions are performed - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7747](https://redirect.github.com/vitest-dev/vitest/issues/7747)
[<samp>(a5505)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a55055180)
-   **deps**:
- Update all non-major dependencies - by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7600](https://redirect.github.com/vitest-dev/vitest/issues/7600)
[<samp>(7fc5a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7fc5a2908)
-   **reporter**:
- `--hideSkippedTests` should hide suites too - by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/7695](https://redirect.github.com/vitest-dev/vitest/issues/7695)
[<samp>(ba9b5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ba9b51ccc)
- Report tests in correct order - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7752](https://redirect.github.com/vitest-dev/vitest/issues/7752)
[<samp>(b166e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b166efa28)
- Print test only once in the verbose mode - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7738](https://redirect.github.com/vitest-dev/vitest/issues/7738)
[<samp>(69ca4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/69ca425c6)
-   **snapshot**:
- Fix indent normalization - by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/7400](https://redirect.github.com/vitest-dev/vitest/issues/7400)
[<samp>(82997)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8299709d2)
- This change can cause small amount of very old snapshots to be
updated, but there will be no functional change to how they work.

##### 🏎 Performance

- **browser**: Fork jest-dom instead of bundling it - by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/7605](https://redirect.github.com/vitest-dev/vitest/issues/7605)
[<samp>(12762)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/12762ea6c)

##### [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v3.0.9...v3.1.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 8am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc-resolver).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |
| [mimalloc-safe](https://redirect.github.com/napi-rs/mimalloc-safe) |
dependencies | patch | `0.1.49` -> `0.1.50` |
| [indexmap](https://redirect.github.com/indexmap-rs/indexmap) |
dependencies | minor | `2.8.0` -> `2.9.0` |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>napi-rs/mimalloc-safe (mimalloc-safe)</summary>

###
[`v0.1.50`](https://redirect.github.com/napi-rs/mimalloc-safe/compare/v0.1.49...v0.1.50)

[Compare
Source](https://redirect.github.com/napi-rs/mimalloc-safe/compare/v0.1.49...v0.1.50)

</details>

<details>
<summary>indexmap-rs/indexmap (indexmap)</summary>

###
[`v2.9.0`](https://redirect.github.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#290-2025-04-04)

[Compare
Source](https://redirect.github.com/indexmap-rs/indexmap/compare/2.8.0...2.9.0)

- Added a `get_disjoint_mut` method to `IndexMap`, matching Rust 1.86's
    `HashMap` method.
- Added a `get_disjoint_indices_mut` method to `IndexMap` and
`map::Slice`,
    matching Rust 1.86's `get_disjoint_mut` method on slices.
- Deprecated the `borsh` feature in favor of their own `indexmap`
feature,
    solving a cyclic dependency that occured via `borsh-derive`.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 8am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc-resolver).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fixes #447

I took the opportunity to refactor and improve tsconfig extend.
@JounQin JounQin added the upstream Blocked by upstream label Apr 11, 2025
@JounQin JounQin requested a review from Copilot April 11, 2025 11:03
@coderabbitai
Copy link

coderabbitai bot commented Apr 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request updates several configuration and source files. Changes include the addition of a build configuration for the RISC-V architecture in GitHub Actions workflows, updates to TypeScript configuration files reflecting new directory structures and template handling, and improvements to the tsconfig and artifact upload logic. Additionally, redundant configuration files are removed, metadata in Cargo.toml is updated, and support for the new RISC-V target is added in npm/package.json.

Changes

File(s) Change Summary
.github/workflows/release-napi.yml
.github/workflows/release-plz.yml
In release-napi.yml, added if-no-files-found: error to the artifact upload step; in release-plz.yml, updated the release-plz-action version from v0.5 to v0.5.103.
fixtures/tsconfig/cases/paths_template_variable/* Updated the module path in tsconfig.json from "${configDir}/foo.js" to "${configDir}/src/foo.js"; removed tsconfig1.json; added new configuration files (tsconfig_base_url1.json, tsconfig_base_url2.json, tsconfig_extends[1-4].json) for base URL and template extending.
fixtures/tsconfig/tsconfig.json* In tsconfig.json, updated the "ts-path" mapping from ["foo.js"] to ["src/foo.js"]; updated tsconfig_template_variable1.json path for "foo"; added new template files (tsconfig_template_variable2.json, tsconfig_template_variable3.json, tsconfig_template_variable4.json) with compiler options.
fixtures/tsconfig/cases/project_references/app/tsconfig.json Updated the "references" array path from "../../paths_template_variable/tsconfig2.json" to "../../paths_template_variable/tsconfig.json".
napi/Cargo.toml
npm/package.json
Removed the [package.metadata.cargo-machete] section in napi/Cargo.toml; added "riscv64gc-unknown-linux-gnu" to the napi.targets array in npm/package.json.
src/fs_cache.rs
src/tests/tsconfig_paths.rs
src/tests/tsconfig_project_references.rs
src/tsconfig.rs
src/tsconfig_serde.rs
In fs_cache.rs, replaced the call to expand_template_variables() with build() in get_tsconfig; in tests, renamed function from tsconfig to tsconfig_resolve and updated expected file paths; in tsconfig.rs, removed expand_template_variables, added a new constant TEMPLATE_VARIABLE and methods build and substitute_template_variable, and updated trait bounds; in tsconfig_serde.rs, removed logic for base URL normalization and paths_base assignment.
Cargo.toml Updated the authors field from ["UnRS"] to ["JounQin <admin@1stg.me> (https://www.1stG.me)"].

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant FsCache
    participant TsConfig
    Caller->>FsCache: get_tsconfig(root, path, callback)
    FsCache->>TsConfig: Load tsconfig from file
    TsConfig->>TsConfig: build() (resolve template variables, adjust baseUrl/paths)
    TsConfig-->>FsCache: Return built tsconfig
    FsCache-->>Caller: Return Arc-wrapped tsconfig
Loading

Assessment against linked issues

Objective Addressed Explanation
Add support for riscv64gc-unknown-linux-gnu target (#30)

Possibly related PRs

Poem

I'm a rabbit with code in my hop,
Leaping through configs that never stop,
New targets and paths now dancing in play,
With every build, I brighten the day.
Happy to nibble on updates so neat,
In this whimsical code garden, my heart skips a beat!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09b426b and b7830b8.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (29)
  • .github/workflows/release-napi.yml (2 hunks)
  • .github/workflows/release-plz.yml (1 hunks)
  • Cargo.toml (1 hunks)
  • fixtures/pnp/package.json (1 hunks)
  • fixtures/pnpm-workspace/package.json (1 hunks)
  • fixtures/tsconfig/cases/extends-paths/tsconfig.base.json (1 hunks)
  • fixtures/tsconfig/cases/extends-paths/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig1.json (0 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url1.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url2.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends1.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends2.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends4.json (1 hunks)
  • fixtures/tsconfig/cases/project_references/app/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/project_references/app/tsconfig.nopaths.json (1 hunks)
  • fixtures/tsconfig/tsconfig.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable1.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable2.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable3.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable4.json (1 hunks)
  • napi/Cargo.toml (0 hunks)
  • npm/package.json (1 hunks)
  • src/fs_cache.rs (1 hunks)
  • src/tests/tsconfig_paths.rs (6 hunks)
  • src/tests/tsconfig_project_references.rs (2 hunks)
  • src/tsconfig.rs (5 hunks)
  • src/tsconfig_serde.rs (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 14 out of 29 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig.json: Language not supported
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig1.json: Language not supported
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url1.json: Language not supported
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url2.json: Language not supported
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends1.json: Language not supported
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends2.json: Language not supported
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json: Language not supported
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends4.json: Language not supported
  • fixtures/tsconfig/cases/project_references/app/tsconfig.json: Language not supported
  • fixtures/tsconfig/cases/project_references/app/tsconfig.nopaths.json: Language not supported
  • fixtures/tsconfig/tsconfig.json: Language not supported
  • fixtures/tsconfig/tsconfig_template_variable1.json: Language not supported
  • fixtures/tsconfig/tsconfig_template_variable2.json: Language not supported
  • fixtures/tsconfig/tsconfig_template_variable3.json: Language not supported
  • fixtures/tsconfig/tsconfig_template_variable4.json: Language not supported

@codspeed-hq
Copy link

codspeed-hq bot commented Apr 11, 2025

CodSpeed Performance Report

Merging #62 will not alter performance

Comparing chore/merge_upstream (b7830b8) with main (a3b42a8)

Summary

✅ 3 untouched benchmarks

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to fced793 in 2 minutes and 49 seconds

More details
  • Looked at 686 lines of code in 25 files
  • Skipped 4 files when reviewing.
  • Skipped posting 11 drafted comments based on config settings.
1. src/tsconfig_serde.rs:263
  • Draft comment:
    The result of json_strip_comments::strip(json) is discarded. Likely the stripped JSON should be used in serde_json::from_str to allow comments in JSON.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. npm/package.json:40
  • Draft comment:
    New RISC-V target 'riscv64gc-unknown-linux-gnu' is correctly added. Please double‐check if any additional cross‐compilation settings (e.g. in build scripts or CI) are needed for this target.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
3. src/tsconfig.rs:143
  • Draft comment:
    The build() method substitutes the ${configDir} placeholder correctly in baseUrl. Verify that both cases (with and without trailing slashes) work as intended, as this can affect absolute path resolution.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
4. src/tsconfig_serde.rs:263
  • Draft comment:
    The call to json_strip_comments::strip(json) discards its result. If the intent is to clean the JSON input from comments, consider reassigning the stripped output to ensure comments don’t interfere with deserialization.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. src/tests/tsconfig_paths.rs:23
  • Draft comment:
    There is a commented out test case regarding reading the package.json.tsconfig field. If this test is no longer relevant, consider removing the commented code to keep the test suite clean.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
6. src/tsconfig.rs:245
  • Draft comment:
    The alias resolution logic (using star patterns) appears reasonable. Ensure that the selection of the best match (longest prefix/suffix) covers all edge cases in your test suite.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
7. fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json:2
  • Draft comment:
    There is a tab character after the colon in the JSON property on line 2. For consistency with the rest of the codebase, consider replacing the tab with spaces.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    This is a style/formatting issue in a JSON file. While it's technically correct that there's a tab character, this is something that should be handled by automated formatting tools or linters, not manual code review comments. The file will work fine either way, and this is a very minor formatting detail.
    Perhaps inconsistent formatting could lead to confusion or make the codebase look unprofessional. Maybe the project doesn't have automated formatting set up.
    Even if formatting is important, this kind of minor spacing issue should be handled by automated tools, not manual review comments. Manual comments should focus on more substantial issues.
    Delete this comment as it addresses a minor formatting issue that should be handled by automated tools rather than manual review.
8. npm/package.json:46
  • Draft comment:
    It appears that 'wasm32-wasip1-threads' may be a typographical error. If this target is intended to refer to the WASI environment (WebAssembly System Interface), consider correcting it to 'wasm32-wasi-threads' to follow the standard naming convention.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. src/tests/tsconfig_project_references.rs:9
  • Draft comment:
    Typographical error: consider replacing "it's" with "its" in the comment starting on this line.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. src/tests/tsconfig_project_references.rs:79
  • Draft comment:
    Typographical error: consider replacing "it's" with "its" in the comment on this line.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. src/tsconfig.rs:179
  • Draft comment:
    Typo in doc comment: Consider changing 'tests cases' to 'test cases' for clarity.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    While the comment is technically correct - "tests cases" is grammatically incorrect and should be "test cases" - it's a very minor documentation issue. The meaning is still clear despite the typo. The rules state we should only keep comments that require clear code changes, and documentation typos are generally not critical enough to warrant a comment.
    The typo could be seen as affecting code readability and professionalism. Documentation is part of the code and should be held to high standards.
    While documentation quality is important, this particular typo is extremely minor and doesn't impact understanding. The rules specifically say not to make purely informative comments or unimportant ones.
    The comment should be deleted as it points out a very minor documentation issue that doesn't materially impact code quality or understanding.

Workflow ID: wflow_oogynMNtTZTMMhiy


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/release-napi.yml (1)

85-92: New RISC-V Build Configuration Added.
A new build entry for the riscv64gc-unknown-linux-gnu target has been introduced. The step correctly installs the RISC-V compilers and sets the appropriate environment variables before invoking the build. It would be good to ensure that these commands (especially the package installation via apt-get) work consistently across CI environments.

fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends2.json (1)

1-3: Valid Minimal JSON Extension Configuration

This file correctly extends the specified template (../../tsconfig_template_variable2.json) in a minimal and clear manner. Ensure that the formatting (e.g., tab vs. space in the "extends" value) is consistent with other configuration files for overall consistency.

fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends4.json (1)

1-3: Configuration Extension Validity

The JSON structure is correct and clearly extends the template configuration file. One minor suggestion: consider using consistent whitespace (spaces instead of tabs) if that aligns with your project’s style guidelines.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc0f4fb and fced793.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • .github/workflows/release-napi.yml (2 hunks)
  • .github/workflows/release-plz.yml (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig1.json (0 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url1.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url2.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends1.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends2.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends4.json (1 hunks)
  • fixtures/tsconfig/cases/project_references/app/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/project_references/app/tsconfig.nopaths.json (1 hunks)
  • fixtures/tsconfig/tsconfig.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable1.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable2.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable3.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable4.json (1 hunks)
  • napi/Cargo.toml (0 hunks)
  • npm/package.json (1 hunks)
  • package.json (1 hunks)
  • src/fs_cache.rs (1 hunks)
  • src/tests/tsconfig_paths.rs (6 hunks)
  • src/tests/tsconfig_project_references.rs (2 hunks)
  • src/tsconfig.rs (5 hunks)
  • src/tsconfig_serde.rs (1 hunks)
💤 Files with no reviewable changes (2)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig1.json
  • napi/Cargo.toml
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/fs_cache.rs (3)
src/tsconfig.rs (1)
  • tsconfig (360-360)
src/tsconfig_serde.rs (1)
  • tsconfig (247-249)
src/lib.rs (2)
  • tsconfig (1275-1278)
  • new (150-157)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test (windows-latest)
🔇 Additional comments (37)
npm/package.json (1)

41-41: Addition of RISC-V Target.
The new target "riscv64gc-unknown-linux-gnu" is added appropriately to the napi.targets array. Please ensure that your build and toolchain configurations support this target.

.github/workflows/release-plz.yml (1)

31-31: Release Action Version Update.
The update of the release-plz-action from an older version to v0.5.102 appears to be a straightforward version bump. Verify that the new version maintains backward compatibility with your workflow and that no breaking changes are introduced.

package.json (2)

19-19: Dependency Version Update for @napi-rs/cli.
Changing the version from a fixed version to the caret range "^3.0.0-alpha.77" allows for automatic patch and minor updates. Please confirm that there are no unintended breaking changes from newer versions in that release line.


26-26: Updated Package Manager Version.
The update to "pnpm@10.8.0" should enable access to the latest features and fixes. Verify that this new version is compatible with your project’s dependency management and build pipelines.

.github/workflows/release-napi.yml (1)

137-137: Artifact Upload Enforcement.
The addition of if-no-files-found: error strengthens the artifact upload step by enforcing an error if expected files are missing. Confirm that this configuration does not inadvertently break the build in scenarios where artifacts might legitimately be absent.

fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends1.json (1)

1-3: Valid Minimal JSON Extension Configuration

This new configuration file cleanly extends the template (../../tsconfig_template_variable1.json) as intended. The structure is simple and adheres to the project’s configuration standards.

fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json (1)

1-3: Correct Inheritance from Base Configuration

This file properly extends ../../tsconfig_template_variable3.json with a minimal JSON structure, ensuring that all necessary compiler options are inherited.

fixtures/tsconfig/tsconfig.json (1)

1-8: Updated Path Mapping for Module Resolution

The update changes the path mapping for the "ts-path" alias from the generic "foo.js" to the more specific "src/foo.js", which aligns with the new directory structure. This adjustment will help TypeScript resolve modules correctly.

fixtures/tsconfig/tsconfig_template_variable2.json (1)

1-8: Accurate Template Configuration for Compiler Options

This new configuration file establishes a clear base URL using ${configDir} and maps the "foo" module to "./src/foo.js". The configuration is concise and consistent with the overall changes to the TypeScript project structure.

fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url1.json (1)

1-9: Valid Base URL and Path Mapping

This configuration correctly sets the baseUrl to ${configDir} and maps the alias @/* to ./src/*. Everything appears consistent and suitable for module resolution.

fixtures/tsconfig/tsconfig_template_variable1.json (1)

1-8: Updated Module Path Mapping

The path mapping for "foo" has been updated to "${configDir}/src/foo.js", which reflects the new directory structure. This change is clear and consistent with the other configuration updates.

fixtures/tsconfig/cases/project_references/app/tsconfig.json (1)

1-24: Corrected Project Reference

The reference path update to "../../paths_template_variable/tsconfig.json" is appropriate and aligns with the new file organization. Please ensure that downstream builds and references resolve this updated path correctly.

fixtures/tsconfig/cases/paths_template_variable/tsconfig.json (1)

1-9: Consistent Paths Configuration

The update modifying the "foo" mapping to "${configDir}/src/foo.js" is consistent with the changes made in related configuration files. The JSON overall is properly structured.

fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url2.json (1)

1-8: LGTM: Well-structured TypeScript path configuration

This configuration properly sets up a path alias mapping for TypeScript, using a template variable ${configDir}/ for dynamic resolution based on the configuration directory. The paths mapping for @/* to ./src/* follows common patterns for module aliasing.

fixtures/tsconfig/tsconfig_template_variable3.json (1)

1-8: LGTM: Proper template variable usage in paths mapping

This TypeScript configuration correctly sets up a module alias for "foo" that points to a file using the ${configDir} template variable. This approach allows for dynamic path resolution based on the configuration directory context.

fixtures/tsconfig/cases/project_references/app/tsconfig.nopaths.json (1)

17-17: Path reference updated correctly

The path reference has been updated from tsconfig2.json to tsconfig.json, which appears to be an intentional correction to ensure consistent configuration referencing across project files.

fixtures/tsconfig/tsconfig_template_variable4.json (1)

1-8: LGTM: Appropriate template variable configuration

This configuration properly uses the ${configDir} template variable both in the baseUrl and in the paths mapping. Note that unlike tsconfig_template_variable3.json, this file has baseUrl set directly to the template variable without additional path segments.

src/tsconfig_serde.rs (2)

9-9: Updated imports to support refactored template variable handling

The imports have been updated to match the refactored implementation of template variable handling elsewhere in the codebase.


262-268: LGTM: Simplified parse method as part of template variable handling refactoring

The parse method has been simplified to focus on its core responsibilities: parsing JSON and setting basic properties. The previously included logic for handling base_url normalization and paths_base assignment has been moved to a new build method in the TsConfig trait implementation elsewhere.

This separation of concerns improves the code structure by centralizing template variable resolution and path handling in dedicated methods.

src/tests/tsconfig_project_references.rs (2)

42-42: New path reference looks consistent.

Switching from foo.js to src/foo.js keeps the test in sync with the updated directory structure. No issues found.


65-65: Confirmed path alignment with updated fixture.

Using src/foo.js here mirrors the change above. This appears correct for the modified directory layout.

src/fs_cache.rs (1)

192-192:

❓ Verification inconclusive

Ensure the new build() call correctly handles template variables.

Replacing the previous template expansion with tsconfig.build() centralizes the finalization logic. Please confirm that all references to expand_template_variables() have been removed or replaced.


🏁 Script executed:

#!/bin/bash
# Searching the codebase for any references to the old method
rg 'expand_template_variables'

Length of output: 30


Action: Verify Template Variable Handling

The updated code now uses tsconfig.build() to centralize template variable processing. Our initial search for expand_template_variables produced no results, suggesting that references have been removed. However, please perform a manual verification to ensure that all aspects of template variable expansion are indeed handled correctly within the new build logic.

src/tests/tsconfig_paths.rs (9)

14-14: Function rename improves clarity.

Renaming from tsconfig to tsconfig_resolve clarifies the intention. This change appears beneficial for readability.


19-19: Updated path reference.

Adopting f.join("src/foo.js") aligns with the new source directory structure.


48-48: Confirm path usage in non-used tsconfig.

Here, Ok(f.join("src/foo.js")) matches the shift to a src/ subdirectory. Looks correct.


136-136: Added .build() call for finalizing tsconfig.

This ensures template variable substitution and base URL resolution happen before using the tsconfig. No issues noted.


166-166: Consistent .build() usage.

Same reasoning as above: finalizing config after parse. This is coherent and appears correct.


197-197: Applying .build() to unify config logic.

Ensures that references, paths, and base URL are resolved in one place. Looks good.


249-249: New test expectation referencing src/foo.js.

This test entry now reflects the moved file location. No concerns raised.


251-256: Maintaining consistent path resolution in extended configurations.

All these entries target src/foo.js, which aligns with the updated directory layout and template variable logic.


257-260: Further demonstration of foo.js relocation.

These references show the same adjusted path. Approved for consistency.

src/tsconfig.rs (6)

2-2: Debug import aligns with trait changes.

Enabling Debug usage for TsConfig and its compiler options is beneficial for diagnostic logging.


13-13: New constant for template substitution.

Defining TEMPLATE_VARIABLE centralizes the placeholder and prevents magic strings. Looks clean.


23-24: Adding Debug to the trait and its associated type.

This extension facilitates easier debugging of tsconfig structures. Approved.


83-83: Guarding baseUrl assignment.

The new condition ensures existing base_url isn’t overwritten. This is a sensible fallback approach.


90-96: Conditional logic for paths inheritance.

Only sets paths and paths_base if not already provided, improving clarity in tsconfig merging.


131-189: Introducing build() and template resolution.

This method unifies final steps for root tsconfig, substituting ${configDir} and consolidating path logic. It’s a clean and maintainable design.

@JounQin JounQin force-pushed the chore/merge_upstream branch from fced793 to 4751ab3 Compare April 11, 2025 11:09
@codecov
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.20%. Comparing base (a3b42a8) to head (b7830b8).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   93.20%   93.20%           
=======================================
  Files          13       13           
  Lines        2841     2841           
=======================================
  Hits         2648     2648           
  Misses        193      193           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 4751ab3 in 1 minute and 28 seconds

More details
  • Looked at 675 lines of code in 23 files
  • Skipped 4 files when reviewing.
  • Skipped posting 11 drafted comments based on config settings.
1. src/tsconfig_serde.rs:263
  • Draft comment:
    The call to json_strip_comments::strip(json) discards its result. To properly remove comments before parsing, assign the result to a variable and pass that to serde_json::from_str. This ensures that comments are stripped as intended.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. src/tsconfig_serde.rs:263
  • Draft comment:
    The output of json_strip_comments::strip(json) is discarded. It looks like the intention is to remove comments from the JSON before deserialization. Consider capturing and using its return value (e.g. assigning to a local variable) so that the parsed JSON is comment‐free.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. src/tsconfig.rs:146
  • Draft comment:
    In the build() method, the substitution of the '{configDir}' template variable for baseUrl uses trim_start_matches('/'). A brief comment explaining the handling of leading slashes and how relative paths are expected to be formatted would improve clarity.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking for an explanation to be added to the code, which is not allowed as it falls under asking the author to explain or clarify their intention. The comment does not provide a specific code suggestion or point out a potential issue with the code itself.
4. src/tsconfig.rs:232
  • Draft comment:
    The wildcard matching in resolve_path_alias selects the best key using the longest prefix and suffix lengths. Adding a comment that explains the rationale (e.g. handling multiple wildcard patterns, choosing the most specific match) would help future maintainers.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends1.json:2
  • Draft comment:
    It appears that there's a tab character between the key "extends" and its value. While JSON allows any whitespace, it's more conventional to use spaces for consistency. Consider replacing the tab with spaces to adhere to the project's formatting standards.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    While the comment is technically correct about the tab character, this is purely a formatting issue. JSON spec allows any whitespace. Most editors and formatters would automatically handle this. This isn't a logic or functionality issue. The comment doesn't indicate any actual problems that need fixing.
    The inconsistent use of tabs vs spaces could lead to formatting inconsistencies across the codebase if left unchecked. Some teams do care about strict formatting standards.
    However, this is exactly the kind of minor formatting issue that should be handled by automated formatters or linters, not manual code review comments. It doesn't affect functionality.
    Delete this comment as it addresses a trivial formatting issue that should be handled by automated tools, not code review.
6. fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json:2
  • Draft comment:
    Typographical note: There is a tab character after the colon in line 2. Consider replacing it with a space for consistency in formatting.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    While the comment is technically correct about the tab character, formatting issues in JSON files are typically handled automatically by code formatters or IDE settings. This is a very minor formatting issue that doesn't affect functionality. The rules specifically mention not making purely informative comments or obvious/unimportant ones.
    The inconsistent use of tabs vs spaces could potentially indicate a deeper configuration issue or could propagate through other files if copied.
    JSON formatting is well-standardized and most development environments will automatically handle this. This is too minor to warrant a PR comment.
    This comment should be removed as it addresses a trivial formatting issue that doesn't require manual intervention.
7. fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends4.json:2
  • Draft comment:
    There appears to be a tab between the colon and the value in the extends property. Consider replacing the tab with a single space to maintain consistency in formatting.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    While the comment is technically correct about the tab character, this is a very minor formatting issue. Most projects would handle this automatically with prettier/eslint. The change doesn't affect functionality. The comment feels overly pedantic.
    The tab inconsistency could propagate if other developers copy this file as a template. Inconsistent formatting can make diffs harder to read.
    While formatting consistency is good, this is exactly the kind of thing that should be handled by automated formatting tools, not code review comments. It's too minor to warrant manual intervention.
    Delete this comment as it's too minor and would typically be handled by automated formatting tools.
8. src/tests/tsconfig_project_references.rs:9
  • Draft comment:
    Typographical error: In the comment on line 9, 'it's own' should be changed to 'its own'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. src/tests/tsconfig_project_references.rs:79
  • Draft comment:
    Typographical error: In the comment on line 79, 'it's own' should be 'its own'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. src/tests/tsconfig_project_references.rs:139
  • Draft comment:
    Typographical error: In the comment on line 139, 'it's own' should be corrected to 'its own'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. src/tsconfig.rs:179
  • Draft comment:
    Typo in comment: Consider changing 'tests cases' to 'test cases' for grammatical clarity.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    While the comment is technically correct (it is a grammatical error), it's a very minor documentation issue. The rules state not to make purely informative comments or comments that are obvious/unimportant. Documentation typos, unless they make the meaning unclear, fall into this category.
    The typo could potentially cause confusion for non-native English speakers. Also, maintaining high quality documentation is important for project maintainability.
    While documentation quality is important, this particular typo does not impact understanding of the code or documentation. The meaning is still clear despite the minor grammatical error.
    The comment should be deleted as it violates the rule about not making purely informative comments or comments about unimportant issues.

Workflow ID: wflow_sxQEG7qHLkuYbQeL


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@JounQin JounQin force-pushed the chore/merge_upstream branch from 4751ab3 to 75623f9 Compare April 11, 2025 11:11
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 75623f9 in 1 minute and 44 seconds

More details
  • Looked at 692 lines of code in 24 files
  • Skipped 5 files when reviewing.
  • Skipped posting 8 drafted comments based on config settings.
1. src/tsconfig_serde.rs:263
  • Draft comment:
    The result of json_strip_comments::strip(json) is discarded. You likely meant to pass the stripped JSON to serde_json::from_str to properly remove comments.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. src/tsconfig.rs:183
  • Draft comment:
    The implementation of substitute_template_variable only replaces the template if it appears as a prefix. Consider whether you want a more robust substitution (or document the limitation).
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    The code already documents this limitation in the comments. The limitation appears intentional based on test cases. The comment suggests either changing the implementation or documenting the limitation - but the limitation is already documented. The comment isn't really actionable since this appears to be working as intended.
    The comment raises a valid technical point about a potential edge case. Maybe there are real-world cases where ${configDir} appears mid-path that we're missing?
    The code comment explicitly states this matches the test cases, suggesting this is the intended behavior. If mid-path substitution was needed, it would be covered by tests.
    Delete the comment since the limitation is already documented in the code comments and appears to be intentional based on test coverage.
3. src/tsconfig_serde.rs:263
  • Draft comment:
    The result of json_strip_comments::strip is discarded. Use its output for parsing to properly remove comments.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. src/tsconfig.rs:146
  • Draft comment:
    Consider additional trimming of whitespace after substituting the ${configDir} variable.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50%
    None
5. package.json:2
  • Draft comment:
    Verify if the package version '0.0.0' is intended for a private package; ensure proper version bump before publishing.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50%
    None
6. src/tests/tsconfig_project_references.rs:9
  • Draft comment:
    Typographical error: In the comment, consider changing "it's own paths alias" to "its own paths alias" to properly use the possessive form.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. src/tests/tsconfig_project_references.rs:79
  • Draft comment:
    Typographical error: In the comment, consider changing "it's own paths alias" to "its own paths alias" to correctly denote possession.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. src/tsconfig.rs:177
  • Draft comment:
    Typographical error: In the 'substitute_template_variable' function's comment, please change "All tests cases are just a head replacement of ${configDir}" to "All test cases are just a head replacement of ${configDir}".
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    While the typo is real, it's in a comment and doesn't affect functionality. The rules say to only keep comments that require code changes. Comment typos are not important enough to warrant a PR comment. This feels like the kind of nitpick that just adds noise to the review.
    The typo could indicate a lack of attention to detail that might extend to the code. Documentation quality is important for maintainability.
    While documentation quality matters, this is an extremely minor issue that doesn't impact understanding. The rules explicitly say not to make unimportant comments.
    Delete this comment as it's too minor and doesn't require a code change.

Workflow ID: wflow_rlVYS6pXXY9lrkoW


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
src/tsconfig.rs (1)

156-156: Typo in comment: 'paths_base' not matching variable name.

The comment incorrectly uses "bases_base" which should be "paths_base" to match the actual variable name used in the code.

-            // `paths_base` should use config dir if it is not resolved with base url nor extended
+            // `paths_base` should use config dir if it is not resolved with base url nor extended
🧹 Nitpick comments (1)
.github/workflows/release-napi.yml (1)

85-92: New RISC-V Build Target Added
The new build job for the riscv64gc-unknown-linux-gnu target is well-integrated into the build matrix. The script correctly updates the package lists, installs the cross-compilers, and sets the appropriate environment variables before invoking pnpm build.

Recommendation:
Verify that the cross-compilation packages (gcc-riscv64-linux-gnu and g++-riscv64-linux-gnu) are available in the default Ubuntu repositories used in the CI environment. If there’s any risk of package unavailability, consider adding steps to configure the necessary repositories or caching strategies to optimize the update/install process.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fced793 and 75623f9.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • .github/workflows/release-napi.yml (2 hunks)
  • .github/workflows/release-plz.yml (1 hunks)
  • fixtures/tsconfig/cases/extends-paths/tsconfig.base.json (1 hunks)
  • fixtures/tsconfig/cases/extends-paths/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig1.json (0 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url1.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url2.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends1.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends2.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json (1 hunks)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends4.json (1 hunks)
  • fixtures/tsconfig/cases/project_references/app/tsconfig.json (1 hunks)
  • fixtures/tsconfig/cases/project_references/app/tsconfig.nopaths.json (1 hunks)
  • fixtures/tsconfig/tsconfig.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable1.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable2.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable3.json (1 hunks)
  • fixtures/tsconfig/tsconfig_template_variable4.json (1 hunks)
  • napi/Cargo.toml (0 hunks)
  • npm/package.json (1 hunks)
  • package.json (1 hunks)
  • src/fs_cache.rs (1 hunks)
  • src/tests/tsconfig_paths.rs (6 hunks)
  • src/tests/tsconfig_project_references.rs (2 hunks)
  • src/tsconfig.rs (5 hunks)
  • src/tsconfig_serde.rs (1 hunks)
💤 Files with no reviewable changes (2)
  • napi/Cargo.toml
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig1.json
✅ Files skipped from review due to trivial changes (2)
  • fixtures/tsconfig/cases/extends-paths/tsconfig.base.json
  • fixtures/tsconfig/cases/extends-paths/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (20)
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends1.json
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends2.json
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends3.json
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_extends4.json
  • .github/workflows/release-plz.yml
  • fixtures/tsconfig/tsconfig_template_variable3.json
  • fixtures/tsconfig/tsconfig.json
  • fixtures/tsconfig/tsconfig_template_variable4.json
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url1.json
  • src/tsconfig_serde.rs
  • fixtures/tsconfig/cases/project_references/app/tsconfig.nopaths.json
  • npm/package.json
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig_base_url2.json
  • fixtures/tsconfig/cases/paths_template_variable/tsconfig.json
  • fixtures/tsconfig/tsconfig_template_variable2.json
  • package.json
  • fixtures/tsconfig/tsconfig_template_variable1.json
  • fixtures/tsconfig/cases/project_references/app/tsconfig.json
  • src/tests/tsconfig_project_references.rs
  • src/fs_cache.rs
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/tsconfig.rs (1)
src/tsconfig_serde.rs (6)
  • base_url (142-144)
  • tsconfig (247-249)
  • paths_base (162-164)
  • paths (150-152)
  • path (42-44)
  • path (243-245)
🔇 Additional comments (14)
.github/workflows/release-napi.yml (1)

137-137: Enhanced Artifact Upload Check
Adding if-no-files-found: error in the artifact upload step is a beneficial improvement that ensures the workflow fails early when expected artifacts are missing, thereby preventing silent failures.

src/tests/tsconfig_paths.rs (7)

14-14: Function name changed from tsconfig to tsconfig_resolve improves clarity.

The renamed function better reflects its actual purpose, which is to test path resolution using tsconfig settings.


19-19: Path update to accommodate the new directory structure.

The expected path is now correctly pointing to src/foo.js instead of foo.js, which aligns with the changes in the directory structure.


48-48: Path update for consistency with new directory structure.

Similar to the earlier path changes, this update ensures all expected paths correctly point to the new src/foo.js location.


136-136: Added .build() call to correctly process the tsconfig.

This change is necessary to utilize the new build method from the TsConfig trait, which handles template variable substitution and path normalization.


166-166: Added .build() call for consistency with updated processing flow.

Similar to the earlier change, this ensures the tsconfig is properly processed before being used in tests.


197-197: Added .build() call for proper tsconfig initialization.

This change maintains consistency with the updated processing flow throughout the test suite.


250-260: Updated test paths to reflect the new directory structure.

The test data for test_template_variable has been appropriately updated to use src/foo.js instead of foo.js, ensuring tests accurately validate the new path structure.

src/tsconfig.rs (6)

2-2: Added Debug trait import to support new trait bounds.

The addition of Debug for improved diagnostics is a good practice that will help with troubleshooting and logging.


13-14: Added constant for the template variable pattern.

Defining TEMPLATE_VARIABLE as a constant rather than using string literals improves maintainability and reduces the risk of typos when checking for the template pattern.


23-24: Added Debug trait bounds to TsConfig and CompilerOptions.

This change enhances the diagnostics capabilities for the entire configuration system, making it easier to debug configuration issues.


90-96: Simplified logic for setting paths_base in extend_tsconfig.

The refactored logic provides a cleaner approach to setting paths_base and paths when extending configs, improving readability and maintainability.


137-174: Added new build method to handle template substitution and path normalization.

This is an excellent addition that centralizes the logic for:

  1. Processing the ${configDir} template variable
  2. Normalizing paths_base and baseUrl
  3. Ensuring consistent path resolution across the configuration

The implementation properly handles both absolute and relative paths, which is crucial for correct path resolution.


183-188: Added helper method for template variable substitution.

The new substitute_template_variable method provides a clean implementation for handling template substitution, promoting code reuse and consistency across the codebase.

@JounQin JounQin force-pushed the chore/merge_upstream branch from 75623f9 to b67c782 Compare April 11, 2025 11:25
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on b67c782 in 1 minute and 17 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. Cargo.toml:8
  • Draft comment:
    Authors field updated, but the PR mentions adding RISC-V support. Ensure the necessary target configuration is included elsewhere.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the author to ensure that the necessary target configuration is included, which is against the rules. It is not making a specific code suggestion or pointing out a specific issue with the code. Therefore, it should be removed.
2. Cargo.toml:8
  • Draft comment:
    Author metadata updated. However, the diff only shows this change and no modifications related to the RISC-V target support as described in the PR. Verify that the upstream merge indeed includes the intended riscv support.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the author to verify if the upstream merge includes the intended RISC-V support, which is against the rules as it asks for confirmation of intention. It does not provide a specific code suggestion or ask for a specific test to be written.
3. Cargo.toml:8
  • Draft comment:
    Typo: There is an inconsistency in the author's contact information formatting. The email domain is written as '1stg.me' (all lowercase) while the URL is '1stG.me' (with an uppercase 'G'). Please standardize the casing for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    This is a very minor stylistic issue about casing in the author's personal URL. The author likely intentionally uses different casing in their URL as part of their branding. This isn't a code quality issue, doesn't affect functionality, and is purely about personal preference in how someone represents their contact information.
    Maybe inconsistent casing could cause issues in some contexts? Maybe there's a Cargo.toml standard for author information formatting?
    The casing difference is in a URL which is likely intentional branding, and there's no standard requiring consistent casing in author URLs. This is too minor to warrant a comment.
    Delete this comment as it's purely stylistic, doesn't affect functionality, and relates to personal branding choices in contact information.

Workflow ID: wflow_OnfZYBNdTroTAFf0


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@JounQin JounQin force-pushed the chore/merge_upstream branch from b67c782 to 09b426b Compare April 11, 2025 11:49
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 09b426b in 1 minute and 47 seconds

More details
  • Looked at 710 lines of code in 26 files
  • Skipped 5 files when reviewing.
  • Skipped posting 12 drafted comments based on config settings.
1. src/tsconfig_serde.rs:263
  • Draft comment:
    The result of json_strip_comments::strip(json) is discarded. If the intent is to remove comments before parsing, its returned value should be used (e.g. assign to a new string and parse that).
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. src/tsconfig.rs:245
  • Draft comment:
    Consider clarifying the behavior when no path alias key exactly matches and a star pattern is used. Ensure that joining base paths and chaining the base_url_iter is the intended resolution order.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
3. src/tsconfig.rs:147
  • Draft comment:
    Consider clarifying the baseUrl substitution logic. The use of strip_prefix on the base_url assumes an exact match with '${configDir}' but may miss trailing slash variations. Document or handle such edge cases.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    The code actually handles trailing slashes gracefully:
  • If there's no template variable, it normalizes the path
  • If there is a template variable, it explicitly trims any leading slashes after substitution
  • The constant is clearly defined at the top of the file
  • The behavior seems intentional and well-handled
    I could be missing some edge cases that aren't obvious. The comment author may have encountered specific problematic cases.
    The code explicitly handles trailing slashes and has clear fallback behavior. The implementation looks robust and intentional.
    The comment should be deleted as the code already handles trailing slash variations appropriately and the implementation is clear.
4. src/tsconfig_serde.rs:263
  • Draft comment:
    The call to json_strip_comments::strip(json) discards its result. Consider handling or checking errors from stripping comments to avoid unexpected parsing issues.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. src/fs_cache.rs:379
  • Draft comment:
    The unsafe block in 'replace_extension' lacks a safety explanation. Please document the invariants that justify using from_encoded_bytes_unchecked.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. src/tsconfig.rs:217
  • Draft comment:
    In resolve_path_alias, the matching logic for wildcard keys is non-obvious. Consider adding inline comments to explain how the longest prefix/suffix rule is determined for alias substitution.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
7. Cargo.lock:1
  • Draft comment:
    Typographical issue: The header reads "# This file is automatically @generated by Cargo." Consider removing the '@' to standardize it as "# This file is automatically generated by Cargo."
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. Cargo.toml:54
  • Draft comment:
    Grammar suggestion: In the comment on line 54, instead of saying "both pedantic and nursery is enabled", it should be "both pedantic and nursery are enabled" for grammatical consistency.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. Cargo.toml:55
  • Draft comment:
    Grammar suggestion: In the comment on line 55, consider replacing "does not make sense" with "do not make sense" to match the plural subject, improving readability.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. src/tests/tsconfig_project_references.rs:9
  • Draft comment:
    Typographical error: please change "it's" to "its" in the comment at line 9 to correctly indicate possession.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. src/tests/tsconfig_project_references.rs:79
  • Draft comment:
    Typographical error: please change "it's" to "its" in the comment at line 79 to correctly indicate possession.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. src/tsconfig.rs:178
  • Draft comment:
    Typo: In the note for the substitute_template_variable method, consider changing "All tests cases" to "All test cases" for grammatical correctness.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    While the comment is technically correct about the grammar, it's a very minor documentation issue. The meaning is still clear even with the typo. According to the rules, we should not make purely informative comments or comments that are obvious/unimportant. Documentation typos generally fall into this category unless they significantly impact understanding.
    The typo could be seen as affecting code quality since it's in public documentation. Documentation quality is important for API consumers.
    While documentation quality matters, this particular typo is extremely minor and doesn't impact understanding. The rules specifically say not to make unimportant comments.
    The comment should be deleted as it points out an unimportant documentation typo that doesn't impact understanding.

Workflow ID: wflow_KBhvxGqdZP7HHAEz


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@JounQin JounQin force-pushed the chore/merge_upstream branch from 09b426b to b7830b8 Compare April 11, 2025 11:52
@sonarqubecloud
Copy link

@JounQin JounQin merged commit b7830b8 into main Apr 11, 2025
18 of 19 checks passed
@JounQin JounQin deleted the chore/merge_upstream branch April 11, 2025 11:52
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on b7830b8 in 1 minute and 30 seconds

More details
  • Looked at 710 lines of code in 26 files
  • Skipped 5 files when reviewing.
  • Skipped posting 15 drafted comments based on config settings.
1. src/tsconfig.rs:145
  • Draft comment:
    In the build() function, the substitution logic for the baseUrl uses strip_prefix on the TEMPLATE_VARIABLE. Confirm that trimming the leading '/' from the stripped path meets all edge cases (e.g. when there is no leading slash).
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. src/tsconfig.rs:232
  • Draft comment:
    The resolve_path_alias function uses a loop to select a key with the longest prefix match. Consider verifying if overlapping alias patterns are handled as expected; the current logic may be brittle if multiple patterns match.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. src/tsconfig_rs:166
  • Draft comment:
    In build(), after setting paths_base and substituting template variables in paths, ensure that empty paths_base is handled consistently. Double-check if an empty OS string could trigger unintended behavior.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. src/tsconfig_serde.rs:263
  • Draft comment:
    In the parse() method, json_strip_comments is called but its result is discarded. Consider using the stripped JSON text for parsing to improve robustness if comments interfere with deserialization.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. src/tsconfig_serde.rs:263
  • Draft comment:
    The call to json_strip_comments::strip(json) discards the stripped output. Consider capturing and using the returned (comment‐free) JSON string before parsing, to properly remove comments.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. src/tsconfig.rs:249
  • Draft comment:
    Ensure that the replacement logic for '*' in resolve_path_alias safely handles edge cases. Verify that longest_prefix_length and longest_suffix_length correctly partition the specifier string to avoid panics.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. src/fs_cache.rs:218
  • Draft comment:
    The logic for canonicalizing symlinks using OnceLock and an atomic counter looks solid; ensure that the fallback (debug_assert branch) covers all unexpected cases. No change is required if tests pass.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
8. src/tsconfig.rs:137
  • Draft comment:
    The build method resolves baseUrl and paths_base effectively. Verify that substituting the template variable using strip_prefix is adequate for all valid tsconfig formats.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
9. Cargo.toml:51
  • Draft comment:
    Typo in comment: Consider changing 'naming things are hard' to 'naming things is hard' for grammatical correctness.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. Cargo.toml:54
  • Draft comment:
    Typographical suggestion: Change 'both pedantic and nursery is enabled' to 'both pedantic and nursery are enabled' to match the plural subject.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. Cargo.toml:55
  • Draft comment:
    Typographical note: In the phrase 'either false positives, chaotic, or does not make sense', consider changing 'does not make sense' to 'do not make sense' to maintain subject-verb agreement.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. npm/package.json:46
  • Draft comment:
    Typo detected: The target 'wasm32-wasip1-threads' looks like it might be a typo. Did you mean 'wasm32-wasi-threads'?
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
13. src/tests/tsconfig_project_references.rs:9
  • Draft comment:
    Typographical error: Change "it's own paths alias" to "its own paths alias" for proper possessive use.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
14. src/tests/tsconfig_project_references.rs:79
  • Draft comment:
    Typographical error: Change "has defined it's own paths alias" to "has defined its own paths alias" to correctly express possession.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
15. src/tsconfig.rs:178
  • Draft comment:
    Typographical error: In the doc comment for 'substitute_template_variable', 'All tests cases' should be corrected to 'All test cases'.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    While the grammatical suggestion is technically correct, the doc comment was not actually changed in this PR - it was just moved from one location to another. The rules state we should only comment on actual changes, not pre-existing code. Additionally, this is a very minor grammatical issue that doesn't impact code functionality.
    The grammar error could make the documentation slightly less professional. Maybe it's worth fixing while we're touching this code anyway?
    No - the rules are clear that we should only comment on actual changes. Moving code without modifying it doesn't count as a change that warrants review comments.
    Delete this comment since it refers to a pre-existing grammatical issue in code that was only moved, not modified.

Workflow ID: wflow_M8j1s1Dx9SuxF2Sq


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Blocked by upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants