Skip to content

Commit 9aedec2

Browse files
committed
docs(en): merging all conflicts
2 parents 0f786c4 + 1bc7704 commit 9aedec2

29 files changed

+1370
-1123
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ will do this automatically. This step pulls in documentation for loaders/plugins
2828
in separate repositories such as the ones found in the [webpack-contrib][4] organization.
2929
See the `package.json` for the full list of `scripts`.
3030

31-
> Note that **Node 12.x** or above is required for the build process to run properly.
31+
> **Note**
32+
>
33+
> **Node v14.20** or above is required for the build process to run properly.
3234
3335
## Contributor License Agreement
3436

.github/workflows/cancel.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Cancel
2+
on:
3+
workflow_run:
4+
workflows: ["Ensure PR"]
5+
types:
6+
- requested
7+
jobs:
8+
cancel:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: styfle/cancel-workflow-action@0.10.1
12+
with:
13+
workflow_id: ${{ github.event.workflow.id }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Dependency Review'
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Checkout Repository'
12+
uses: actions/checkout@v3
13+
- name: 'Dependency Review'
14+
uses: actions/dependency-review-action@v2

.github/workflows/testing.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ jobs:
116116
- name: Cypress run
117117
uses: cypress-io/github-action@v4
118118
with:
119+
browser: chrome
119120
config-file: cypress.config.js
120121
build: yarn build
121122
start: yarn serve-dist

.markdownlint.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
"MD002": false,
44
"MD004": { "style": "dash" },
55
"MD007": { "indent": 2 },
6-
"MD013": { "line_length": 600 },
6+
"MD013": { "line_length": 600, "code_blocks": false },
7+
"MD024": {
8+
"siblings_only": true
9+
},
710
"MD026": false,
811
"MD029": { "style": "ordered" },
912
"MD033": false,
1013
"MD034": false,
1114
"MD036": false,
1215
"MD041": false,
16+
"MD053": false,
1317
"no-hard-tabs": false,
1418
"whitespace": false
1519
}

.markdownlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

package.json

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"lint": "run-s lint:*",
4545
"lint:js": "npm run lint-js .",
4646
"lint-js": "eslint --cache --cache-location .cache/.eslintcache",
47-
"lint:markdown": "npm run lint-markdown *.md",
48-
"lint-markdown": "markdownlint --config ./.markdownlint.json --ignore '.vale/**/*.md' --ignore '.github/**/*.md'",
47+
"lint:markdown": "npm run lint-markdown '**/*.{md,mdx}'",
48+
"lint-markdown": "markdownlint --config ./.markdownlint.json",
4949
"lint:prose": "vale --config='.vale.ini' src/content",
5050
"lint:links": "hyperlink -c 8 --root dist -r dist/index.html --canonicalroot https://webpack.js.org/ --internal --skip /plugins/extract-text-webpack-plugin/ --skip /printable --skip https:// --skip http:// --skip sw.js > internal-links.tap; cat internal-links.tap | tap-spot",
5151
"lint:heading": "textlint --fix src/content/*",
@@ -57,56 +57,60 @@
5757
"printable": "node ./src/scripts/concatenate-docs.mjs",
5858
"jest": "NODE_OPTIONS=--experimental-vm-modules jest --config=jest.config.mjs",
5959
"cypress:open": "cypress open",
60-
"cypress:run": "cypress run",
60+
"cypress:run": "cypress run --browser chrome",
6161
"prettier": "prettier --write '**/*.{js,json,jsx,css,scss,md,mdx}'",
6262
"prepare": "husky install && rimraf ./node_modules/.cache/webpack && yarn-deduplicate --strategy fewer"
6363
},
6464
"lint-staged": {
6565
"*.{js,jsx,md,mdx}": [
6666
"npm run lint-js"
6767
],
68-
"*.md": [
68+
"*.{md,mdx}": [
6969
"npm run lint-markdown"
7070
],
7171
"*.{js,jsx,css,scss,md,mdx,json}": [
7272
"prettier --write"
7373
]
7474
},
7575
"devDependencies": {
76-
"@babel/core": "^7.19.1",
76+
"@babel/core": "^7.19.6",
7777
"@babel/eslint-parser": "^7.19.1",
7878
"@babel/plugin-proposal-class-properties": "^7.17.12",
79-
"@babel/preset-env": "^7.19.1",
79+
"@babel/preset-env": "^7.19.4",
8080
"@babel/preset-react": "^7.18.6",
8181
"@mdx-js/loader": "^2.0.0-next.9",
82-
"@octokit/auth-action": "^2.0.1",
83-
"@octokit/rest": "^19.0.4",
82+
"@octokit/auth-action": "^2.0.2",
83+
"@octokit/rest": "^19.0.5",
8484
"@pmmmwh/react-refresh-webpack-plugin": "next",
85-
"@svgr/webpack": "^6.3.1",
86-
"autoprefixer": "^10.4.11",
87-
"babel-loader": "^8.2.5",
85+
"@svgr/webpack": "^6.5.1",
86+
"autoprefixer": "^10.4.13",
87+
"babel-loader": "^9.0.0",
8888
"copy-webpack-plugin": "^11.0.0",
8989
"css-loader": "^6.7.1",
90-
"css-minimizer-webpack-plugin": "^4.1.0",
91-
"cypress": "^10.7.0",
90+
"css-minimizer-webpack-plugin": "^4.2.2",
91+
"cypress": "^10.11.0",
9292
"directory-tree": "^3.3.1",
9393
"directory-tree-webpack-plugin": "^1.0.3",
9494
"duplexer": "^0.1.1",
95-
"eslint": "^8.23.1",
95+
"eslint": "^8.26.0",
9696
"eslint-config-prettier": "^8.5.0",
9797
"eslint-plugin-cypress": "^2.12.1",
98-
"eslint-plugin-mdx": "^2.0.4",
99-
"eslint-plugin-react": "^7.31.8",
98+
"eslint-plugin-mdx": "^2.0.5",
99+
"eslint-plugin-react": "^7.31.10",
100100
"eslint-plugin-react-hooks": "^4.6.0",
101101
"front-matter": "^4.0.2",
102+
<<<<<<< HEAD
102103
"github-slugger": "^1.4.0",
103104
"html-loader": "^2.1.2",
105+
=======
106+
"github-slugger": "^2.0.0",
107+
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
104108
"html-webpack-plugin": "^5.5.0",
105109
"http-server": "^14.1.1",
106110
"husky": "^8.0.1",
107111
"hyperlink": "^5.0.4",
108-
"jest": "^29.0.3",
109-
"lightningcss": "^1.15.1",
112+
"jest": "^29.2.2",
113+
"lightningcss": "^1.16.0",
110114
"lint-staged": "^13.0.3",
111115
"lodash": "^4.17.21",
112116
"markdownlint": "^0.26.2",
@@ -117,7 +121,7 @@
117121
"modularscale-sass": "^3.0.3",
118122
"node-fetch": "^3.2.10",
119123
"npm-run-all": "^4.1.1",
120-
"postcss": "^8.4.16",
124+
"postcss": "^8.4.18",
121125
"postcss-loader": "^7.0.1",
122126
"prettier": "^2.7.1",
123127
"react-refresh": "^0.14.0",
@@ -131,21 +135,21 @@
131135
"remark-html": "^15.0.1",
132136
"remark-refractor": "montogeek/remark-refractor",
133137
"rimraf": "^3.0.2",
134-
"sass": "^1.54.9",
135-
"sass-loader": "^13.0.2",
138+
"sass": "^1.55.0",
139+
"sass-loader": "^13.1.0",
136140
"sirv-cli": "^2.0.2",
137141
"sitemap-static": "^0.4.2",
138142
"static-site-generator-webpack-plugin": "^3.4.1",
139143
"style-loader": "^3.3.1",
140-
"tailwindcss": "^3.1.8",
144+
"tailwindcss": "^3.2.1",
141145
"tap-spot": "^1.1.2",
142146
"textlint": "^11.8.2",
143147
"textlint-rule-heading": "^1.0.10",
144148
"unist-util-visit": "^4.1.1",
145149
"webpack": "^5.74.0",
146-
"webpack-bundle-analyzer": "^4.6.1",
150+
"webpack-bundle-analyzer": "^4.7.0",
147151
"webpack-cli": "^4.10.0",
148-
"webpack-dev-server": "^4.11.0",
152+
"webpack-dev-server": "^4.11.1",
149153
"webpack-merge": "^5.8.0",
150154
"workbox-webpack-plugin": "^6.5.4",
151155
"yarn-deduplicate": "^6.0.0"
@@ -157,8 +161,8 @@
157161
"react": "^17.0.2",
158162
"react-dom": "^17.0.2",
159163
"react-helmet-async": "^1.3.0",
160-
"react-router-dom": "^6.4.0",
161-
"react-spring": "^9.5.4",
164+
"react-router-dom": "^6.4.2",
165+
"react-spring": "^9.5.5",
162166
"react-tiny-popover": "5",
163167
"react-use": "^17.4.0",
164168
"react-visibility-sensor": "^5.0.2",

src/components/Configuration/Configuration.jsx

Lines changed: 0 additions & 88 deletions
This file was deleted.

src/components/Page/Page.jsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Import External Dependencies
2-
import { Children, isValidElement, useEffect, useState } from 'react';
2+
import { useEffect, useState } from 'react';
33
import PropTypes from 'prop-types';
44
import { useLocation } from 'react-router-dom';
55

@@ -9,7 +9,6 @@ import Markdown from '../Markdown/Markdown';
99
import Contributors from '../Contributors/Contributors';
1010
import Translators from '../Translators/Translators';
1111
import { PlaceholderString } from '../Placeholder/Placeholder';
12-
import { Pre } from '../Configuration/Configuration';
1312
import AdjacentPages from './AdjacentPages';
1413

1514
// Load Styling
@@ -95,16 +94,6 @@ export default function Page(props) {
9594

9695
if (typeof content === 'function') {
9796
contentRender = content({}).props.children;
98-
contentRender = Children.map(contentRender, (child) => {
99-
if (isValidElement(child)) {
100-
if (child.props.mdxType === 'pre') {
101-
// eslint-disable-next-line
102-
return <Pre children={child.props.children} />;
103-
}
104-
}
105-
106-
return child;
107-
});
10897
} else {
10998
contentRender = (
11099
<div

src/content/api/loaders.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ module.exports = function (source) {
648648
649649
这个模块将获取像下面的 bundle:
650650
651-
```
651+
```text
652652
/***/ "./src/loader.js!./src/lib.js":
653653
/*!************************************!*\
654654
!*** ./src/loader.js!./src/lib.js ***!
@@ -725,7 +725,10 @@ module.exports = function (source) {
725725
if (STYLES_REGEXP.test(source)) {
726726
source = source.replace(STYLES_REGEXP, '');
727727
return `import ${JSON.stringify(
728-
this.utils.contextify(this.context || this.rootContext, `${this.resource}.css!=!${getStylesLoader}!${this.remainingRequest}`)
728+
this.utils.contextify(
729+
this.context || this.rootContext,
730+
`${this.resource}.css!=!${getStylesLoader}!${this.remainingRequest}`
731+
)
729732
)};${source}`;
730733
}
731734
return source;

0 commit comments

Comments
 (0)