@netlify/config 25.2.1 → 25.2.2

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.
@@ -1,4 +1,3 @@
1
- import * as z from 'zod';
2
1
  import type { NetlifyAPI } from '@netlify/api';
3
2
  import { ModeOption, TestOptions } from '../types/options.js';
4
3
  type GetSiteInfoOptions = {
@@ -52,15 +51,6 @@ export type MinimalAccount = {
52
51
  type_slug: string;
53
52
  members_count: number;
54
53
  };
55
- declare const ExtensionResponseSchema: z.ZodArray<z.ZodObject<{
56
- author: z.ZodOptional<z.ZodString>;
57
- extension_token: z.ZodOptional<z.ZodString>;
58
- has_build: z.ZodBoolean;
59
- name: z.ZodString;
60
- slug: z.ZodString;
61
- version: z.ZodString;
62
- }, z.core.$strip>>;
63
- export type ExtensionResponse = z.output<typeof ExtensionResponseSchema>;
64
54
  type GetExtensionsOptions = {
65
55
  siteId?: string;
66
56
  accountId?: string;
package/lib/bin/main.js CHANGED
@@ -3,7 +3,6 @@ import { promises as fs } from 'fs';
3
3
  import { dirname } from 'path';
4
4
  import process from 'process';
5
5
  import fastSafeStringify from 'fast-safe-stringify';
6
- import omit from 'omit.js';
7
6
  import { isUserError } from '../error.js';
8
7
  import { resolveConfig } from '../main.js';
9
8
  import { parseFlags } from './flags.js';
@@ -22,7 +21,7 @@ const DEFAULT_OUTPUT = '-';
22
21
  // The result is output as JSON on success (exit code 0)
23
22
  const handleCliSuccess = async function (result, stable, output) {
24
23
  const resultA = serializeApi(result);
25
- const resultB = omit.default(resultA, SECRET_PROPERTIES);
24
+ const resultB = Object.fromEntries(Object.entries(resultA).filter(([key]) => !SECRET_PROPERTIES.includes(key)));
26
25
  const stringifyFunc = stable ? fastSafeStringify.stableStringify : JSON.stringify;
27
26
  const resultJson = stringifyFunc(resultB, null, 2);
28
27
  await outputResult(resultJson, output);
package/lib/env/main.js CHANGED
@@ -1,4 +1,3 @@
1
- import omit from 'omit.js';
2
1
  import { removeFalsy } from '../utils/remove_falsy.js';
3
2
  import { getEnvelope } from './envelope.js';
4
3
  import { getGitEnv } from './git.js';
@@ -144,7 +143,7 @@ const getConfigFileEnv = function ({ config: { build: { environment = {} }, }, }
144
143
  };
145
144
  // Some environment variables cannot be overridden by configuration
146
145
  const cleanUserEnv = function (userEnv) {
147
- return omit.default(userEnv, READONLY_ENV);
146
+ return Object.fromEntries(Object.entries(userEnv ?? {}).filter(([key]) => !READONLY_ENV.includes(key)));
148
147
  };
149
148
  const READONLY_ENV = [
150
149
  // Set in local builds
@@ -1,9 +1,5 @@
1
1
  export const ERROR_CALL_TO_ACTION: "Double-check your login status with 'netlify status' or contact support with details of your error.";
2
2
  export function throwOnInvalidTomlSequence(invalidSequence: any): void;
3
- export function warnLegacyFunctionsDirectory({ config, logs }: {
4
- config?: {} | undefined;
5
- logs: any;
6
- }): void;
7
3
  export function warnContextPluginConfig(logs: any, packageName: any, context: any): void;
8
4
  export function throwContextPluginsConfig(packageName: any, context: any): void;
9
5
  export function warnHeadersParsing(logs: any, errors: any): void;
@@ -5,18 +5,6 @@ export const throwOnInvalidTomlSequence = function (invalidSequence) {
5
5
  throwUserError(`In netlify.toml, the following backslash should be escaped: ${invalidSequence}
6
6
  The following should be used instead: \\${invalidSequence}`);
7
7
  };
8
- export const warnLegacyFunctionsDirectory = ({ config = {}, logs }) => {
9
- const { functionsDirectory, functionsDirectoryOrigin } = config;
10
- if (functionsDirectoryOrigin !== 'config-v1') {
11
- return;
12
- }
13
- logWarning(logs, `
14
- Detected functions directory configuration in netlify.toml under [build] settings.
15
- We recommend updating netlify.toml to set the functions directory under [functions] settings using the directory property. For example,
16
-
17
- [functions]
18
- directory = "${functionsDirectory}"`);
19
- };
20
8
  export const warnContextPluginConfig = function (logs, packageName, context) {
21
9
  logWarning(logs, `
22
10
  "${packageName}" is installed in the UI, which means that it runs in all deploy contexts, regardless of file-based configuration.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "25.2.1",
3
+ "version": "25.2.2",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -21,9 +21,11 @@
21
21
  "scripts": {
22
22
  "prebuild": "rm -rf lib",
23
23
  "build": "tsc",
24
- "test": "ava",
24
+ "test": "ava && vitest run",
25
25
  "test:dev": "ava -w",
26
- "test:ci": "c8 -r lcovonly -r text -r json ava"
26
+ "test:ci": "npm run test:ci:ava && npm run test:ci:vitest",
27
+ "test:ci:ava": "c8 -r lcovonly -r text -r json ava",
28
+ "test:ci:vitest": "vitest run"
27
29
  },
28
30
  "keywords": [
29
31
  "javascript",
@@ -59,7 +61,7 @@
59
61
  "license": "MIT",
60
62
  "dependencies": {
61
63
  "@netlify/api": "^15.1.1",
62
- "@netlify/headers-parser": "^10.1.0",
64
+ "@netlify/headers-parser": "^10.1.1",
63
65
  "@netlify/redirect-parser": "^16.1.0",
64
66
  "chalk": "^5.0.0",
65
67
  "cron-parser": "^4.1.0",
@@ -73,7 +75,6 @@
73
75
  "indent-string": "^5.0.0",
74
76
  "is-plain-obj": "^4.0.0",
75
77
  "map-obj": "^5.0.0",
76
- "omit.js": "^2.0.2",
77
78
  "p-locate": "^6.0.0",
78
79
  "path-type": "^6.0.0",
79
80
  "read-package-up": "^11.0.0",
@@ -91,10 +92,10 @@
91
92
  "has-ansi": "^6.0.0",
92
93
  "is-ci": "^4.0.0",
93
94
  "tmp-promise": "^3.0.2",
94
- "typescript": "^5.0.0"
95
+ "vitest": "^3.0.0"
95
96
  },
96
97
  "engines": {
97
98
  "node": ">=22.12.0"
98
99
  },
99
- "gitHead": "bb464681850c1e69f457029c90dda86e4c2da362"
100
+ "gitHead": "599e9a8d17fed6cc6e95eea728896f59102217c5"
100
101
  }