Skip to content

Commit 7ed3456

Browse files
authoredJul 17, 2021
feat: add link field in schema (#525)
1 parent b33791b commit 7ed3456

File tree

4 files changed

+1130
-1011
lines changed

4 files changed

+1130
-1011
lines changed
 

‎package-lock.json

+1,098-991
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,28 @@
4949
"@commitlint/cli": "^12.1.4",
5050
"@commitlint/config-conventional": "^12.1.4",
5151
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
52-
"babel-jest": "^27.0.5",
52+
"babel-jest": "^27.0.6",
5353
"cross-env": "^7.0.3",
54-
"css-loader": "^5.2.4",
54+
"css-loader": "^5.2.7",
5555
"del": "^6.0.0",
56-
"del-cli": "^4.0.0",
56+
"del-cli": "^4.0.1",
5757
"es-check": "5.2.3",
58-
"eslint": "^7.28.0",
58+
"eslint": "^7.30.0",
5959
"eslint-config-prettier": "^8.3.0",
6060
"eslint-plugin-import": "^2.23.4",
6161
"file-loader": "^6.2.0",
62-
"husky": "^6.0.0",
63-
"jest": "^27.0.4",
62+
"husky": "^7.0.1",
63+
"jest": "^27.0.6",
6464
"jsdom": "^16.6.0",
65-
"lint-staged": "^11.0.0",
65+
"lint-staged": "^11.0.1",
6666
"memfs": "^3.2.2",
6767
"npm-run-all": "^4.1.5",
68-
"prettier": "^2.3.1",
69-
"sass": "^1.35.1",
68+
"prettier": "^2.3.2",
69+
"sass": "^1.35.2",
7070
"sass-loader": "^12.1.0",
7171
"semver": "^7.3.4",
72-
"standard-version": "^9.3.0",
73-
"webpack": "^5.39.1",
72+
"standard-version": "^9.3.1",
73+
"webpack": "^5.45.1",
7474
"webpack-cli": "^4.7.2",
7575
"webpack-dev-server": "^3.11.2"
7676
},

‎src/options.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"type": "object",
44
"properties": {
55
"injectType": {
6-
"description": "Allows to setup how styles will be injected into DOM (https://github.com/webpack-contrib/style-loader#injecttype).",
6+
"description": "Allows to setup how styles will be injected into DOM.",
7+
"link": "https://github.com/webpack-contrib/style-loader#injecttype",
78
"enum": [
89
"styleTag",
910
"singletonStyleTag",
@@ -15,11 +16,13 @@
1516
]
1617
},
1718
"attributes": {
18-
"description": "Adds custom attributes to tag (https://github.com/webpack-contrib/style-loader#attributes).",
19+
"description": "Adds custom attributes to tag.",
20+
"link": "https://github.com/webpack-contrib/style-loader#attributes",
1921
"type": "object"
2022
},
2123
"insert": {
22-
"description": "Inserts `<style>`/`<link>` at the given position (https://github.com/webpack-contrib/style-loader#insert).",
24+
"description": "Inserts `<style>`/`<link>` at the given position.",
25+
"link": "https://github.com/webpack-contrib/style-loader#insert",
2326
"anyOf": [
2427
{
2528
"type": "string"
@@ -30,15 +33,18 @@
3033
]
3134
},
3235
"base": {
33-
"description": "Sets module ID base for DLLPlugin (https://github.com/webpack-contrib/style-loader#base).",
36+
"description": "Sets module ID base for DLLPlugin.",
37+
"link": "https://github.com/webpack-contrib/style-loader#base",
3438
"type": "number"
3539
},
3640
"esModule": {
37-
"description": "Use the ES modules syntax (https://github.com/webpack-contrib/css-loader#esmodule).",
41+
"description": "Use the ES modules syntax.",
42+
"link": "https://github.com/webpack-contrib/css-loader#esmodule",
3843
"type": "boolean"
3944
},
4045
"styleTagTransform": {
4146
"description": "Transform tag and css when insert 'style' tag into the DOM",
47+
"link": "https://github.com/webpack-contrib/style-loader#styleTagTransform",
4248
"anyOf": [
4349
{
4450
"type": "string"

‎test/__snapshots__/validate-options.test.js.snap

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@ exports[`validate options should throw an error on the "attributes" option with
44
"Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
55
- options.attributes should be an object:
66
object {}
7-
-> Adds custom attributes to tag (https://github.com/webpack-contrib/style-loader#attributes)."
7+
-> Adds custom attributes to tag.
8+
-> Read more at https://github.com/webpack-contrib/style-loader#attributes"
89
`;
910

1011
exports[`validate options should throw an error on the "esModule" option with "true" value 1`] = `
1112
"Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
1213
- options.esModule should be a boolean.
13-
-> Use the ES modules syntax (https://github.com/webpack-contrib/css-loader#esmodule)."
14+
-> Use the ES modules syntax.
15+
-> Read more at https://github.com/webpack-contrib/css-loader#esmodule"
1416
`;
1517

1618
exports[`validate options should throw an error on the "injectType" option with "unknown" value 1`] = `
1719
"Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
1820
- options.injectType should be one of these:
1921
\\"styleTag\\" | \\"singletonStyleTag\\" | \\"autoStyleTag\\" | \\"lazyStyleTag\\" | \\"lazySingletonStyleTag\\" | \\"lazyAutoStyleTag\\" | \\"linkTag\\"
20-
-> Allows to setup how styles will be injected into DOM (https://github.com/webpack-contrib/style-loader#injecttype)."
22+
-> Allows to setup how styles will be injected into DOM.
23+
-> Read more at https://github.com/webpack-contrib/style-loader#injecttype"
2124
`;
2225

2326
exports[`validate options should throw an error on the "insert" option with "true" value 1`] = `
2427
"Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
2528
- options.insert should be one of these:
2629
string | function
27-
-> Inserts \`<style>\`/\`<link>\` at the given position (https://github.com/webpack-contrib/style-loader#insert).
30+
-> Inserts \`<style>\`/\`<link>\` at the given position.
31+
-> Read more at https://github.com/webpack-contrib/style-loader#insert
2832
Details:
2933
* options.insert should be a string.
3034
* options.insert should be an instance of function."
@@ -35,6 +39,7 @@ exports[`validate options should throw an error on the "styleTagTransform" optio
3539
- options.styleTagTransform should be one of these:
3640
string | function
3741
-> Transform tag and css when insert 'style' tag into the DOM
42+
-> Read more at https://github.com/webpack-contrib/style-loader#styleTagTransform
3843
Details:
3944
* options.styleTagTransform should be a string.
4045
* options.styleTagTransform should be an instance of function."
@@ -45,6 +50,7 @@ exports[`validate options should throw an error on the "styleTagTransform" optio
4550
- options.styleTagTransform should be one of these:
4651
string | function
4752
-> Transform tag and css when insert 'style' tag into the DOM
53+
-> Read more at https://github.com/webpack-contrib/style-loader#styleTagTransform
4854
Details:
4955
* options.styleTagTransform should be a string.
5056
* options.styleTagTransform should be an instance of function."

0 commit comments

Comments
 (0)
Please sign in to comment.