forked from line/line-bot-sdk-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
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
02 support only esm at first #15
Draft
Yang-33
wants to merge
6
commits into
01-02-use-vitest
Choose a base branch
from
02-support-only-esm-at-first
base: 01-02-use-vitest
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yang-33
changed the base branch from
master
to
01-stop-reading-package-json-in-code
March 27, 2024 14:53
vitestにしたら全て解決した vitejs/vite#15714 これと全く同じ問題にあたった。 |
local publishまでして検証してないけど、依存を他のプロジェクトに入れたらちゃんとESMで動いてそう |
Yang-33
force-pushed
the
01-stop-reading-package-json-in-code
branch
from
April 1, 2024 02:36
7e40057
to
2ea088a
Compare
Draft
Yang-33
force-pushed
the
02-support-only-esm-at-first
branch
from
April 1, 2024 02:46
9c3c510
to
c697249
Compare
Yang-33
changed the base branch from
01-stop-reading-package-json-in-code
to
01-02-use-vitest
April 1, 2024 02:46
Yang-33
force-pushed
the
02-support-only-esm-at-first
branch
from
April 1, 2024 02:47
c697249
to
8aa376d
Compare
Yang-33
force-pushed
the
01-02-use-vitest
branch
from
April 2, 2024 00:33
7dc13c5
to
4aedf23
Compare
When line-bot-sdk-nodejs supports ESM, we will use ESM code for testing. Vitest supports ESM+Typescript. This change will switch from using mocha to using vitest. Also, along with mocha, nyc will be removed from dependencies because vitest supports coverage as well. About the workaround: 1. Running vitest 1.4.0 results in TypeScript errors due to an issue with vite, which vitest uses. The latest version of vite has fixed this, so I explicitly added the latest vite to the dev dependencies. - vitejs/vite#15714 2. Running vite for CJS leads to TypeScript errors due to an issue with rollup, which vite uses. There is no good workaround for CJS. I resolved this by rewriting node_modules as a workaround. There are no problems using vitest(?) * rollup/rollup#5199 * vitest-dev/vitest#4567
Yang-33
force-pushed
the
02-support-only-esm-at-first
branch
from
April 2, 2024 00:38
fb798c5
to
1cba2c3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
テストが全く動かない点に目をつぶれば、目標はある程度達成できている...?ここではESMのみサポートに切り替え、CJS対応は次の変更でやる