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(transformer): add legacy decorator tests that come from TypeScript #8692

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented Jan 24, 2025

Part of #8614

All tests copy over from https://github.com/microsoft/TypeScript/blob/8da951cbb629b648753454872df4e1754982aef1/tests/cases/conformance/decorators/class, in addition, several multi-file tests were also adjusted.

The output is generated by

transpileModule(
  source,
  {
    compilerOptions: {
      target: 'esnext',
      experimentalDecorators: true,
      noEmitHelpers: true
    },
  }
)

and replace all __decorate with babelHelpers.decorate and __param with babelHelpers.decorateParam

Copy link
Member Author

Dunqing commented Jan 24, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 24, 2025
@Dunqing Dunqing force-pushed the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch from 3dd1f4d to 0abe2b8 Compare January 24, 2025 13:39
@Boshen
Copy link
Member

Boshen commented Jan 24, 2025

When ever you decide to merge.

@Dunqing Dunqing force-pushed the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch 2 times, most recently from 30c5764 to 05c7d6a Compare January 27, 2025 03:20
@Dunqing Dunqing force-pushed the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch from 05c7d6a to e9a39d9 Compare February 5, 2025 07:09
@Dunqing Dunqing force-pushed the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch 3 times, most recently from e2f2553 to 008e95a Compare February 6, 2025 13:49
Copy link
Contributor

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

Aside from my comments about the JS, there's only one thing... could you please add a comment to the top of the fixtures updater, with the URL where the original fixtures come from? And also note what kind of modifications you made to the fixtures, aside from what this script does?

If we find bugs many months down the line, it'd be helpful to have this info if we need to retrace our steps...

@overlookmotel
Copy link
Contributor

Aside from my comments about the JS, there's only one thing... could you please add a comment to the top of the fixtures updater, with the URL where the original fixtures come from? And also note what kind of modifications you made to the fixtures, aside from what this script does?

Ignore my last comment! I just saw that info's all in the comment on the transformer added in #8614.

@Dunqing Dunqing requested a review from overlookmotel February 7, 2025 12:59
@Dunqing Dunqing force-pushed the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch from 008e95a to 9849088 Compare February 7, 2025 13:00
Copy link
Contributor

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

Great!

Please go ahead and merge once conformance task fail is fixed.

@Dunqing Dunqing force-pushed the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch from 9849088 to 04ac545 Compare February 7, 2025 14:46
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Feb 7, 2025
Copy link
Member Author

Dunqing commented Feb 7, 2025

Merge activity

  • Feb 7, 9:47 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 7, 9:55 AM EST: A user added this pull request to the Graphite merge queue.
  • Feb 7, 10:35 AM EST: A user merged this pull request with the Graphite merge queue.

…ript` (#8692)

Part of #8614

All tests copy over from https://github.com/microsoft/TypeScript/blob/8da951cbb629b648753454872df4e1754982aef1/tests/cases/conformance/decorators/class, in addition, several multi-file tests were also adjusted.

The output is generated by
```ts
transpileModule(
  source,
  {
    compilerOptions: {
      target: 'esnext',
      experimentalDecorators: true,
      noEmitHelpers: true
    },
  }
)
```
and replace all `__decorate` with `babelHelpers.decorate` and `__param` with `babelHelpers.decorateParam`
@graphite-app graphite-app bot force-pushed the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch from 04ac545 to cad04d6 Compare February 7, 2025 15:19
@graphite-app graphite-app bot merged commit cad04d6 into main Feb 7, 2025
16 checks passed
@graphite-app graphite-app bot deleted the 01-24-chore_transformer_add_legacy_decorator_tests_that_come_from_typescript branch February 7, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants