@microsoft/sp-build-web 1.20.1 → 1.21.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/SPBuildRig.d.ts.map +1 -1
- package/lib/SPBuildRig.js +12 -4
- package/lib/SPWebBuildRig.d.ts.map +1 -1
- package/lib/SPWebBuildRig.js +7 -4
- package/package.json +12 -16
package/lib/SPBuildRig.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SPBuildRig.d.ts","sourceRoot":"","sources":["../src/SPBuildRig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SPBuildRig.d.ts","sourceRoot":"","sources":["../src/SPBuildRig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,IAAI,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAC;AAMxD,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,QAAmC,CAAC;AACpE,eAAO,MAAM,QAAQ,EAAE,SAAS,CAAC,QAAmC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,eAAe;IAE9B,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IAEd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,SAAS,CAAC,WAAW,CAAC;IAClC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,UAAU;IACrB,SAAS,CAAC,cAAc,EA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,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,WAAW;IAU/C;;OAEG;IACH,SAAS,CAAC,gBAAgB,IAAI,SAAS,CAAC,WAAW;IAOnD;;OAEG;IACH,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAOnC;;;;;OAKG;IACH,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAMtC,SAAS,CAAC,oBAAoB,CAC5B,KAAK,EAAE,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,EACtD,KAAK,EAAE,SAAS,CAAC,WAAW,EAAE,GAC7B,IAAI;IAQP,SAAS,CAAC,aAAa,CAAC,GAAG,KAAK,EAAE,SAAS,CAAC,WAAW,EAAE,GAAG,IAAI;CAMjE"}
|
package/lib/SPBuildRig.js
CHANGED
|
@@ -24,9 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.SPBuildRig = exports.postCopy = exports.preCopy = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
27
28
|
const yargs = __importStar(require("yargs"));
|
|
28
29
|
const semver = __importStar(require("semver"));
|
|
29
|
-
const true_case_path_1 = require("true-case-path");
|
|
30
30
|
const coreBuild = __importStar(require("@microsoft/gulp-core-build"));
|
|
31
31
|
const gulp_core_build_typescript_1 = require("@microsoft/gulp-core-build-typescript");
|
|
32
32
|
const BuildRigConstants_1 = require("./BuildRigConstants");
|
|
@@ -47,9 +47,17 @@ class SPBuildRig {
|
|
|
47
47
|
}
|
|
48
48
|
initialize(gulp) {
|
|
49
49
|
if (!semver.satisfies(process.version, this.nodeSupportedVersionRange)) {
|
|
50
|
-
|
|
50
|
+
const nodeVersionMessage = `Your dev environment is running NodeJS version ${process.version} which does` +
|
|
51
51
|
' not meet the requirements for running this tool. This tool requires a version of NodeJS' +
|
|
52
|
-
` that matches ${this.nodeSupportedVersionRange}
|
|
52
|
+
` that matches "${this.nodeSupportedVersionRange}".`;
|
|
53
|
+
if (process.env.SPFX_OVERRIDE_NODE_VERSION_CHECK === 'true') {
|
|
54
|
+
// This environment variable is when testing new versions of NodeJS for compatibility.
|
|
55
|
+
// eslint-disable-next-line no-console
|
|
56
|
+
console.warn(nodeVersionMessage + ' Proceeding with execution due to override.');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new Error(nodeVersionMessage);
|
|
60
|
+
}
|
|
53
61
|
}
|
|
54
62
|
// Initialize yargs & figure out which command we are running
|
|
55
63
|
const yargsArgs = this.getYargs();
|
|
@@ -90,7 +98,7 @@ class SPBuildRig {
|
|
|
90
98
|
// Try to ensure the casing of the rootPath is correct
|
|
91
99
|
try {
|
|
92
100
|
const originalRootPath = coreBuild.getConfig().rootPath;
|
|
93
|
-
const normalizedRootPath =
|
|
101
|
+
const normalizedRootPath = fs.realpathSync.native(originalRootPath);
|
|
94
102
|
if (normalizedRootPath !== originalRootPath) {
|
|
95
103
|
coreBuild.mergeConfig({
|
|
96
104
|
rootPath: normalizedRootPath
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SPWebBuildRig.d.ts","sourceRoot":"","sources":["../src/SPWebBuildRig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,OAAO,EAEL,KAAK,WAAW,EAKjB,MAAM,4BAA4B,CAAC;AAQpC,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGtF,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAIpC,CAAC;AAEF,qBAAa,aAAc,SAAQ,UAAU;IAC3C,SAAS,CAAC,IAAI,EAAE,kBAAkB,CAAC;IACnC,SAAS,CAAC,gBAAgB,EAAE,WAA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AAW;IAIzC,SAAS,CAAC,aAAa,IAAI,WAAW;IAWtC,SAAS,CAAC,kBAAkB,IAAI,WAAW;IAI3C,SAAS,CAAC,qBAAqB,IAAI,WAAW;CAG/C"}
|
package/lib/SPWebBuildRig.js
CHANGED
|
@@ -77,12 +77,12 @@ class SPWebBuildRig extends SPBuildRig_1.SPBuildRig {
|
|
|
77
77
|
super.setupSharedConfig();
|
|
78
78
|
gulp_core_build_webpack_1.webpack.taskConfig.webpack = require('webpack');
|
|
79
79
|
gulp_core_build_sass_1.default.mergeConfig({
|
|
80
|
-
preamble: '
|
|
81
|
-
postamble: '
|
|
80
|
+
preamble: '',
|
|
81
|
+
postamble: '',
|
|
82
82
|
sassMatch: ['src/**/*.scss', 'src/**/*.sass'],
|
|
83
83
|
useCSSModules: false,
|
|
84
84
|
warnOnCssInvalidPropertyName: true,
|
|
85
|
-
dropCssFiles: true,
|
|
85
|
+
dropCssFiles: true, // Drops .css files in the lib directory for webpack,
|
|
86
86
|
warnOnNonCSSModules: true,
|
|
87
87
|
// Cast is needed due to autoprefixer types mismatch due to workspace install in odsp-web
|
|
88
88
|
autoprefixerOptions: {
|
|
@@ -148,7 +148,9 @@ class SPWebBuildRig extends SPBuildRig_1.SPBuildRig {
|
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
150
|
result.set(WebBuildRigConstants_1.WebBuildRigConstants.tasks.serve, {
|
|
151
|
-
executable: (0, gulp_core_build_1.serial)(spBuildCoreTasks.serve, (0, gulp_core_build_1.watch)(exports.serveWatchFilter, (0, gulp_core_build_1.serial)(this._preTelemetryTask,
|
|
151
|
+
executable: (0, gulp_core_build_1.serial)(spBuildCoreTasks.serve, (0, gulp_core_build_1.watch)(exports.serveWatchFilter, (0, gulp_core_build_1.serial)(this._preTelemetryTask,
|
|
152
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
153
|
+
result.get(WebBuildRigConstants_1.WebBuildRigConstants.tasks.bundle).executable, gulp_core_build_serve_1.reload, this._postTelemetryTask))),
|
|
152
154
|
arguments: (yargs) => {
|
|
153
155
|
return yargs
|
|
154
156
|
.option('port', {
|
|
@@ -183,6 +185,7 @@ class SPWebBuildRig extends SPBuildRig_1.SPBuildRig {
|
|
|
183
185
|
arguments: taskDefinition.arguments
|
|
184
186
|
});
|
|
185
187
|
});
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
186
189
|
result.set(BuildRigConstants_1.BuildRigConstants.tasks.default, result.get(WebBuildRigConstants_1.WebBuildRigConstants.tasks.bundle));
|
|
187
190
|
return result;
|
|
188
191
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-build-web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0-beta.0",
|
|
4
4
|
"description": "SharePoint Framework build rig for web projects",
|
|
5
5
|
"license": "https://aka.ms/spfx/license",
|
|
6
6
|
"homepage": "http://aka.ms/spfx",
|
|
@@ -10,33 +10,29 @@
|
|
|
10
10
|
"main": "lib/index.js",
|
|
11
11
|
"typings": "lib/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@microsoft/gulp-core-build": "3.
|
|
14
|
-
"@microsoft/gulp-core-build-sass": "4.17.
|
|
15
|
-
"@microsoft/gulp-core-build-serve": "3.
|
|
16
|
-
"@microsoft/gulp-core-build-typescript": "8.6.
|
|
17
|
-
"@microsoft/gulp-core-build-webpack": "6.0.
|
|
18
|
-
"@microsoft/rush-lib": "5.117.3",
|
|
19
|
-
"@rushstack/node-core-library": "4.0.2",
|
|
13
|
+
"@microsoft/gulp-core-build": "3.19.0",
|
|
14
|
+
"@microsoft/gulp-core-build-sass": "4.17.3",
|
|
15
|
+
"@microsoft/gulp-core-build-serve": "3.13.0",
|
|
16
|
+
"@microsoft/gulp-core-build-typescript": "8.6.3",
|
|
17
|
+
"@microsoft/gulp-core-build-webpack": "6.0.3",
|
|
20
18
|
"gulp": "4.0.2",
|
|
21
|
-
"postcss": "^8.4.19",
|
|
22
19
|
"semver": "~7.3.2",
|
|
23
|
-
"
|
|
24
|
-
"webpack": "~5.88.1",
|
|
20
|
+
"webpack": "~5.95.0",
|
|
25
21
|
"yargs": "~4.6.0",
|
|
26
|
-
"@microsoft/sp-build-core-tasks": "1.
|
|
22
|
+
"@microsoft/sp-build-core-tasks": "1.21.0-beta.0"
|
|
27
23
|
},
|
|
28
24
|
"devDependencies": {
|
|
29
|
-
"@rushstack/heft": "0.
|
|
25
|
+
"@rushstack/heft": "0.68.13",
|
|
30
26
|
"@types/semver": "7.3.8",
|
|
31
|
-
"eslint": "8.
|
|
27
|
+
"eslint": "8.57.1",
|
|
32
28
|
"@odsp-web-tools/internal-node-rig": "0.1.0"
|
|
33
29
|
},
|
|
34
30
|
"scripts": {
|
|
35
31
|
"build": "heft test --clean",
|
|
36
32
|
"clean": "heft clean",
|
|
37
33
|
"start": "heft build-watch",
|
|
34
|
+
"_phase:depscan": "heft depscan",
|
|
38
35
|
"_phase:tool-build": "heft run --only build -- --clean",
|
|
39
|
-
"_phase:build
|
|
40
|
-
"_phase:depscan": "heft depscan"
|
|
36
|
+
"_phase:tool-build:incremental": "heft run --only build --"
|
|
41
37
|
}
|
|
42
38
|
}
|