Skip to content

Commit

Permalink
Fixes the iarna test (#5794)
Browse files Browse the repository at this point in the history
**What's the problem this PR addresses?**

One of our tests on the `@types` auto-add was testing `@iarna/toml`, but
this package actually contains types (but was reported as not having
them due to a bug on Algolia's side).

**How did you fix it?**

I changed the package to `@babel/parser`, which doesn't have builtin
types.

**Checklist**
<!--- Don't worry if you miss something, chores are automatically
tested. -->
<!--- This checklist exists to help you remember doing the chores when
you submit a PR. -->
<!--- Put an `x` in all the boxes that apply. -->
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).

<!-- See
https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released
for more details. -->
<!-- Check with `yarn version check` and fix with `yarn version check
-i` -->
- [x] I have set the packages that need to be released for my changes to
be effective.

<!-- The "Testing chores" workflow validates that your PR follows our
guidelines. -->
<!-- If it doesn't pass, click on it to see details as to what your PR
might be missing. -->
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
  • Loading branch information
arcanis authored Oct 16, 2023
1 parent d181aa6 commit 3e2dfb2
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 11 deletions.
11 changes: 11 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"node": ">=18.12.0"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
"@mdx-js/react": "^1.6.22",
"@yarnpkg/types": "workspace:^",
"chalk": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@babel/parser",
"version": "7.23.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@babel/traverse",
"version": "7.99.0"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@types/babel__traverse",
"version": "7.99.0"
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ describe(`Plugins`, () => {
makeTemporaryEnv({}, {
tsEnableAutoTypes: true,
}, async ({path, run, source}) => {
await run(`add`, `@iarna/toml`);
await run(`add`, `@babel/[email protected]`);

await expect(readManifest(path)).resolves.toMatchObject({
dependencies: {
[`@iarna/toml`]: `^1.0.0`,
[`@babel/traverse`]: `7.99.0`,
},
devDependencies: {
[`@types/iarna__toml`]: `^1`,
[`@types/babel__traverse`]: `^7`,
},
});
}),
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2825,6 +2825,13 @@ __metadata:
languageName: node
linkType: hard

"@iarna/toml@npm:^2.2.5":
version: 2.2.5
resolution: "@iarna/toml@npm:2.2.5"
checksum: b61426dc1a3297bbcb24cb8e9c638663866b4bb6f28f2c377b167e4b1f8956d8d208c484b73bb59f4232249903545cc073364c43576d2d5ad66afbd730ad24a9
languageName: node
linkType: hard

"@istanbuljs/load-nyc-config@npm:^1.0.0":
version: 1.1.0
resolution: "@istanbuljs/load-nyc-config@npm:1.1.0"
Expand Down Expand Up @@ -5252,6 +5259,7 @@ __metadata:
"@babel/preset-env": "npm:^7.18.10"
"@babel/preset-react": "npm:^7.18.6"
"@babel/preset-typescript": "npm:^7.18.6"
"@iarna/toml": "npm:^2.2.5"
"@mdx-js/react": "npm:^1.6.22"
"@types/jest": "npm:^28.1.6"
"@types/micromatch": "npm:^4.0.1"
Expand Down

0 comments on commit 3e2dfb2

Please sign in to comment.