@netlify/zip-it-and-ship-it 9.42.4 → 9.42.6
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/feature_flags.d.ts +0 -2
- package/dist/feature_flags.js +0 -2
- package/dist/runtimes/node/bundlers/esbuild/src_files.js +2 -2
- package/dist/runtimes/node/bundlers/nft/index.js +3 -3
- package/dist/runtimes/node/bundlers/none/index.js +2 -2
- package/dist/runtimes/node/bundlers/zisi/src_files.js +1 -1
- package/dist/runtimes/node/utils/included_files.d.ts +1 -2
- package/dist/runtimes/node/utils/included_files.js +7 -16
- package/package.json +4 -4
package/dist/feature_flags.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare const defaultFlags: {
|
|
|
7
7
|
readonly zisi_output_cjs_extension: false;
|
|
8
8
|
readonly zisi_unique_entry_file: false;
|
|
9
9
|
readonly zisi_esbuild_fail_double_glob: false;
|
|
10
|
-
readonly zisi_fix_symlinks: false;
|
|
11
10
|
readonly zisi_add_instrumentation_loader: true;
|
|
12
11
|
readonly zisi_add_metadata_file: false;
|
|
13
12
|
};
|
|
@@ -21,7 +20,6 @@ export declare const getFlags: (input?: Record<string, boolean>, flags?: {
|
|
|
21
20
|
readonly zisi_output_cjs_extension: false;
|
|
22
21
|
readonly zisi_unique_entry_file: false;
|
|
23
22
|
readonly zisi_esbuild_fail_double_glob: false;
|
|
24
|
-
readonly zisi_fix_symlinks: false;
|
|
25
23
|
readonly zisi_add_instrumentation_loader: true;
|
|
26
24
|
readonly zisi_add_metadata_file: false;
|
|
27
25
|
}) => FeatureFlags;
|
package/dist/feature_flags.js
CHANGED
|
@@ -18,8 +18,6 @@ export const defaultFlags = {
|
|
|
18
18
|
zisi_unique_entry_file: false,
|
|
19
19
|
// If multiple glob stars are in includedFiles, fail the build instead of warning.
|
|
20
20
|
zisi_esbuild_fail_double_glob: false,
|
|
21
|
-
// fixes symlinks in included files
|
|
22
|
-
zisi_fix_symlinks: false,
|
|
23
21
|
// Adds the `___netlify-telemetry.mjs` file to the function bundle.
|
|
24
22
|
zisi_add_instrumentation_loader: true,
|
|
25
23
|
// Adds a `___netlify-metadata.json` file to the function bundle.
|
|
@@ -2,9 +2,9 @@ import { filterExcludedPaths, getPathsOfIncludedFiles } from '../../utils/includ
|
|
|
2
2
|
import { getPackageJson } from '../../utils/package_json.js';
|
|
3
3
|
import { getNewCache } from '../../utils/traversal_cache.js';
|
|
4
4
|
import { getDependencyPathsForDependency } from '../zisi/traverse.js';
|
|
5
|
-
export const getSrcFiles = async ({ config, mainFile, pluginsModulesPath, srcDir
|
|
5
|
+
export const getSrcFiles = async ({ config, mainFile, pluginsModulesPath, srcDir }) => {
|
|
6
6
|
const { externalNodeModules = [], includedFiles = [], includedFilesBasePath, nodeVersion } = config;
|
|
7
|
-
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles,
|
|
7
|
+
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles, includedFilesBasePath);
|
|
8
8
|
const dependencyPaths = await getSrcFilesForDependencies({
|
|
9
9
|
basedir: srcDir,
|
|
10
10
|
dependencies: externalNodeModules,
|
|
@@ -27,7 +27,7 @@ const bundle = async ({ basePath, cache, config, featureFlags, mainFile, name, p
|
|
|
27
27
|
const sideFiles = await getSideFiles(srcPath, stat);
|
|
28
28
|
includedFiles.push(...sideFiles);
|
|
29
29
|
}
|
|
30
|
-
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles,
|
|
30
|
+
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles, includedFilesBasePath || basePath);
|
|
31
31
|
const { aliases, bundledPaths = [], mainFile: normalizedMainFile, moduleFormat, rewrites, tracedPaths, } = await traceFilesAndTranspile({
|
|
32
32
|
basePath: repositoryRoot,
|
|
33
33
|
cache,
|
|
@@ -159,9 +159,9 @@ const traceFilesAndTranspile = async function ({ basePath, cache, config, featur
|
|
|
159
159
|
tracedPaths: normalizedTracedPaths,
|
|
160
160
|
};
|
|
161
161
|
};
|
|
162
|
-
const getSrcFiles = async function ({ basePath, config, mainFile
|
|
162
|
+
const getSrcFiles = async function ({ basePath, config, mainFile }) {
|
|
163
163
|
const { includedFiles = [], includedFilesBasePath } = config;
|
|
164
|
-
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles,
|
|
164
|
+
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles, includedFilesBasePath);
|
|
165
165
|
const { fileList: dependencyPaths } = await nodeFileTrace([mainFile], {
|
|
166
166
|
base: basePath,
|
|
167
167
|
ignore: getIgnoreFunction(config),
|
|
@@ -28,9 +28,9 @@ const getModuleFormat = async function (mainFile) {
|
|
|
28
28
|
}
|
|
29
29
|
return MODULE_FORMAT.COMMONJS;
|
|
30
30
|
};
|
|
31
|
-
export const getSrcFiles = async function ({ config, mainFile
|
|
31
|
+
export const getSrcFiles = async function ({ config, mainFile }) {
|
|
32
32
|
const { includedFiles = [], includedFilesBasePath } = config;
|
|
33
|
-
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles,
|
|
33
|
+
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles, includedFilesBasePath);
|
|
34
34
|
const includedPaths = filterExcludedPaths(includedFilePaths, excludePatterns);
|
|
35
35
|
return { srcFiles: [mainFile, ...includedPaths], includedFiles: includedPaths };
|
|
36
36
|
};
|
|
@@ -14,7 +14,7 @@ import { shouldTreeShake } from './tree_shake.js';
|
|
|
14
14
|
// has a size limit for the zipped file. It also makes cold starts faster.
|
|
15
15
|
export const getSrcFiles = async function ({ config, featureFlags, mainFile, name, pluginsModulesPath, srcDir, srcPath, stat, }) {
|
|
16
16
|
const { includedFiles = [], includedFilesBasePath, nodeVersion } = config;
|
|
17
|
-
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles,
|
|
17
|
+
const { excludePatterns, paths: includedFilePaths } = await getPathsOfIncludedFiles(includedFiles, includedFilesBasePath);
|
|
18
18
|
const [treeFiles, depFiles] = await Promise.all([
|
|
19
19
|
getTreeFiles(srcPath, stat),
|
|
20
20
|
getDependencies({ featureFlags, functionName: name, mainFile, pluginsModulesPath, srcDir, nodeVersion }),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type FeatureFlags } from '../../../feature_flags.js';
|
|
2
1
|
export declare const filterExcludedPaths: (paths: string[], excludePattern?: string[]) => string[];
|
|
3
|
-
export declare const getPathsOfIncludedFiles: (includedFiles: string[],
|
|
2
|
+
export declare const getPathsOfIncludedFiles: (includedFiles: string[], basePath?: string) => Promise<{
|
|
4
3
|
excludePatterns: string[];
|
|
5
4
|
paths: string[];
|
|
6
5
|
}>;
|
|
@@ -10,7 +10,7 @@ export const filterExcludedPaths = (paths, excludePattern = []) => {
|
|
|
10
10
|
const excludedPaths = paths.filter((path) => !excludePattern.some((pattern) => minimatch(path, pattern)));
|
|
11
11
|
return excludedPaths;
|
|
12
12
|
};
|
|
13
|
-
export const getPathsOfIncludedFiles = async (includedFiles,
|
|
13
|
+
export const getPathsOfIncludedFiles = async (includedFiles, basePath) => {
|
|
14
14
|
if (basePath === undefined) {
|
|
15
15
|
return { excludePatterns: [], paths: [] };
|
|
16
16
|
}
|
|
@@ -37,22 +37,13 @@ export const getPathsOfIncludedFiles = async (includedFiles, featureFlags, baseP
|
|
|
37
37
|
cwd: basePath,
|
|
38
38
|
dot: true,
|
|
39
39
|
ignore: excludePatterns,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
markDirectories: true,
|
|
46
|
-
followSymbolicLinks: false,
|
|
47
|
-
}
|
|
48
|
-
: {
|
|
49
|
-
followSymbolicLinks: true,
|
|
50
|
-
throwErrorOnBrokenSymbolicLink: true,
|
|
51
|
-
}),
|
|
40
|
+
onlyFiles: false,
|
|
41
|
+
// get directories as well to get symlinked directories,
|
|
42
|
+
// to filter the regular non symlinked directories out mark them with a slash at the end to filter them out.
|
|
43
|
+
markDirectories: true,
|
|
44
|
+
followSymbolicLinks: false,
|
|
52
45
|
});
|
|
53
|
-
const paths =
|
|
54
|
-
? pathGroups.filter((path) => !path.endsWith('/')).map(normalize)
|
|
55
|
-
: pathGroups.map(normalize);
|
|
46
|
+
const paths = pathGroups.filter((path) => !path.endsWith('/')).map(normalize);
|
|
56
47
|
// now filter the non symlinked directories out that got marked with a trailing slash
|
|
57
48
|
return { excludePatterns, paths };
|
|
58
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/zip-it-and-ship-it",
|
|
3
|
-
"version": "9.42.
|
|
3
|
+
"version": "9.42.6",
|
|
4
4
|
"description": "Zip it and ship it",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"type": "module",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/parser": "^7.22.5",
|
|
45
|
-
"@babel/types": "7.26.
|
|
45
|
+
"@babel/types": "7.26.9",
|
|
46
46
|
"@netlify/binary-info": "^1.0.0",
|
|
47
|
-
"@netlify/serverless-functions-api": "^1.
|
|
47
|
+
"@netlify/serverless-functions-api": "^1.33.0",
|
|
48
48
|
"@vercel/nft": "0.27.7",
|
|
49
49
|
"archiver": "^7.0.0",
|
|
50
50
|
"common-path-prefix": "^3.0.0",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"engines": {
|
|
106
106
|
"node": "^14.18.0 || >=16.0.0"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "2efb5f0671a1e72d31a43bfddd1d79f2f8a466a0"
|
|
109
109
|
}
|