@vercel/static-build 1.1.0 → 1.1.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/dist/index.js +53810 -53251
- package/dist/utils/gatsby.js +8 -8
- package/package.json +11 -8
package/dist/utils/gatsby.js
CHANGED
|
@@ -23,15 +23,15 @@ exports.injectVercelAnalyticsPlugin = void 0;
|
|
|
23
23
|
const fs_1 = require("fs");
|
|
24
24
|
const path = __importStar(require("path"));
|
|
25
25
|
const _shared_1 = require("./_shared");
|
|
26
|
+
const GATSBY_PLUGIN_PACKAGE_NAME = '@vercel/gatsby-plugin-vercel-analytics';
|
|
26
27
|
const DEFAULT_CONFIG = {
|
|
27
28
|
plugins: [
|
|
28
29
|
{
|
|
29
|
-
resolve:
|
|
30
|
+
resolve: GATSBY_PLUGIN_PACKAGE_NAME,
|
|
30
31
|
options: {},
|
|
31
32
|
},
|
|
32
33
|
],
|
|
33
34
|
};
|
|
34
|
-
const GATSBY_PLUGIN_PACKAGE_NAME = 'gatsby-plugin-vercel';
|
|
35
35
|
const GATSBY_CONFIG_FILE = 'gatsby-config';
|
|
36
36
|
async function injectVercelAnalyticsPlugin(dir) {
|
|
37
37
|
// Gatsby requires a special variable name for environment variables to be
|
|
@@ -91,13 +91,13 @@ if (!vercelConfig.plugins) {
|
|
|
91
91
|
|
|
92
92
|
const hasPlugin = vercelConfig.plugins.find(
|
|
93
93
|
(p: PluginRef) =>
|
|
94
|
-
p && (p === "
|
|
94
|
+
p && (p === "${GATSBY_PLUGIN_PACKAGE_NAME}" || p.resolve === "${GATSBY_PLUGIN_PACKAGE_NAME}")
|
|
95
95
|
);
|
|
96
96
|
|
|
97
97
|
if (!hasPlugin) {
|
|
98
98
|
vercelConfig.plugins = vercelConfig.plugins.slice();
|
|
99
99
|
vercelConfig.plugins.push({
|
|
100
|
-
resolve: "
|
|
100
|
+
resolve: "${GATSBY_PLUGIN_PACKAGE_NAME}",
|
|
101
101
|
options: {},
|
|
102
102
|
});
|
|
103
103
|
}
|
|
@@ -124,13 +124,13 @@ if (!vercelConfig.plugins) {
|
|
|
124
124
|
|
|
125
125
|
const hasPlugin = vercelConfig.plugins.find(
|
|
126
126
|
(p) =>
|
|
127
|
-
p && (p === "
|
|
127
|
+
p && (p === "${GATSBY_PLUGIN_PACKAGE_NAME}" || p.resolve === "${GATSBY_PLUGIN_PACKAGE_NAME}")
|
|
128
128
|
);
|
|
129
129
|
|
|
130
130
|
if (!hasPlugin) {
|
|
131
131
|
vercelConfig.plugins = vercelConfig.plugins.slice();
|
|
132
132
|
vercelConfig.plugins.push({
|
|
133
|
-
resolve: "
|
|
133
|
+
resolve: "${GATSBY_PLUGIN_PACKAGE_NAME}",
|
|
134
134
|
options: {},
|
|
135
135
|
});
|
|
136
136
|
}
|
|
@@ -157,12 +157,12 @@ if (!vercelConfig.plugins) {
|
|
|
157
157
|
|
|
158
158
|
const hasPlugin = vercelConfig.plugins.find(
|
|
159
159
|
(p) =>
|
|
160
|
-
p && (p === "
|
|
160
|
+
p && (p === "${GATSBY_PLUGIN_PACKAGE_NAME}" || p.resolve === "${GATSBY_PLUGIN_PACKAGE_NAME}")
|
|
161
161
|
);
|
|
162
162
|
if (!hasPlugin) {
|
|
163
163
|
vercelConfig.plugins = vercelConfig.plugins.slice();
|
|
164
164
|
vercelConfig.plugins.push({
|
|
165
|
-
resolve: "
|
|
165
|
+
resolve: "${GATSBY_PLUGIN_PACKAGE_NAME}",
|
|
166
166
|
options: {},
|
|
167
167
|
});
|
|
168
168
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "node build",
|
|
17
17
|
"test": "jest --env node --verbose --bail --runInBand",
|
|
18
|
-
"test-unit": "
|
|
19
|
-
"test-integration-once": "
|
|
18
|
+
"test-unit": "pnpm test test/build.test.ts test/prepare-cache.test.ts",
|
|
19
|
+
"test-integration-once": "pnpm test test/integration-*.test.js"
|
|
20
20
|
},
|
|
21
21
|
"jest": {
|
|
22
22
|
"preset": "ts-jest/presets/default",
|
|
@@ -34,13 +34,15 @@
|
|
|
34
34
|
"@types/fs-extra": "9.0.13",
|
|
35
35
|
"@types/jest": "27.4.1",
|
|
36
36
|
"@types/ms": "0.7.31",
|
|
37
|
+
"@types/node": "14.18.33",
|
|
37
38
|
"@types/node-fetch": "2.5.4",
|
|
38
39
|
"@types/promise-timeout": "1.3.0",
|
|
39
|
-
"@vercel/build-utils": "5.
|
|
40
|
-
"@vercel/frameworks": "1.
|
|
40
|
+
"@vercel/build-utils": "workspace:5.8.2",
|
|
41
|
+
"@vercel/frameworks": "workspace:1.2.3",
|
|
41
42
|
"@vercel/ncc": "0.24.0",
|
|
42
|
-
"@vercel/routing-utils": "2.1.
|
|
43
|
-
"@vercel/static-config": "2.0.
|
|
43
|
+
"@vercel/routing-utils": "workspace:2.1.7",
|
|
44
|
+
"@vercel/static-config": "workspace:2.0.10",
|
|
45
|
+
"execa": "3.2.0",
|
|
44
46
|
"fs-extra": "10.0.0",
|
|
45
47
|
"get-port": "5.0.0",
|
|
46
48
|
"is-port-reachable": "2.0.1",
|
|
@@ -48,7 +50,8 @@
|
|
|
48
50
|
"node-fetch": "2.6.7",
|
|
49
51
|
"rc9": "1.2.0",
|
|
50
52
|
"tree-kill": "1.2.2",
|
|
53
|
+
"ts-morph": "12.0.0",
|
|
51
54
|
"typescript": "4.3.4"
|
|
52
55
|
},
|
|
53
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "e54da8a2e5504987a956e2baaad6d817028b597f"
|
|
54
57
|
}
|