-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update @babel dependencies #387
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mxschmitt
commented
Oct 22, 2023
@@ -111,10 +111,11 @@ | |||
"uncode-insiders": "code-insiders --uninstall-extension ms-playwright.playwright" | |||
}, | |||
"devDependencies": { | |||
"@babel/preset-typescript": "^7.23.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had to add it because of:
playwright-vscode on update-babel [!] is 📦 v1.0.16 via v18.17.1
❯ npm run build
> [email protected] build
> npm run esbuild -- --minify
> [email protected] esbuild
> esbuild ./src/babelBundle.ts ./src/extension.ts ./src/oopReporter.ts ./src/debugTransform.ts --bundle --outdir=out --external:vscode --external:./babelBundle --external:./debugTransform --external:./oopReporter --format=cjs --platform=node --target=ES2019 --minify
✘ [ERROR] Could not resolve "@babel/preset-typescript/package.json"
node_modules/@babel/core/lib/config/files/module-types.js:99:40:
99 │ const packageJson = require("@babel/preset-typescript/package.json");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/preset-typescript/package.json" as external to exclude it from the
bundle, which will remove this error. You can also surround this "require" call with a try/catch
block to handle this failure at run-time instead of bundle-time.
1 error
playwright-vscode on update-babel [!] is 📦 v1.0.16 via v18.17.1
mxschmitt
commented
Oct 22, 2023
@@ -29,7 +29,7 @@ export default declare(api => { | |||
if (!isAwaitExpression && !isCallExpression) | |||
return; | |||
// Prevent re-enterability without calling path.skip. | |||
if (t.isBlockStatement(path.parentPath) && t.isTryStatement(path.parentPath.parentPath)) | |||
if (path.parentPath.isBlockStatement() && path.parentPath.parentPath.isTryStatement()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had to change this because of:
> tsc && eslint . --ext .ts,.tsx,.js
src/debugTransform.ts:32:32 - error TS2345: Argument of type 'NodePath<Node>' is not assignable to parameter of type 'Node | null | undefined'.
Property 'kind' is missing in type 'NodePath<Node>' but required in type 'TSPropertySignature'.
32 if (t.isBlockStatement(path.parentPath) && t.isTryStatement(path.parentPath.parentPath))
~~~~~~~~~~~~~~~
node_modules/@babel/types/lib/index.d.ts:1160:5
1160 kind: "get" | "set";
~~~~
'kind' is declared here.
src/debugTransform.ts:32:69 - error TS2345: Argument of type 'NodePath<Node> | null' is not assignable to parameter of type 'Node | null | undefined'.
Type 'NodePath<Node>' is not assignable to type 'Node | null | undefined'.
32 if (t.isBlockStatement(path.parentPath) && t.isTryStatement(path.parentPath.parentPath))
~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 2 errors in the same file, starting at: src/debugTransform.ts:32
playwright-vscode on update-babel [!] is 📦 v1.0.16 via v18.17.1 took 4s
Note: Did not test this.
dgozman
approved these changes
Oct 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #384
Most likely caused by DefinitelyTyped/DefinitelyTyped@5c92dcc.