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: unable to use module type in package.json #6199

Merged
merged 12 commits into from
Apr 10, 2024
Merged

fix: unable to use module type in package.json #6199

merged 12 commits into from
Apr 10, 2024

Conversation

MarkMcCulloh
Copy link
Contributor

@MarkMcCulloh MarkMcCulloh commented Apr 10, 2024

Fixes #6130
Fixes #3601

Similar to our usage of peer dependencies, emitting .cjs instead of .js better aligns with expectations of js runtimes. While most will work with .js in most cases, we are currently explicitly emitting commonjs modules (using exports and require) so why not signal that to the runtime to remove any confusion?

TODO

  • Verify e2e
  • Add test

Misc:

  • Updated bundling to target node 20, since that's the minimum supported version
  • wing pack now packs all js/ts variants

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

Copy link

Thanks for opening this pull request! 🎉
Please consult the contributing guidelines for details on how to contribute to this project.
If you need any assistence, don't hesitate to ping the relevant owner over Slack.

Topic Owner
Wing SDK and utility APIs @chriscbr
Wing Console @ainvoner, @skyrpex, @polamoros
JSON, structs, primitives and collections @hasanaburayyan
Platforms and plugins @hasanaburayyan
Frontend resources (website, react, etc) @tsuf239
Language design @chriscbr
VSCode extension and language server @markmcculloh
Compiler architecture, inflights, lifting @yoav-steinberg
Wing Testing Framework @tsuf239
Wing CLI @markmcculloh
Build system, dev environment, releases @markmcculloh
Library Ecosystem @chriscbr
Documentation @hasanaburayyan
SDK test suite @tsuf239
Examples @hasanaburayyan
Wing Playground @eladcon

@monadabot
Copy link
Contributor

monadabot commented Apr 10, 2024

Console preview environment is available at https://wing-console-pr-6199.fly.dev 🚀

Last Updated (UTC) 2024-04-10 13:59

@monadabot
Copy link
Contributor

monadabot commented Apr 10, 2024

Benchmarks

Comparison to Baseline 🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 59ms±0.59 61ms±0.49 +2ms (+2.75%)🟥
functions_1.test.w -t sim 395ms±6.88 397ms±5.01 +2ms (+0.44%)⬜
functions_1.test.w -t tf-aws 839ms±8.83 852ms±15.42 +14ms (+1.66%)⬜
hello_world.test.w -t sim 394ms±9.51 398ms±6.29 +5ms (+1.17%)⬜
hello_world.test.w -t tf-aws 1527ms±12.26 1528ms±8.44 +1ms (+0.09%)⬜
jsii_big.test.w -t sim 2803ms±16.09 2806ms±9.96 +3ms (+0.12%)⬜
jsii_big.test.w -t tf-aws 3021ms±15.74 3030ms±18.51 +10ms (+0.32%)⬜
functions_10.test.w -t sim 483ms±5.34 489ms±9.34 +5ms (+1.06%)⬜
functions_10.test.w -t tf-aws 2172ms±13.71 2176ms±9.46 +4ms (+0.2%)⬜
jsii_small.test.w -t sim 361ms±3.63 367ms±4.64 +7ms (+1.83%)⬜
jsii_small.test.w -t tf-aws 604ms±5.69 609ms±4.68 +5ms (+0.75%)⬜
empty.test.w -t sim 360ms±4.69 355ms±4.56 -5ms (-1.35%)⬜
empty.test.w -t tf-aws 600ms±6.83 597ms±4.72 -3ms (-0.56%)⬜

⬜ Within 1.5 standard deviations
🟩 Faster, Above 1.5 standard deviations
🟥 Slower, Above 1.5 standard deviations

Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI.

Results
name mean min max moe sd
version 61ms 60ms 62ms 0ms 1ms
functions_1.test.w -t sim 397ms 387ms 408ms 5ms 7ms
functions_1.test.w -t tf-aws 852ms 838ms 910ms 15ms 22ms
hello_world.test.w -t sim 398ms 387ms 419ms 6ms 9ms
hello_world.test.w -t tf-aws 1528ms 1514ms 1550ms 8ms 12ms
jsii_big.test.w -t sim 2806ms 2783ms 2835ms 10ms 14ms
jsii_big.test.w -t tf-aws 3030ms 3009ms 3091ms 19ms 26ms
functions_10.test.w -t sim 489ms 468ms 515ms 9ms 13ms
functions_10.test.w -t tf-aws 2176ms 2145ms 2191ms 9ms 13ms
jsii_small.test.w -t sim 367ms 354ms 375ms 5ms 6ms
jsii_small.test.w -t tf-aws 609ms 597ms 615ms 5ms 7ms
empty.test.w -t sim 355ms 341ms 363ms 5ms 6ms
empty.test.w -t tf-aws 597ms 588ms 606ms 5ms 7ms
Last Updated (UTC) 2024-04-10 14:04

@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Apr 10, 2024
@MarkMcCulloh MarkMcCulloh removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Apr 10, 2024
@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Apr 10, 2024
@MarkMcCulloh MarkMcCulloh removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Apr 10, 2024
@MarkMcCulloh MarkMcCulloh marked this pull request as ready for review April 10, 2024 14:11
@MarkMcCulloh MarkMcCulloh requested a review from a team as a code owner April 10, 2024 14:11
Copy link
Contributor

mergify bot commented Apr 10, 2024

Thanks for contributing, @MarkMcCulloh! This PR will now be added to the merge queue, or immediately merged if mark/emit-ejs is up-to-date with main and the queue is empty.

@mergify mergify bot merged commit ec229e9 into main Apr 10, 2024
27 checks passed
@mergify mergify bot deleted the mark/emit-ejs branch April 10, 2024 14:40
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.68.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

root /package.json has "type":"module" Invoking functions using a wingfile inside an ESM package fails
3 participants