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

refactor(backend): use node16 for moduleResolution #10938

Merged
merged 15 commits into from
Jun 25, 2023
Merged

Conversation

syuilo
Copy link
Member

@syuilo syuilo commented Jun 2, 2023

What

Why

got v13を使うにはそうしないといけないらしい
https://github.com/sindresorhus/got/issues/2267#issuecomment-1565659377

あとnodeは使わない方が良いらしい
https://blog.s2n.tech/articles/dont-use-moduleresolution-node

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/backend Server side specific issue/PR packages/backend:test packages/frontend Client side specific issue/PR labels Jun 2, 2023
@syuilo
Copy link
Member Author

syuilo commented Jun 2, 2023

これどうする?
image

@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #10938 (6c25281) into develop (ef354e9) will increase coverage by 16.50%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           develop   #10938       +/-   ##
============================================
+ Coverage    77.43%   93.93%   +16.50%     
============================================
  Files          907        2      -905     
  Lines        91356      462    -90894     
  Branches      6884       59     -6825     
============================================
- Hits         70742      434    -70308     
+ Misses       20614       28    -20586     

see 905 files with indirect coverage changes

@github-actions github-actions bot added packages/misskey-js packages/sw and PWA ServiceWorker and PWA related issue/PR labels Jun 2, 2023
@syuilo
Copy link
Member Author

syuilo commented Jun 2, 2023

おあー

@syuilo
Copy link
Member Author

syuilo commented Jun 2, 2023

複数の依存関係があるからこっちでメンテナンスするのは面倒そう

@syuilo
Copy link
Member Author

syuilo commented Jun 2, 2023

他のライブラリないかしら

@syuilo
Copy link
Member Author

syuilo commented Jun 9, 2023

こまこまのこまり

@syuilo
Copy link
Member Author

syuilo commented Jun 18, 2023

おごごごご

@saschanaz
Copy link
Member

Error: src/core/DownloadService.ts(6,23): error TS7016: Could not find a declaration file for module 'private-ip'. '/home/runner/work/misskey/misskey/node_modules/.pnpm/private-ip@3.0.0/node_modules/private-ip/index.js' implicitly has an 'any' type.

private-ipよりipaddr.jsの方を直接使うのも良さそうです(なぜかprivate-ipはipaddr.jsのparserだけ使っていてrange()機能は使っていません)

@syuilo
Copy link
Member Author

syuilo commented Jun 22, 2023

Error: src/core/DownloadService.ts(6,23): error TS7016: Could not find a declaration file for module 'private-ip'. '/home/runner/work/misskey/misskey/node_modules/.pnpm/private-ip@3.0.0/node_modules/private-ip/index.js' implicitly has an 'any' type.

private-ipよりipaddr.jsの方を直接使うのも良さそうです(なぜかprivate-ipはipaddr.jsのparserだけ使っていてrange()機能は使っていません)

そうするか

@syuilo syuilo marked this pull request as ready for review June 24, 2023 22:50
@saschanaz
Copy link
Member

@/misc/周りのライブラリcopypasteはちょっと控えたい気も

  • rndstr: 一応 rndstr.default でなんとかなりますが、https://github.com/syuilo/rndstr をアップデートしてES moduleにしたらもっとようさそうです
  • ms: @types/msあるからそれで何とかなります

@saschanaz
Copy link
Member

(rndstr管理されてないしhttps://www.npmjs.com/package/randomstring 使ってもよさそうですがどうでしょう)

@syuilo
Copy link
Member Author

syuilo commented Jun 25, 2023

(rndstr管理されてないしhttps://www.npmjs.com/package/randomstring 使ってもよさそうですがどうでしょう)

良さそう

@syuilo
Copy link
Member Author

syuilo commented Jun 25, 2023

マージするか

Copy link
Member

@saschanaz saschanaz left a comment

Choose a reason for hiding this comment

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

よさそう

@syuilo syuilo merged commit 8099bc2 into develop Jun 25, 2023
@syuilo syuilo deleted the module-node16 branch June 25, 2023 12:13
@syuilo
Copy link
Member Author

syuilo commented Jun 25, 2023

🙏🙏🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend:test packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js packages/sw and PWA ServiceWorker and PWA related issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants