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

fix: satisfies expressions are parsed as TsSatisfiesExpression #6354

Merged

Conversation

nissy-dev
Copy link
Contributor

Description: Fix #6238

BREAKING CHANGE:

Related issue (if exists): #6238

@nissy-dev nissy-dev changed the title fix: satisfies expressions are parsed as TsSatisfactionExpression fix: satisfies expressions are parsed as TsSatisfiesExpression Nov 5, 2022
@nissy-dev
Copy link
Contributor Author

nissy-dev commented Nov 5, 2022

node bindings build failed. Based on the error messages, I seem the old version swc_ecma_parser is compiled when running yarn build:dev. I don't understand why this happened. I will look into it.

In my local PC, I ran the following command and passed... Maybe, cache problem...?

napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts --cargo-cwd ./bindings -p binding_core_node

@kdy1 kdy1 self-assigned this Nov 5, 2022
@kdy1 kdy1 added this to the Planned milestone Nov 5, 2022
@kdy1
Copy link
Member

kdy1 commented Nov 5, 2022

I think this is a problematic, but you need to patch local crates using

- name: Patch
run: |
echo '[patch.crates-io]' >> bindings/Cargo.toml
./scripts/cargo/patch-section.sh >> bindings/Cargo.toml

Comment on lines +40 to +42
const _b = require(\\"../packages/b/src/index.ts\\");
async function display() {
const displayA = await Promise.resolve().then(()=>/*#__PURE__*/ _interopRequireWildcard(require(\\"../packages/a/src/index\\"))).then((c)=>c.displayA);
const displayA = await Promise.resolve().then(()=>/*#__PURE__*/ _interopRequireWildcard(require(\\"../packages/a/src/index.ts\\"))).then((c)=>c.displayA);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After applying patch dependencies correctly, this test failed. I seem #6339 causes this issue. Therefore, I updated snapshot.

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_ecma_ast

@kdy1 kdy1 enabled auto-merge (squash) November 7, 2022 02:28
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

reeset

@kdy1 kdy1 merged commit f6faeb3 into swc-project:main Nov 7, 2022
#[tag("TsSatisfactionExpr")]
TsSatisfaction(TsSatisfactionExpr),
#[tag("TsSatisfiesExpression")]
TsSatisfies(TsSatisfiesExpr),
Copy link
Contributor

Choose a reason for hiding this comment

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

I will no longer have Benny Benassi stuck in my head while working with this. Thank you!

@kdy1 kdy1 modified the milestones: Planned, v1.3.15 Nov 12, 2022
@swc-project swc-project locked as resolved and limited conversation to collaborators Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Seems all satisfies expressions are parsed as "as expression"
4 participants