-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
使用 tshy 来默认支持 cjs 和 esm #5257
Comments
node-modules/is-type-of#22 |
通过 https://github.com/node-modules/tshy-after 保留 package.json types 配置。 |
BREAKING CHANGE: Drop Node.js < 16 support eggjs/egg#5257
BREAKING CHANGE: Drop Node.js < 16 support eggjs/egg#5257
[skip ci] ## [2.0.0](v1.1.1...v2.0.0) (2023-10-05) ### ⚠ BREAKING CHANGES * Drop Node.js < 16 support eggjs/egg#5257 ### Features * refactor with typescript ([#7](#7)) ([9e2a9ff](9e2a9ff))
BREAKING CHANGE: Drop Node.js < 16 support Other BREAKING changes: - remove stsToken support - remove headerEncoding support - remove Bucket, Image Client support eggjs/egg#5257
[skip ci] ## [2.0.0](v1.2.6...v2.0.0) (2023-10-05) ### ⚠ BREAKING CHANGES * Drop Node.js < 16 support Other BREAKING changes: - remove stsToken support - remove headerEncoding support - remove Bucket, Image Client support eggjs/egg#5257 ### Features * refactor with typescript ([#12](#12)) ([5a0eb01](5a0eb01))
BREAKING CHANGE: Drop Node.js < 16 support closes #116 part of eggjs/egg#5257 --------- Co-authored-by: hanquliu <[email protected]>
[skip ci] ## [4.0.0](v3.0.0...v4.0.0) (2023-10-11) ### ⚠ BREAKING CHANGES * Drop Node.js < 16 support closes #116 part of eggjs/egg#5257 ### Features * refactor with typescript to support esm and cjs both ([#117](#117)) ([7193ec1](7193ec1))
BREAKING CHANGE: drop Node.js < 14 deps: use @koa/[email protected] eggjs/egg#5257
BREAKING CHANGE: drop Node.js < 16 deps: use @koa/[email protected] eggjs/egg#5257
BREAKING CHANGE: drop Node.js < 16 deps: use @koa/[email protected] eggjs/egg#5257
BREAKING CHANGE: drop Node.js < 14 eggjs/egg#5257
[skip ci] ## [2.0.0](v1.1.0...v2.0.0) (2024-06-15) ### ⚠ BREAKING CHANGES * drop Node.js < 18.19.0 support eggjs/egg#5257 ### Features * support cjs and esm both ([#8](#8)) ([a092108](a092108))
eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated workflow configurations to include Node.js version 22 and added `CODECOV_TOKEN`. - Removed `checkTest` parameter from the release workflow. - Updated `.gitignore` to exclude `.tshy*` and `dist` directories. - **New Features** - Significant updates to `package.json` including script modifications, dependency updates, and new export configurations. - **Tests** - Updated import paths and added a loop in test cases. - **Refactor** - Updated TypeScript configuration for stricter type checking and modern module resolution. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
BREAKING CHANGE: drop Node.js < 18.19.0 support eggjs/egg#5257
BREAKING CHANGE: drop Node.js < 18.19.0 support eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new utility functions for resolving and importing modules with support for CommonJS and ESM formats. - Added new test fixtures for CommonJS and ESM modules to validate module import functionality. - **Refactor** - Updated import statements to include file extensions (`.js`) for consistency and compatibility. - Refactored code to use async/await for asynchronous operations. - Improved path handling in tests with helper functions. - **Documentation** - Updated `package.json` with new scripts, dependencies, and module management configurations. - **Chores** - Enhanced `.gitignore` to exclude `.tshy*` files and `dist/` directory. - Modified GitHub Actions workflows for Node.js and release processes. - **Tests** - Added tests for new module import functions. - Updated existing tests to reflect new import paths and async changes. - **Configuration** - Updated `tsconfig.json` for stricter TypeScript settings and modern module resolution. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
[skip ci] ## [4.0.0](v3.0.1...v4.0.0) (2024-06-17) ### ⚠ BREAKING CHANGES * drop Node.js < 18.19.0 support eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new utility functions for resolving and importing modules with support for CommonJS and ESM formats. - Added new test fixtures for CommonJS and ESM modules to validate module import functionality. - **Refactor** - Updated import statements to include file extensions (`.js`) for consistency and compatibility. - Refactored code to use async/await for asynchronous operations. - Improved path handling in tests with helper functions. - **Documentation** - Updated `package.json` with new scripts, dependencies, and module management configurations. - **Chores** - Enhanced `.gitignore` to exclude `.tshy*` files and `dist/` directory. - Modified GitHub Actions workflows for Node.js and release processes. - **Tests** - Added tests for new module import functions. - Updated existing tests to reflect new import paths and async changes. - **Configuration** - Updated `tsconfig.json` for stricter TypeScript settings and modern module resolution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ### Features * support @eggjs/core next version ([#21](#21)) ([a37968c](a37968c))
https://johnnyreilly.com/dual-publishing-esm-cjs-modules-with-tsup-and-are-the-types-wrong 通过 @arethetypeswrong/cli 来检查配置是否正确 |
[skip ci] ## [2.0.3](v2.0.2...v2.0.3) (2024-06-19) ### Bug Fixes * use @arethetypeswrong/cli to auto add source exports ([#43](#43)) ([9ded1af](9ded1af)), closes [/github.com/eggjs/egg/issues/5257#issuecomment-2176524639](https://github.com/node-modules//github.com/eggjs/egg/issues/5257/issues/issuecomment-2176524639)
BREAKING CHANGE: drop Node.js < 18.19.0 support eggjs/egg#5257
BREAKING CHANGE: drop Node.js < 18.19.0 support eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a Least Recently Used (LRU) cache implementation with enhanced functionalities. - **Bug Fixes** - Improved cache item expiration handling and test case accuracy. - **Documentation** - Updated `README` with new import syntax and method signatures. - LICENSE changed to MIT License. - **Chores** - Updated ESLint configuration, Node.js version in workflows, and `.gitignore`. - **Refactor** - Converted test cases to use async/await and updated module imports to ES module syntax. - **Dependencies** - Updated `devDependencies` and added new scripts in `package.json`. - **Build Configuration** - Updated `tsconfig.json` for stricter typing and ES2022 target. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
[skip ci] ## [2.0.0](v1.4.0...v2.0.0) (2024-06-22) ### ⚠ BREAKING CHANGES * drop Node.js < 18.19.0 support eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a Least Recently Used (LRU) cache implementation with enhanced functionalities. - **Bug Fixes** - Improved cache item expiration handling and test case accuracy. - **Documentation** - Updated `README` with new import syntax and method signatures. - LICENSE changed to MIT License. - **Chores** - Updated ESLint configuration, Node.js version in workflows, and `.gitignore`. - **Refactor** - Converted test cases to use async/await and updated module imports to ES module syntax. - **Dependencies** - Updated `devDependencies` and added new scripts in `package.json`. - **Build Configuration** - Updated `tsconfig.json` for stricter typing and ES2022 target. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ### Features * support cjs and esm both ([#13](#13)) ([73e07bf](73e07bf))
BREAKING CHANGE: drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257
BREAKING CHANGE: drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257
[skip ci] ## [4.0.0](v3.0.0...v4.0.0) (2024-06-23) ### ⚠ BREAKING CHANGES * drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257 ### Features * support cjs and esm both by tshy ([#7](#7)) ([f021708](f021708))
BREAKING CHANGE: drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257
BREAKING CHANGE: drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257
[skip ci] ## [3.0.0](v2.0.0...v3.0.0) (2024-06-23) ### ⚠ BREAKING CHANGES * drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257 ### Features * support cjs and esm both by tshy ([#6](#6)) ([30acc65](30acc65))
通过字符串替换解决 |
支持自动复制 web 相关文件 |
大佬,目前egg.js有什么办法可以在让应用不使用ts的情况下支持esm吗 |
目前 egg 发布的 npm 包只支持 cjs 产物。需要等 egg v4 发布之后才会同时支持 cjs 和 esm 构建产物。 |
可能不需要了,如果 nodejs 20 就能支持 cjs 里面 require esm,那么我们就不需要编译出2份产物了。 |
请详细告知你的新点子(Nice Ideas):
node-modules/urllib#468 目前看起来没有什么问题,非常轻松就支持了。
修改内容
feat: support cjs and esm both by tshy BREAKING CHANGE: drop Node.js < 18.19.0 support part of https://github.com/eggjs/egg/issues/3644 https://github.com/eggjs/egg/issues/5257
__dirname
单测中的 helper 方法test/helper.ts
.github/workflows/nodejs.yml
.github/workflows/release.yml
.github/workflows/pkg.pr.new.yml
tsconfig.json
.eslintrc
.gitignore
.tshy* .eslintcache dist coverage
The text was updated successfully, but these errors were encountered: