Skip to content

Commit

Permalink
Merge branch 'main' into fix-router
Browse files Browse the repository at this point in the history
  • Loading branch information
clChenLiang committed Sep 19, 2023
2 parents dd2c257 + dff7960 commit 59d2241
Show file tree
Hide file tree
Showing 730 changed files with 9,028 additions and 4,745 deletions.
13 changes: 13 additions & 0 deletions .changeset/early-parents-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@modern-js/builder-webpack-provider': patch
'@modern-js/builder-rspack-provider': patch
'@modern-js/builder-doc': patch
'@modern-js/app-tools': patch
'@modern-js/plugin-proxy': patch
'@modern-js/builder': patch
'@modern-js/utils': patch
---

feat(app-tools): make logs easier to read

feat(app-tools): 让日志更容易阅读
7 changes: 7 additions & 0 deletions .changeset/few-icons-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/builder-shared': patch
---

fix(builder): remove extra quote from generated CSS module types

fix(builder): 移除生成的 CSS module 类型中多余的引号
7 changes: 7 additions & 0 deletions .changeset/four-beds-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/core': patch
---

fix(core): should not print extra logs when press Ctrl+C

fix(core): 修复按下 press Ctrl+C 时会打印多余日志的问题
7 changes: 7 additions & 0 deletions .changeset/hot-grapes-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/app-tools': patch
'@modern-js/utils': patch
---

chore(app-tools): add RouterPlugin name
chore(app-tools): 增加 RouterPlugin 名称
8 changes: 8 additions & 0 deletions .changeset/khaki-pumas-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@modern-js/builder-webpack-provider': patch
'@modern-js/builder-rspack-provider': patch
---

fix(builder): resolve-url-loader performance regression issue

fix(builder): 修复 resolve-url-loader 导致的性能下降问题
8 changes: 8 additions & 0 deletions .changeset/large-olives-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@modern-js/app-tools': patch
'@modern-js/prod-server': patch
---

fix(app-tools): failed to emit modern.config.json when distPath.root is absolute path

fix(app-tools): 修复 distPath.root 为绝对路径时无法输出 modern.config.json 的问题
7 changes: 0 additions & 7 deletions .changeset/nervous-tigers-shout.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/new-deers-sip.md

This file was deleted.

9 changes: 9 additions & 0 deletions .changeset/pink-olives-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@modern-js/builder-webpack-provider': patch
'@modern-js/builder-rspack-provider': patch
'@modern-js/builder-shared': patch
---

chore(builder): move duplicated prebundle packages to shared

chore(builder): 合并重复的预打包 packages 到 shared
6 changes: 6 additions & 0 deletions .changeset/pink-teachers-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/runtime': patch
---

fix: ssr style link should not add scriptLoading attrributes
fix: ssr style link 标签 不应该添加 scriptLoading 属性
6 changes: 0 additions & 6 deletions .changeset/purple-planes-occur.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/real-dolls-behave.md

This file was deleted.

8 changes: 8 additions & 0 deletions .changeset/rotten-bees-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@modern-js/prod-server': patch
'@modern-js/utils': patch
---

chore(prod-server): remove duplicated logger module

chore(prod-server): 移除重复的 logger 模块
7 changes: 7 additions & 0 deletions .changeset/rude-walls-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/builder-rspack-provider': patch
---

fix(builder): should not apply babel in rspack mode when tools.babel not modify config

fix(builder): 在使用 rspack 构建时,如果 tools.babel 未实际修改配置时,则不使用 babel
6 changes: 6 additions & 0 deletions .changeset/slimy-seals-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/core': patch
---

fix(core): we should not pass it, if err is not instanceof Error.
fix(core): 如果 err 不属于错误,我们不应该直接丢弃它
7 changes: 0 additions & 7 deletions .changeset/spotty-needles-drop.md

This file was deleted.

7 changes: 7 additions & 0 deletions .changeset/stale-comics-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/builder-rspack-provider': patch
---

chore(builder): apply chunkIds deterministic in Rspack mode production

chore(builder): 在 Rspack 模式下,生产环境开启 chunkIds 'deterministic'
8 changes: 8 additions & 0 deletions .changeset/strange-dingos-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@modern-js/builder-rspack-provider': patch
'@modern-js/app-tools': patch
---

chore(rspack): use DataURI module instead of rspack-plugin-virtual-module

chore(rspack): 使用 DataURI module 替代 rspack-plugin-virtual-module
7 changes: 0 additions & 7 deletions .changeset/strong-suits-attack.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/tall-files-lie.md

This file was deleted.

14 changes: 14 additions & 0 deletions .changeset/thin-ducks-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@modern-js/plugin-router-v5': patch
'@modern-js/plugin-data-loader': patch
'@modern-js/runtime': patch
'@modern-js/create-request': patch
'@modern-js/runtime-utils': patch
'@modern-js/app-tools': patch
'@modern-js/prod-server': patch
'@modern-js/server': patch
'@modern-js/utils': patch
---

refactor: split runtime utils into a seperate package
refactor: runtime utils 单独拆分成一个包
12 changes: 0 additions & 12 deletions .changeset/tough-keys-wait.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/twenty-panthers-happen.md

This file was deleted.

9 changes: 9 additions & 0 deletions .changeset/unlucky-ants-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@modern-js/builder-webpack-provider': patch
'@modern-js/builder-rspack-provider': patch
'@modern-js/builder-shared': patch
---

feat(builder): unify progress bar style in webpack / Rspack mode

feat(builder): 对齐 webpack / Rspack 模式下的进度条样式
9 changes: 0 additions & 9 deletions .changeset/unlucky-suns-refuse.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/wet-cougars-act.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/yellow-garlics-complain.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ jobs:
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${{ secrets.REPO_SCOPED_TOKEN }}' \
-d '{"ref": "main", "inputs": {"version": "latest"}}' \
https://api.github.com/repos/caohuilin/rspress/actions/workflows/release-pull-request-with-modernjs.yml/dispatches
https://api.github.com/repos/web-infra-dev/rspress/actions/workflows/release-pull-request-with-modernjs.yml/dispatches
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ website/**/.temp
.wireit/
.turbo/
playground/

# Local Netlify folder
.netlify
16 changes: 16 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ function readPackage(pkg, _context) {
pkg.dependencies.esbuild = '0.17.19';
}

// Fix peer dependencies warnings of legacy react libs
if (
pkg.name === 'flux' ||
pkg.name === 'react-inspector' ||
pkg.name === 'react-json-view' ||
pkg.name === '@mdx-js/react' ||
pkg.name === 'react-element-to-jsx-string'
) {
if (pkg.peerDependencies.react) {
pkg.peerDependencies.react = '>= 17';
}
if (pkg.peerDependencies['react-dom']) {
pkg.peerDependencies['react-dom'] = '>= 17';
}
}

const outsideModernPkgList = ['@modern-js/mdx-rs-binding'];

if (
Expand Down
3 changes: 0 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"recommendations": [
"styled-components.vscode-styled-components",
"cpylua.language-postcss",
"EditorConfig.editorconfig",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"drKnoxy.eslint-disable-snippets",
"mkaufman.htmlhint",
"streetsidesoftware.code-spell-checker",
"codezombiech.gitignore",
"aaron-bond.better-comments",
Expand Down
15 changes: 2 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"files.associations": {
".code-workspace": "jsonc",
".babelrc": "json",
".eslintrc": "jsonc",
".eslintrc*.json": "jsonc",
".stylelintrc": "jsonc",
"stylelintrc": "jsonc",
".htmlhintrc": "jsonc",
"htmlhintrc": "jsonc",
"Procfile*": "shellscript",
"README": "markdown",
"*.ttml": "xml",
"*.ttss": "css"
"README": "markdown"
},
"search.useIgnoreFiles": true,
"search.exclude": {
Expand All @@ -22,8 +16,7 @@
"**/compiled": true,
"**/doc_build": true,
"**/coverage": true,
"**/node_modules": true,
"**/bower_components": true
"**/node_modules": true
},
//
"editor.rulers": [80, 120],
Expand All @@ -32,7 +25,6 @@
"files.insertFinalNewline": true,
//
"cSpell.diagnosticLevel": "Hint",
"eslint.alwaysShowStatus": true,
"eslint.run": "onType",
"eslint.probe": [
"javascript",
Expand Down Expand Up @@ -88,9 +80,6 @@
"typescript.tsdk": "node_modules/typescript/lib",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/node_modules": false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ Some implementations of Modern.js are modified from existing projects, such as [
- `@modern-js/plugin`: the hooks API is referenced from [farrow-pipeline](https://github.com/farrow-js/farrow/tree/master/packages/farrow-pipeline).
- `@modern-js/builder`: the moduleScope and fileSize plugins are referenced from [create-react-app](https://github.com/facebook/create-react-app), the generateMetaTags function is referenced from [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin).
- `@modern-js/plugin-testing`: the jest runner is referenced from [jest-cli](https://github.com/facebook/jest/blob/fdc74af37235354e077edeeee8aa2d1a4a863032/packages/jest-cli/src/cli/index.ts#L21).
- `@modern-js/plugin-data-loader`: some code is referenced from [remix](https://github.com/remix-run/remix)
- `@modern-js/babel-plugin-module-resolver`: is modified from [babel-plugin-module-resolver](https://github.com/tleunen/babel-plugin-module-resolver)
- `@modern-js/plugin-data-loader`: some code is referenced from [remix](https://github.com/remix-run/remix).
- `@modern-js/babel-plugin-module-resolver`: is modified from [babel-plugin-module-resolver](https://github.com/tleunen/babel-plugin-module-resolver).

## License

Expand Down
3 changes: 2 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ Modern.js 中的部分代码是参考社区中的其他项目实现的,比如

- `@modern-js/bundle-require`:修改自 [bundle-require](https://github.com/egoist/bundle-require)
- `@modern-js/plugin`:hook API 的实现参考了 [farrow-pipeline](https://github.com/farrow-js/farrow/tree/master/packages/farrow-pipeline)
- `@modern-js/builder`:moduleScope 和 fileSize 插件参考了 [create-react-app](https://github.com/facebook/create-react-app),generateMetaTags 函数参考了 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin)
- `@modern-js/builder`:moduleScope 和 fileSize 插件参考了 [create-react-app](https://github.com/facebook/create-react-app),generateMetaTags 函数参考了 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin)
- `@modern-js/plugin-testing`:jest runner 参考了 [jest-cli](https://github.com/facebook/jest/blob/fdc74af37235354e077edeeee8aa2d1a4a863032/packages/jest-cli/src/cli/index.ts#L21)
- `@modern-js/plugin-data-loader`:部分实现参考了 [remix](https://github.com/remix-run/remix)
- `@modern-js/babel-plugin-module-resolver`: 修改自 [babel-plugin-module-resolver](https://github.com/tleunen/babel-plugin-module-resolver)

## License

Expand Down
20 changes: 20 additions & 0 deletions packages/builder/builder-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# @modern-js/builder-cli

## 2.35.0

### Patch Changes

- e76d1a9: feat(builder-cli): add welcome log

feat(builder-cli): 增加欢迎日志

- Updated dependencies [3b25410]
- Updated dependencies [e2def6e]
- Updated dependencies [8ed713c]
- Updated dependencies [15b834f]
- Updated dependencies [28128ca]
- Updated dependencies [4027a6a]
- Updated dependencies [9f13314]
- @modern-js/builder-rspack-provider@2.35.0
- @modern-js/builder@2.35.0
- @modern-js/utils@2.35.0
- @modern-js/builder-webpack-provider@2.35.0

## 2.34.0

### Patch Changes
Expand Down
Loading

0 comments on commit 59d2241

Please sign in to comment.