Skip to content

v1.0.2

Latest

Choose a tag to compare

@Brooooooklyn Brooooooklyn released this 13 Nov 06:30
· 1 commit to main since this release
Immutable release. Only release title and notes can be modified.
v1.0.2
16c0f34

Highlights

CommonJS TypeScript projects now run the way tsc would build them:

  • import/export in a CommonJS package runs as CommonJS when tsconfig compiles it to CommonJS. Its exports are no longer frozen, so mock.method() from node:test works on them (#911, closes #905).
  • package.json "type" decides the format of .ts files under module: node16/node18/nodenext. A package with no "type" is CommonJS, as in tsc (#908, fixes #907).
  • Files whose only imports/exports are type-only run as CommonJS, as Node.js type stripping does (#910, fixes #909).

Also:

  • Faster startup: fewer filesystem calls while resolving modules, about 5–12% less time in the PR's benchmarks (#913).
  • oxnode watch on macOS no longer reopens folder watches when folders are replaced, which made memory grow without limit (#921, closes #906).
  • Embedders using the crate without the napi feature get initialize_loader_js and freeze_tsconfig_js back (#895).

Features

  • feat(core): compile ES module syntax to CommonJS where tsc would (#905) by @darcyrush in #911

Bug Fixes

  • fix(core): keep the loader initialization APIs for embedders by @fengmk2 in #895
  • fix(core): let package.json "type" decide .ts format under node* modules by @darcyrush in #908
  • fix(core): run files whose only imports and exports are type-only as CommonJS by @darcyrush in #910
  • fix(cli): stop reopening folder watches on macOS as folders are replaced (#906) by @Brooooooklyn in #921

Performance

  • perf: avoid redundant filesystem checks during resolution by @fengmk2 in #913

Dependencies

All dependency PRs
  • chore(deps): update npm packages by @renovate[bot] in #893
  • chore(deps): update rust crate mimalloc-safe to v0.1.68 by @renovate[bot] in #892
  • chore(deps): update oxc to 0.156 by @fengmk2 in #896
  • chore(deps): update napi by @renovate[bot] in #897
  • chore(deps): update dependency rolldown to v1.2.16 by @renovate[bot] in #898
  • chore(deps): update rust crate napi to v3.16.1 by @renovate[bot] in #899
  • chore(deps): update npm packages by @renovate[bot] in #900
  • chore(deps): update dependency postgres to v4 by @renovate[bot] in #902
  • chore(deps): update rust crate mimalloc-safe to v0.1.69 by @renovate[bot] in #901
  • chore(deps): update dependency rolldown to v1.3.0 by @renovate[bot] in #912
  • chore(deps): update oxc to ^0.157.0 by @renovate[bot] in #894
  • chore(deps): upgrade emnapi beta.3 and napi cli by @Brooooooklyn in #903
  • chore(deps): update npm packages by @renovate[bot] in #914
  • chore(deps): update dependency postgres to v4.1.0 by @renovate[bot] in #915
  • chore(deps): update dependency rolldown to v1.3.1 by @renovate[bot] in #916
  • chore(deps): update oxc to ^0.158.0 by @renovate[bot] in #917
  • chore(deps): update napi by @renovate[bot] in #920
  • chore(deps): update dependency rolldown to v1.3.2 by @renovate[bot] in #918

Tests

New Contributors

Full Changelog: v1.0.1...v1.0.2