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 typescript with cjs compile issue #802

Merged
merged 4 commits into from
Apr 5, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/getting-started/requirements.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Requirements

* **Node.js** >= 18.
* It uses ES2015.
* It uses ES2022.
* [**npm**](https://www.npmjs.com/), preferably >=10

Other dependencies are installed via npm, and do not need to be pre-installed.
2 changes: 1 addition & 1 deletion examples/echo-bot-ts-cjs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/echo-bot-ts-cjs/package.json
Original file line number Diff line number Diff line change
@@ -17,6 +17,6 @@
"@types/express": "^4.17.17",
"@types/node": "^20.6.3",
"rimraf": "^5.0.1",
"typescript": "^5.4.3"
"typescript": "^5.2.2"
Copy link
Contributor Author

@Yang-33 Yang-33 Apr 3, 2024

Choose a reason for hiding this comment

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

I manually confirmed that examples can be compiled with five versions from 5.0 to 5.4.

}
}
2 changes: 1 addition & 1 deletion examples/echo-bot-ts-cjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2017",
"target": "ES2022",
"module": "commonjs",
"outDir": "./dist",
"strict": true,
4 changes: 2 additions & 2 deletions examples/echo-bot-ts-esm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"target": "ESNext",
"target": "ES2022",
"module": "NodeNext",
"outDir": "./dist",
"moduleResolution": "NodeNext",
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"target": "ES2022",
"esModuleInterop": true,
"target": "ES2018",
"noImplicitAny": true,
"newLine": "LF",
"sourceMap": true,