@netlify/build 27.20.4 → 27.20.5
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/core/bin.js +42 -59
- package/lib/core/build.js +333 -536
- package/lib/core/config.js +94 -159
- package/lib/core/constants.js +95 -135
- package/lib/core/dev.js +26 -30
- package/lib/core/dry.js +18 -36
- package/lib/core/feature_flags.js +13 -16
- package/lib/core/flags.js +168 -169
- package/lib/core/lingering.js +44 -61
- package/lib/core/main.js +94 -136
- package/lib/core/missing_side_file.js +12 -24
- package/lib/core/normalize_flags.js +52 -63
- package/lib/core/severity.js +13 -15
- package/lib/core/user_node_version.js +26 -35
- package/lib/env/changes.js +29 -37
- package/lib/env/main.js +10 -15
- package/lib/env/metadata.js +63 -76
- package/lib/error/api.js +31 -40
- package/lib/error/build.js +27 -38
- package/lib/error/cancel.js +5 -6
- package/lib/error/colors.js +7 -9
- package/lib/error/handle.js +38 -49
- package/lib/error/info.js +26 -35
- package/lib/error/monitor/location.js +12 -17
- package/lib/error/monitor/normalize.js +75 -85
- package/lib/error/monitor/print.js +19 -41
- package/lib/error/monitor/report.js +102 -121
- package/lib/error/monitor/start.js +43 -56
- package/lib/error/parse/clean_stack.js +52 -69
- package/lib/error/parse/location.js +40 -52
- package/lib/error/parse/normalize.js +18 -23
- package/lib/error/parse/parse.js +59 -93
- package/lib/error/parse/plugin.js +42 -57
- package/lib/error/parse/properties.js +13 -20
- package/lib/error/parse/serialize_log.js +29 -37
- package/lib/error/parse/serialize_status.js +15 -23
- package/lib/error/parse/stack.js +29 -38
- package/lib/error/type.js +132 -150
- package/lib/install/functions.js +16 -24
- package/lib/install/local.js +31 -48
- package/lib/install/main.js +52 -66
- package/lib/install/missing.js +40 -53
- package/lib/log/colors.js +15 -22
- package/lib/log/description.js +16 -21
- package/lib/log/header.js +11 -13
- package/lib/log/header_func.js +11 -15
- package/lib/log/logger.js +88 -119
- package/lib/log/messages/compatibility.js +100 -158
- package/lib/log/messages/config.js +76 -92
- package/lib/log/messages/core.js +40 -60
- package/lib/log/messages/core_steps.js +63 -92
- package/lib/log/messages/dry.js +31 -53
- package/lib/log/messages/install.js +21 -28
- package/lib/log/messages/ipc.js +21 -30
- package/lib/log/messages/mutations.js +51 -71
- package/lib/log/messages/plugins.js +18 -31
- package/lib/log/messages/status.js +12 -14
- package/lib/log/messages/steps.js +14 -18
- package/lib/log/old_version.js +23 -32
- package/lib/log/serialize.js +7 -10
- package/lib/log/stream.js +48 -65
- package/lib/log/theme.js +22 -23
- package/lib/plugins/child/diff.js +31 -40
- package/lib/plugins/child/error.js +20 -26
- package/lib/plugins/child/lazy.js +11 -14
- package/lib/plugins/child/load.js +15 -22
- package/lib/plugins/child/logic.js +51 -58
- package/lib/plugins/child/main.js +32 -46
- package/lib/plugins/child/run.js +18 -27
- package/lib/plugins/child/status.js +52 -63
- package/lib/plugins/child/typescript.js +19 -36
- package/lib/plugins/child/utils.js +36 -49
- package/lib/plugins/child/validate.js +25 -28
- package/lib/plugins/compatibility.js +64 -92
- package/lib/plugins/error.js +29 -35
- package/lib/plugins/events.js +7 -12
- package/lib/plugins/expected_version.js +61 -99
- package/lib/plugins/ipc.js +79 -102
- package/lib/plugins/list.js +49 -62
- package/lib/plugins/load.js +44 -64
- package/lib/plugins/manifest/check.js +64 -85
- package/lib/plugins/manifest/load.js +34 -37
- package/lib/plugins/manifest/main.js +16 -21
- package/lib/plugins/manifest/path.js +18 -25
- package/lib/plugins/manifest/validate.js +77 -94
- package/lib/plugins/node_version.js +22 -42
- package/lib/plugins/options.js +45 -78
- package/lib/plugins/pinned_version.js +58 -106
- package/lib/plugins/resolve.js +91 -133
- package/lib/plugins/spawn.js +43 -61
- package/lib/plugins_core/add.js +26 -40
- package/lib/plugins_core/build_command.js +47 -72
- package/lib/plugins_core/deploy/buildbot_client.js +61 -87
- package/lib/plugins_core/deploy/index.js +47 -71
- package/lib/plugins_core/edge_functions/index.js +73 -116
- package/lib/plugins_core/edge_functions/lib/error.js +13 -17
- package/lib/plugins_core/edge_functions/lib/internal_manifest.js +45 -55
- package/lib/plugins_core/edge_functions/validate_manifest/validate_edge_functions_manifest.js +65 -80
- package/lib/plugins_core/functions/error.js +88 -128
- package/lib/plugins_core/functions/feature_flags.js +5 -5
- package/lib/plugins_core/functions/index.js +98 -145
- package/lib/plugins_core/functions/utils.js +36 -57
- package/lib/plugins_core/functions/zisi.js +35 -52
- package/lib/plugins_core/functions_install/index.js +8 -11
- package/lib/plugins_core/list.js +15 -22
- package/lib/status/add.js +26 -32
- package/lib/status/colors.js +14 -19
- package/lib/status/load_error.js +8 -9
- package/lib/status/report.js +72 -126
- package/lib/status/success.js +10 -14
- package/lib/steps/core_step.js +54 -89
- package/lib/steps/error.js +50 -87
- package/lib/steps/get.js +33 -41
- package/lib/steps/plugin.js +53 -83
- package/lib/steps/return.js +24 -51
- package/lib/steps/run_core_steps.js +119 -171
- package/lib/steps/run_step.js +154 -270
- package/lib/steps/run_steps.js +91 -174
- package/lib/steps/update_config.js +45 -72
- package/lib/telemetry/main.js +89 -128
- package/lib/time/aggregate.js +84 -110
- package/lib/time/main.js +23 -34
- package/lib/time/measure.js +11 -15
- package/lib/time/report.js +32 -44
- package/lib/utils/errors.js +10 -9
- package/lib/utils/json.js +11 -15
- package/lib/utils/omit.js +3 -4
- package/lib/utils/package.js +19 -22
- package/lib/utils/remove_falsy.js +5 -7
- package/lib/utils/resolve.js +30 -34
- package/lib/utils/runtime.js +4 -4
- package/lib/utils/semver.js +19 -25
- package/package.json +13 -6
package/lib/utils/semver.js
CHANGED
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
import semver from 'semver'
|
|
2
|
-
|
|
1
|
+
import semver from 'semver';
|
|
3
2
|
// Compare two versions by their major versions.
|
|
4
3
|
// Takes into account the special rules for `0.*.*` and `0.0.*` versions.
|
|
5
4
|
export const isPreviousMajor = function (versionA, versionB) {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
5
|
+
return semver.lt(getMajor(versionA), getMajor(versionB));
|
|
6
|
+
};
|
|
9
7
|
// Remove minor/patch numbers
|
|
10
8
|
const getMajor = function (version) {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
9
|
+
return semver.minVersion(getMajorVersion(version)).version;
|
|
10
|
+
};
|
|
14
11
|
// According to semver, the second number is the major release number for
|
|
15
12
|
// `0.*.*` versions and the third for `0.0.*`. This is how `^` behaves with the
|
|
16
13
|
// `semver` module which is used by `npm`.
|
|
17
14
|
export const getMajorVersion = function (version) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const patchVersion = semver.patch(version)
|
|
33
|
-
return `${majorVersion}.${minorVersion}.${patchVersion}`
|
|
34
|
-
}
|
|
15
|
+
if (!version || semver.clean(version) === null) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const majorVersion = semver.major(version);
|
|
19
|
+
if (majorVersion !== 0) {
|
|
20
|
+
return `${majorVersion}`;
|
|
21
|
+
}
|
|
22
|
+
const minorVersion = semver.minor(version);
|
|
23
|
+
if (minorVersion !== 0) {
|
|
24
|
+
return `${majorVersion}.${minorVersion}`;
|
|
25
|
+
}
|
|
26
|
+
const patchVersion = semver.patch(version);
|
|
27
|
+
return `${majorVersion}.${minorVersion}.${patchVersion}`;
|
|
28
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "27.20.
|
|
3
|
+
"version": "27.20.5",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -22,9 +22,10 @@
|
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
24
|
"prebuild": "rm -rf lib",
|
|
25
|
-
"
|
|
25
|
+
"postbuild": "npx copyfiles \"src/**/*.yml\" lib/ -u 1",
|
|
26
|
+
"build": "tsc",
|
|
26
27
|
"pretest": "tsd .",
|
|
27
|
-
"test": "ava
|
|
28
|
+
"test": "ava",
|
|
28
29
|
"test:ci": "c8 -r lcovonly -r text -r json ava",
|
|
29
30
|
"test:measure": "../../tools/tests-duration.js"
|
|
30
31
|
},
|
|
@@ -63,10 +64,10 @@
|
|
|
63
64
|
"dependencies": {
|
|
64
65
|
"@bugsnag/js": "^7.0.0",
|
|
65
66
|
"@netlify/cache-utils": "^4.1.6",
|
|
66
|
-
"@netlify/config": "^18.2.
|
|
67
|
+
"@netlify/config": "^18.2.5",
|
|
67
68
|
"@netlify/edge-bundler": "^2.7.0",
|
|
68
69
|
"@netlify/functions-utils": "^4.2.11",
|
|
69
|
-
"@netlify/git-utils": "^4.1.
|
|
70
|
+
"@netlify/git-utils": "^4.1.4",
|
|
70
71
|
"@netlify/plugins-list": "^6.49.1",
|
|
71
72
|
"@netlify/run-utils": "^4.0.2",
|
|
72
73
|
"@netlify/zip-it-and-ship-it": "^7.1.2",
|
|
@@ -122,6 +123,7 @@
|
|
|
122
123
|
"atob": "^2.1.2",
|
|
123
124
|
"ava": "^4.0.0",
|
|
124
125
|
"c8": "^7.12.0",
|
|
126
|
+
"copyfiles": "^2.4.1",
|
|
125
127
|
"cpy": "^8.1.0",
|
|
126
128
|
"del": "^6.0.0",
|
|
127
129
|
"fast-safe-stringify": "^2.0.7",
|
|
@@ -141,5 +143,10 @@
|
|
|
141
143
|
"engines": {
|
|
142
144
|
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
|
|
143
145
|
},
|
|
144
|
-
"
|
|
146
|
+
"tsd": {
|
|
147
|
+
"compilerOptions": {
|
|
148
|
+
"module": "commonjs"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"gitHead": "5555ff52d82f1c26f2074ee52d5e7c5c6c8d02d2"
|
|
145
152
|
}
|