Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update @babel dependencies #387

Merged
merged 1 commit into from
Oct 23, 2023
Merged

chore: update @babel dependencies #387

merged 1 commit into from
Oct 23, 2023

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Oct 22, 2023

Fixes #384

Most likely caused by DefinitelyTyped/DefinitelyTyped@5c92dcc.

@@ -111,10 +111,11 @@
"uncode-insiders": "code-insiders --uninstall-extension ms-playwright.playwright"
},
"devDependencies": {
"@babel/preset-typescript": "^7.23.2",
Copy link
Member Author

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 

@@ -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())
Copy link
Member Author

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.

@mxschmitt mxschmitt merged commit bf63d09 into main Oct 23, 2023
6 checks passed
@mxschmitt mxschmitt deleted the update-babel branch October 23, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants