@netlify/zip-it-and-ship-it 5.5.2 → 5.6.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/dist/config.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { FunctionSource } from './function';
|
|
2
|
-
import type { NodeBundlerName } from './runtimes/node';
|
|
3
|
-
declare type SupportedVersionNumbers = 8 | 10 | 12 | 14;
|
|
4
|
-
declare type NodeVersion = `${SupportedVersionNumbers}.x` | `nodejs${SupportedVersionNumbers}.x`;
|
|
2
|
+
import type { NodeBundlerName, NodeVersion } from './runtimes/node';
|
|
5
3
|
interface FunctionConfig {
|
|
6
4
|
externalNodeModules?: string[];
|
|
7
5
|
includedFiles?: string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare type SupportedVersionNumbers = 8 | 10 | 12 | 14;
|
|
2
|
+
declare type NodeVersion = `${SupportedVersionNumbers}.x` | `nodejs${SupportedVersionNumbers}.x`;
|
|
3
|
+
declare const DEFAULT_NODE_VERSION = 14;
|
|
4
|
+
declare const getNodeVersion: (configVersion?: string | undefined) => number;
|
|
5
|
+
declare const parseVersion: (input: string | undefined) => number | undefined;
|
|
6
|
+
export { DEFAULT_NODE_VERSION, getNodeVersion, parseVersion, NodeVersion };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseVersion = exports.getNodeVersion = exports.DEFAULT_NODE_VERSION = void 0;
|
|
4
|
+
// Must match the default version used in Bitballoon.
|
|
5
|
+
const DEFAULT_NODE_VERSION = 14;
|
|
6
|
+
exports.DEFAULT_NODE_VERSION = DEFAULT_NODE_VERSION;
|
|
7
|
+
const VERSION_REGEX = /(nodejs)?(\d+)\.x/;
|
|
8
|
+
const getNodeVersion = (configVersion) => { var _a; return (_a = parseVersion(configVersion)) !== null && _a !== void 0 ? _a : DEFAULT_NODE_VERSION; };
|
|
9
|
+
exports.getNodeVersion = getNodeVersion;
|
|
10
|
+
// Takes a string in the format defined by the `NodeVersion` type and returns
|
|
11
|
+
// the numeric major version (e.g. "nodejs14.x" => 14).
|
|
12
|
+
const parseVersion = (input) => {
|
|
13
|
+
if (input === undefined) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const match = input.match(VERSION_REGEX);
|
|
17
|
+
if (match === null) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const version = Number.parseInt(match[2]);
|
|
21
|
+
if (Number.isNaN(version)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
return version;
|
|
25
|
+
};
|
|
26
|
+
exports.parseVersion = parseVersion;
|
|
27
|
+
//# sourceMappingURL=node_version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/zip-it-and-ship-it",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"description": "Zip it and ship it",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"bin": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@babel/types": "^7.15.6",
|
|
90
|
-
"@netlify/eslint-config-node": "^
|
|
90
|
+
"@netlify/eslint-config-node": "^5.1.2",
|
|
91
91
|
"@types/archiver": "^5.1.1",
|
|
92
92
|
"@types/end-of-stream": "^1.4.1",
|
|
93
93
|
"@types/resolve": "^1.20.1",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"husky": "^7.0.4",
|
|
103
103
|
"npm-run-all": "^4.1.5",
|
|
104
104
|
"p-every": "^2.0.0",
|
|
105
|
-
"sinon": "^
|
|
105
|
+
"sinon": "^13.0.0",
|
|
106
106
|
"sort-on": "^4.1.1",
|
|
107
107
|
"source-map-support": "^0.5.20",
|
|
108
108
|
"throat": "^6.0.1"
|
|
@@ -112,7 +112,8 @@
|
|
|
112
112
|
},
|
|
113
113
|
"ava": {
|
|
114
114
|
"files": [
|
|
115
|
-
"tests/*"
|
|
115
|
+
"tests/*",
|
|
116
|
+
"tests/unit/**/*.js"
|
|
116
117
|
],
|
|
117
118
|
"verbose": true,
|
|
118
119
|
"timeout": "2m"
|