diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6ba838c88a..f492657ea9 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -107,7 +107,7 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] node-version: ['*'] install-command: ['npm ci'] - machine: ['0', '1', '2', '3'] + machine: ['0', '1', '2', '3', '4'] include: # We test on the oldest supported Node.js version, but only with a # single combination (Ubuntu) @@ -127,6 +127,10 @@ jobs: node-version: '14.16.0' install-command: npm ci machine: '3' + - os: ubuntu-latest + node-version: '14.16.0' + install-command: npm ci + machine: '4' # The buildbot pins Netlify Build's dependencies, like `npm ci`. # But other consumers do not, like `npm install`. # So we test both. @@ -146,6 +150,10 @@ jobs: node-version: '*' install-command: npm install --no-package-lock machine: '3' + - os: ubuntu-latest + node-version: '*' + install-command: npm install --no-package-lock + machine: '4' fail-fast: false steps: # Sets an output parameter if this is a release PR diff --git a/packages/build/tests-metadata.json b/packages/build/tests-metadata.json index 07b740c673..4f50c2c51e 100644 --- a/packages/build/tests-metadata.json +++ b/packages/build/tests-metadata.json @@ -55,48 +55,48 @@ "order": 13, "machine": 2 }, - "tests/mutate_save/tests.js": { + "tests/utils_build/tests.js": { "order": 14, "machine": 2 }, - "tests/mutate/tests.js": { + "tests/core/tests.js": { "order": 15, - "machine": 2 + "machine": 3 }, - "tests/utils_build/tests.js": { + "tests/edge_functions/tests.js": { "order": 16, - "machine": 2 + "machine": 3 }, - "tests/core/tests.js": { + "tests/install/tests.js": { "order": 17, "machine": 3 }, - "tests/edge_functions/tests.js": { + "tests/log/tests.js": { "order": 18, "machine": 3 }, - "tests/install/tests.js": { + "tests/manifest/tests.js": { "order": 19, "machine": 3 }, - "tests/log/tests.js": { + "tests/plugins/tests.js": { "order": 20, "machine": 3 }, - "tests/manifest/tests.js": { + "tests/steps/tests.js": { "order": 21, "machine": 3 }, - "tests/plugins/tests.js": { + "tests/secrets_scanning/tests.js": { "order": 22, - "machine": 3 + "machine": 4 }, - "tests/steps/tests.js": { + "tests/mutate_save/tests.js": { "order": 23, - "machine": 3 + "machine": 4 }, - "tests/secrets_scanning/tests.js": { + "tests/mutate/tests.js": { "order": 24, - "machine": 3 + "machine": 4 } } diff --git a/packages/build/tests/deploy/snapshots/tests.js.md b/packages/build/tests/deploy/snapshots/tests.js.md index 8bb1ad0d92..a85e030a77 100644 --- a/packages/build/tests/deploy/snapshots/tests.js.md +++ b/packages/build/tests/deploy/snapshots/tests.js.md @@ -51,58 +51,6 @@ Generated by [AVA](https://avajs.dev). (Netlify Build completed in 1ms)␊ Build step duration: Netlify Build completed in 1ms` -## Deploy plugin response syntax error - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - buildbotServerSocket: /test/socket␊ - debug: true␊ - repositoryRoot: packages/build/tests/deploy/fixtures/empty␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/deploy/fixtures/empty␊ - ␊ - > Config file␊ - packages/build/tests/deploy/fixtures/empty/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/deploy/fixtures/empty␊ - publishOrigin: default␊ - ␊ - > Context␊ - production␊ - ␊ - Deploy site ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - Internal error during "Deploy site" ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Invalid response from buildbot: SyntaxError: Unexpected token e in JSON at position 1␊ - ␊ - Error location␊ - During Deploy site␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/deploy/fixtures/empty␊ - publishOrigin: default` - ## Deploy plugin response system error > Snapshot 1 diff --git a/packages/build/tests/deploy/snapshots/tests.js.snap b/packages/build/tests/deploy/snapshots/tests.js.snap index 045ad4f90d..15d3208b10 100644 Binary files a/packages/build/tests/deploy/snapshots/tests.js.snap and b/packages/build/tests/deploy/snapshots/tests.js.snap differ diff --git a/packages/build/tests/deploy/tests.js b/packages/build/tests/deploy/tests.js index fd5fa20bbf..e9616c1042 100644 --- a/packages/build/tests/deploy/tests.js +++ b/packages/build/tests/deploy/tests.js @@ -43,14 +43,15 @@ test('Deploy plugin connection error', async (t) => { const { address, stopServer } = await startDeployServer() await stopServer() const output = await new Fixture('./fixtures/empty').withFlags({ buildbotServerSocket: address }).runWithBuild() - t.true(output.includes('Could not connect to buildbot: Error: connect')) + t.true(output.includes('Internal error during "Deploy site"')) }) test('Deploy plugin response syntax error', async (t) => { const { address, stopServer } = await startDeployServer({ response: 'test' }) try { const output = await new Fixture('./fixtures/empty').withFlags({ buildbotServerSocket: address }).runWithBuild() - t.snapshot(normalizeOutput(output)) + // This shape of this error can change with different Node.js versions. + t.true(output.includes('Internal error during "Deploy site"')) } finally { await stopServer() } diff --git a/packages/build/tests/functions/snapshots/tests.js.md b/packages/build/tests/functions/snapshots/tests.js.md index 0cbb36d7fe..7b34176737 100644 --- a/packages/build/tests/functions/snapshots/tests.js.md +++ b/packages/build/tests/functions/snapshots/tests.js.md @@ -283,58 +283,6 @@ Generated by [AVA](https://avajs.dev). (Netlify Build completed in 1ms)␊ Build step duration: Netlify Build completed in 1ms` -## Functions: invalid package.json - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/functions/fixtures/functions_package_json_invalid␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/functions/fixtures/functions_package_json_invalid␊ - ␊ - > Config file␊ - packages/build/tests/functions/fixtures/functions_package_json_invalid/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/functions/fixtures/functions_package_json_invalid␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/functions/fixtures/functions_package_json_invalid/functions␊ - ␊ - > Context␊ - production␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Packaging Functions from functions directory:␊ - - test.js␊ - ␊ - ␊ - Configuration error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Unexpected token { in JSON at position 1␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/functions/fixtures/functions_package_json_invalid␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/functions/fixtures/functions_package_json_invalid/functions` - ## Functions: --functionsDistDir > Snapshot 1 diff --git a/packages/build/tests/functions/snapshots/tests.js.snap b/packages/build/tests/functions/snapshots/tests.js.snap index 770192f856..30fad9f6ee 100644 Binary files a/packages/build/tests/functions/snapshots/tests.js.snap and b/packages/build/tests/functions/snapshots/tests.js.snap differ diff --git a/packages/build/tests/functions/tests.js b/packages/build/tests/functions/tests.js index f05da53c9d..73d3c2e0db 100644 --- a/packages/build/tests/functions/tests.js +++ b/packages/build/tests/functions/tests.js @@ -45,7 +45,8 @@ test('Functions: invalid package.json', async (t) => { await writeFile(packageJsonPath, '{{}') try { const output = await new Fixture('./fixtures/functions_package_json_invalid').runWithBuild() - t.snapshot(normalizeOutput(output)) + // This shape of this error can change with different Node.js versions. + t.true(output.includes('in JSON at position 1')) } finally { await rm(packageJsonPath, { force: true, recursive: true, maxRetries: 10 }) } diff --git a/packages/build/tests/mutate/fixtures/functions_no_log_debug/plugin.js b/packages/build/tests/mutate/fixtures/functions_no_log_debug/plugin.js index cb88b18bf0..738a0fad8a 100644 --- a/packages/build/tests/mutate/fixtures/functions_no_log_debug/plugin.js +++ b/packages/build/tests/mutate/fixtures/functions_no_log_debug/plugin.js @@ -1,3 +1,7 @@ export const onPreBuild = function ({ netlifyConfig }) { - netlifyConfig.functions.node_bundler = 'esbuild' + netlifyConfig.functions.test = {} + + netlifyConfig.functions.test.included_files = [] + + netlifyConfig.functions.test = { included_files: [] } } diff --git a/packages/build/tests/mutate/snapshots/tests.js.md b/packages/build/tests/mutate/snapshots/tests.js.md index 2a1ea2a11b..be25497838 100644 --- a/packages/build/tests/mutate/snapshots/tests.js.md +++ b/packages/build/tests/mutate/snapshots/tests.js.md @@ -56,3109 +56,3 @@ Generated by [AVA](https://avajs.dev). ␊ (Netlify Build completed in 1ms)␊ Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig properties are readonly (set) by default - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/readonly_set␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/readonly_set␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/readonly_set/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/readonly_set␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.ignore" value changed to ''.␊ - ␊ - Plugin "./plugin" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: "netlifyConfig.build.ignore" is read-only.␊ - ␊ - Plugin details␊ - Package: ./plugin␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/readonly_set␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin` - -## netlifyConfig properties are readonly (delete) by default - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/readonly_delete␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/readonly_delete␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/readonly_delete/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/readonly_delete␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - Plugin "./plugin" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: Setting "netlifyConfig.build.command" to undefined is not allowed.␊ - Please set this property to a specific value instead.␊ - ␊ - Plugin details␊ - Package: ./plugin␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/readonly_delete␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin` - -## netlifyConfig properties are readonly (defineProperty) by default - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/readonly_define␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/readonly_define␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/readonly_define/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/readonly_define␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.ignore" value changed to ''.␊ - ␊ - Plugin "./plugin" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: "netlifyConfig.build.ignore" is read-only.␊ - ␊ - Plugin details␊ - Package: ./plugin␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/readonly_define␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin` - -## Some netlifyConfig properties can be mutated - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/general␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/general␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/general/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/general␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./one␊ - - inputs: {}␊ - origin: config␊ - package: ./two␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./one@1.0.0 from netlify.toml␊ - - ./two@1.0.0 from netlify.toml␊ - ␊ - ./one (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/general␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/general/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./one␊ - - inputs: {}␊ - origin: config␊ - package: ./two␊ - ␊ - (./one onPreBuild completed in 1ms)␊ - Build step duration: ./one onPreBuild completed in 1ms␊ - ␊ - ./one (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/general/test_functions␊ - ␊ - (./one onBuild completed in 1ms)␊ - Build step duration: ./one onBuild completed in 1ms␊ - ␊ - ./two (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/general/test_functions␊ - ␊ - (./two onBuild completed in 1ms)␊ - Build step duration: ./two onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig properties cannot be deleted - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/delete␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/delete␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/delete/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/delete␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin.js@1.0.0 from netlify.toml␊ - ␊ - ./plugin.js (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - Plugin "./plugin.js" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: Setting "netlifyConfig.build.command" to undefined is not allowed.␊ - Please set this property to a specific value instead.␊ - ␊ - Plugin details␊ - Package: ./plugin.js␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin.js" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/delete␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js` - -## netlifyConfig properties cannot be assigned to undefined - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/set_undefined␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/set_undefined␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/set_undefined/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/set_undefined␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin.js@1.0.0 from netlify.toml␊ - ␊ - ./plugin.js (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - Plugin "./plugin.js" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: Setting "netlifyConfig.build.command" to undefined is not allowed.␊ - Please set this property to a specific value instead.␊ - ␊ - Plugin details␊ - Package: ./plugin.js␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin.js" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/set_undefined␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js` - -## netlifyConfig properties cannot be assigned to null - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/set_null␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/set_null␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/set_null/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/set_null␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin.js@1.0.0 from netlify.toml␊ - ␊ - ./plugin.js (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - Plugin "./plugin.js" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: Setting "netlifyConfig.build.command" to null is not allowed.␊ - Please set this property to a specific value instead.␊ - ␊ - Plugin details␊ - Package: ./plugin.js␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin.js" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/set_null␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js` - -## netlifyConfig properties cannot be assigned to undefined with defineProperty - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/define_undefined␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/define_undefined␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/define_undefined/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/define_undefined␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin.js@1.0.0 from netlify.toml␊ - ␊ - ./plugin.js (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - Plugin "./plugin.js" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: Setting "netlifyConfig.build.command" to undefined is not allowed.␊ - Please set this property to a specific value instead.␊ - ␊ - Plugin details␊ - Package: ./plugin.js␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin.js" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/define_undefined␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin.js` - -## netlifyConfig properties mutations is persisted - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/persist␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/persist␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/persist/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/persist␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.command" value changed to 'node --version'.␊ - ␊ - > Updated config␊ - build:␊ - command: node --version␊ - commandOrigin: inline␊ - publish: packages/build/tests/mutate/fixtures/persist␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - build.command from a plugin ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - $ node --version␊ - v1.0.0␊ - ␊ - (build.command completed in 1ms)␊ - Build step duration: build.command completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.*.external_node_modules" value changed to [ 'test' ].␊ - ␊ - > Updated config␊ - build:␊ - command: node --version␊ - commandOrigin: inline␊ - publish: packages/build/tests/mutate/fixtures/persist␊ - publishOrigin: default␊ - functions:␊ - '*':␊ - external_node_modules:␊ - - test␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - ./plugin (onPostBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - node --version␊ - [ 'test' ]␊ - ␊ - (./plugin onPostBuild completed in 1ms)␊ - Build step duration: ./plugin onPostBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig array properties can be mutated per index - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/array_index␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/array_index␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/array_index/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/array_index␊ - publishOrigin: default␊ - functions:␊ - '*':␊ - included_files:␊ - - one␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.*.included_files" value changed to [ 'one', 'two' ].␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/array_index␊ - publishOrigin: default␊ - functions:␊ - '*':␊ - included_files:␊ - - one␊ - - two␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig array properties can be pushed - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/array_push␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/array_push␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/array_push/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/array_push␊ - publishOrigin: default␊ - functions:␊ - '*':␊ - included_files:␊ - - one␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.*.included_files" value changed to [ 'one', 'two' ].␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/array_push␊ - publishOrigin: default␊ - functions:␊ - '*':␊ - included_files:␊ - - one␊ - - two␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functionsDirectory mutations are used during functions bundling - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_bundling␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_bundling␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_bundling/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_bundling␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_bundling␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_bundling/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functionsDirectory deletion skips functions bundling - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_skip␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_skip␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_skip/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_skip␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_skip/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/functions_directory_skip/functions␊ - Netlify configuration property "functions.directory" value changed to ''.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_skip␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functionsDirectory mutations are used by utils.functions - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_utils␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_utils␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_utils/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_utils␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_utils␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_utils/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - test␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Packaging Functions from test_functions directory:␊ - - test.js␊ - ␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functionsDirectory mutations are used by constants.FUNCTIONS_SRC - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_constants␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_constants␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_constants/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_constants␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_constants␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_constants/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - test_functions␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functionsDirectory mutations are taken into account by default constants.FUNCTIONS_SRC - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_default␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_default␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_default/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_default␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_default/netlify/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - netlify/functions␊ - Netlify configuration property "functions.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_default␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_default/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - test_functions␊ - Netlify configuration property "functions.directory" value changed to ''.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_default␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_default/netlify/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in netlify/functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - ./plugin (onPostBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - netlify/functions␊ - ␊ - (./plugin onPostBuild completed in 1ms)␊ - Build step duration: ./plugin onPostBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functions.star.directory mutations work - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_star␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_star␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_star/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_star␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.*.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_star␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_star/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/functions_directory_star/test_functions␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functions.star.directory has priority over functions.directory - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_star_priority␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_star_priority␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_star_priority/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_star_priority␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_star_priority/one␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.*.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_star_priority␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_star_priority/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/functions_directory_star_priority/test_functions␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functions.directory mutations work - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_nested␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_nested␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_nested/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_nested␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_nested␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_nested/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/functions_directory_nested/test_functions␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functions.directory has priority over functions.star.directory - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_nested_priority␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_nested_priority␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_nested_priority/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_nested_priority␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_nested_priority/one␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.directory" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_nested_priority␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_nested_priority/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/functions_directory_nested_priority/test_functions␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.functions mutations work - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_directory_build␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_directory_build␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_directory_build/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_build␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.functions" value changed to 'test_functions'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_directory_build␊ - publishOrigin: default␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_directory_build/test_functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - packages/build/tests/mutate/fixtures/functions_directory_build/test_functions␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in test_functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functions mutations are used during functions bundling - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_bundling␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_bundling␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_bundling/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_bundling␊ - publishOrigin: default␊ - functions:␊ - test:␊ - node_bundler: esbuild␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_bundling/netlify/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.test.node_bundler" value changed to 'zisi'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_bundling␊ - publishOrigin: default␊ - functions:␊ - test:␊ - node_bundler: zisi␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_bundling/netlify/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Packaging Functions from netlify/functions directory:␊ - - test.js␊ - ␊ - ␊ - Dependencies installation error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - A Netlify Function failed to require one of its dependencies.␊ - Please make sure it is present in the site's top-level "package.json".␊ - ␊ - In file "packages/build/tests/mutate/fixtures/functions_bundling/netlify/functions/test.js"␊ - Cannot find module 'does_not_exist'␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_bundling␊ - publishOrigin: default␊ - functions:␊ - test:␊ - node_bundler: zisi␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_bundling/netlify/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin` - -## netlifyConfig.functions mutations on any property can be used - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_any␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_any␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_any/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_any␊ - publishOrigin: default␊ - functions:␊ - test:␊ - node_bundler: esbuild␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_any/netlify/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.test.external_node_modules" value changed to [].␊ - Netlify configuration property "functions.test.ignored_node_modules" value changed to [].␊ - Netlify configuration property "functions.test.included_files" value changed to [].␊ - Netlify configuration property "functions.*.node_bundler" value changed to 'zisi'.␊ - Netlify configuration property "functions.*.external_node_modules" value changed to [].␊ - Netlify configuration property "functions.*.ignored_node_modules" value changed to [].␊ - Netlify configuration property "functions.*.included_files" value changed to [].␊ - Netlify configuration property "functions.node_bundler" value changed to 'zisi'.␊ - Netlify configuration property "functions.external_node_modules" value changed to [ 'test' ].␊ - Netlify configuration property "functions.ignored_node_modules" value changed to [ 'test' ].␊ - Netlify configuration property "functions.included_files" value changed to [ 'test' ].␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_any␊ - publishOrigin: default␊ - functions:␊ - '*':␊ - external_node_modules:␊ - - test␊ - ignored_node_modules:␊ - - test␊ - included_files:␊ - - test␊ - node_bundler: zisi␊ - test:␊ - external_node_modules: []␊ - ignored_node_modules: []␊ - included_files: []␊ - node_bundler: esbuild␊ - functionsDirectory: packages/build/tests/mutate/fixtures/functions_any/netlify/functions␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Functions were found in netlify/functions directory␊ - ␊ - (Functions bundling completed in 1ms)␊ - Build step duration: Functions bundling completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functions mutations can add new functions configs - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/functions_new␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_new␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_new/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_new␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "functions.test" value changed to { included_files: [] }.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/functions_new␊ - publishOrigin: default␊ - functions:␊ - test:␊ - included_files: []␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.functions mutations are only logged in debug mode - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: false␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/functions_no_log_debug␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/functions_no_log_debug/netlify.toml␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)` - -## netlifyConfig properties are deeply readonly by default - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/readonly_deep␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/readonly_deep␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/readonly_deep/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/readonly_deep␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "plugins" value changed to [␊ - { package: './plugin', origin: 'config', inputs: { example: true } }␊ - ].␊ - ␊ - Plugin "./plugin" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: "netlifyConfig.plugins" is read-only.␊ - ␊ - Plugin details␊ - Package: ./plugin␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/readonly_deep␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin` - -## netlifyConfig.processing can be assigned all at once - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/processing_all␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/processing_all␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/processing_all/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - processing:␊ - css:␊ - bundle: false␊ - minify: false␊ - html:␊ - pretty_urls: false␊ - images:␊ - compress: false␊ - js:␊ - bundle: false␊ - minify: false␊ - skip_processing: false␊ - publish: packages/build/tests/mutate/fixtures/processing_all␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.processing.css.bundle" value changed to true.␊ - Netlify configuration property "build.processing.css.minify" value changed to true.␊ - Netlify configuration property "build.processing.html.pretty_urls" value changed to true.␊ - Netlify configuration property "build.processing.images.compress" value changed to true.␊ - Netlify configuration property "build.processing.js.bundle" value changed to true.␊ - Netlify configuration property "build.processing.js.minify" value changed to true.␊ - Netlify configuration property "build.processing.skip_processing" value changed to true.␊ - ␊ - > Updated config␊ - build:␊ - processing:␊ - css:␊ - bundle: true␊ - minify: true␊ - html:␊ - pretty_urls: true␊ - images:␊ - compress: true␊ - js:␊ - bundle: true␊ - minify: true␊ - skip_processing: true␊ - publish: packages/build/tests/mutate/fixtures/processing_all␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - {␊ - css: { bundle: true, minify: true },␊ - html: { pretty_urls: true },␊ - images: { compress: true },␊ - js: { bundle: true, minify: true },␊ - skip_processing: true␊ - }␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.processing can be assigned individually - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/processing_prop␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/processing_prop␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/processing_prop/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - processing:␊ - css:␊ - bundle: false␊ - minify: false␊ - html:␊ - pretty_urls: false␊ - images:␊ - compress: false␊ - js:␊ - bundle: false␊ - minify: false␊ - skip_processing: false␊ - publish: packages/build/tests/mutate/fixtures/processing_prop␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.processing.css.bundle" value changed to true.␊ - Netlify configuration property "build.processing.css.minify" value changed to true.␊ - Netlify configuration property "build.processing.html.pretty_urls" value changed to true.␊ - Netlify configuration property "build.processing.images.compress" value changed to true.␊ - Netlify configuration property "build.processing.js.bundle" value changed to true.␊ - Netlify configuration property "build.processing.js.minify" value changed to true.␊ - Netlify configuration property "build.processing.skip_processing" value changed to true.␊ - ␊ - > Updated config␊ - build:␊ - processing:␊ - css:␊ - bundle: true␊ - minify: true␊ - html:␊ - pretty_urls: true␊ - images:␊ - compress: true␊ - js:␊ - bundle: true␊ - minify: true␊ - skip_processing: true␊ - publish: packages/build/tests/mutate/fixtures/processing_prop␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - {␊ - css: { bundle: true, minify: true },␊ - html: { pretty_urls: true },␊ - images: { compress: true },␊ - js: { bundle: true, minify: true },␊ - skip_processing: true␊ - }␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.command can be changed - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/build_command_change␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/build_command_change␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/build_command_change/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/build_command_change␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.command" value changed to 'node --version'.␊ - ␊ - > Updated config␊ - build:␊ - command: node --version␊ - commandOrigin: inline␊ - publish: packages/build/tests/mutate/fixtures/build_command_change␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - build.command from a plugin ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - $ node --version␊ - v1.0.0␊ - ␊ - (build.command completed in 1ms)␊ - Build step duration: build.command completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - node --version␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.command can be added - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/build_command_add␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/build_command_add␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/build_command_add/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/build_command_add␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.command" value changed to 'node --version'.␊ - ␊ - > Updated config␊ - build:␊ - command: node --version␊ - commandOrigin: inline␊ - publish: packages/build/tests/mutate/fixtures/build_command_add␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - build.command from a plugin ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - $ node --version␊ - v1.0.0␊ - ␊ - (build.command completed in 1ms)␊ - Build step duration: build.command completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.command can be removed - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/build_command_remove␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/build_command_remove␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/build_command_remove/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: test␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/build_command_remove␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.command" value changed to ''.␊ - ␊ - > Updated config␊ - build:␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/build_command_remove␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.environment can be assigned all at once - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/env_all␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/env_all␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/env_all/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - environment:␊ - - TEST_ONE␊ - publish: packages/build/tests/mutate/fixtures/env_all␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.environment.TEST_TWO" value changed.␊ - ␊ - > Updated config␊ - build:␊ - environment:␊ - - TEST_ONE␊ - - TEST_TWO␊ - publish: packages/build/tests/mutate/fixtures/env_all␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - { TEST_ONE: 'one', TEST_TWO: 'two' }␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.environment can be assigned individually - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/env_prop␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/env_prop␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/env_prop/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - environment:␊ - - TEST_ONE␊ - publish: packages/build/tests/mutate/fixtures/env_prop␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.environment.TEST_TWO" value changed.␊ - ␊ - > Updated config␊ - build:␊ - environment:␊ - - TEST_ONE␊ - - TEST_TWO␊ - publish: packages/build/tests/mutate/fixtures/env_prop␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - { TEST_ONE: 'one', TEST_TWO: 'two' }␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.publish mutations are used by constants.PUBLISH_DIR - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/publish_constants␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/publish_constants␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/publish_constants/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/publish_constants␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - .␊ - Netlify configuration property "build.publish" value changed to 'test'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/publish_constants/test␊ - publishOrigin: inline␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - test␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.build.edge_functions mutations are used by constants.EDGE_FUNCTIONS_SRC - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: false␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/edge_functions_constants␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/edge_functions_constants/netlify.toml␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - true␊ - Netlify configuration property "build.edge_functions" value changed to 'test'.␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - test␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - ␊ - Edge Functions bundling ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - No Edge Functions were found in test directory␊ - ␊ - (Edge Functions bundling completed in 1ms)␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)` - -## netlifyConfig.edge_functions can be assigned all at once - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: false␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/edge_functions_all␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/edge_functions_all/netlify.toml␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "edge_functions" value changed to [ { path: '/external/path', function: 'two' } ].␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - [ { path: '/external/path', function: 'two' } ]␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)` - -## netlifyConfig.services can be assigned all at once - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/services_all␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/services_all␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/services_all/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/services_all␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.services.identity" value changed to 'two'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/services_all␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - { identity: 'two' }␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig.services can be assigned individually - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/services_prop␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/services_prop␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/services_prop/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/services_prop␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.services.identity" value changed to 'two'.␊ - ␊ - > Updated config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/services_prop␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - { identity: 'two' }␊ - ␊ - (./plugin onBuild completed in 1ms)␊ - Build step duration: ./plugin onBuild completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig mutations fail if done in an event that is too late - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/too_late␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/too_late␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/too_late/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/too_late␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.command" value changed to 'node --version'.␊ - ␊ - Plugin "./plugin" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: "netlifyConfig.build.command" cannot be modified after "onPreBuild".␊ - ␊ - Plugin details␊ - Package: ./plugin␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onBuild" event in "./plugin" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/too_late␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin` - -## netlifyConfig mutations fail correctly on symbols - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/symbol␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/symbol␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/symbol/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: node --version␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate/fixtures/symbol␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - (./plugin onPreBuild completed in 1ms)␊ - Build step duration: ./plugin onPreBuild completed in 1ms␊ - ␊ - build.command from netlify.toml ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - $ node --version␊ - v1.0.0␊ - ␊ - (build.command completed in 1ms)␊ - Build step duration: build.command completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - -## netlifyConfig mutations fail if the syntax is invalid - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate/fixtures/invalid_syntax␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: true␊ - ␊ - > Current directory␊ - packages/build/tests/mutate/fixtures/invalid_syntax␊ - ␊ - > Config file␊ - packages/build/tests/mutate/fixtures/invalid_syntax/netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/invalid_syntax␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin␊ - ␊ - > Context␊ - production␊ - ␊ - > Loading plugins␊ - - ./plugin@1.0.0 from netlify.toml␊ - ␊ - ./plugin (onPreBuild event) ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Netlify configuration property "build.command" value changed to false.␊ - ␊ - Plugin "./plugin" internal error ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - Error message␊ - Error: When resolving config file packages/build/tests/mutate/fixtures/invalid_syntax/netlify.toml:␊ - Configuration property build.command must be a string␊ - ␊ - Invalid syntax␊ - ␊ - [build]␊ - command = false␊ - ␊ - Valid syntax␊ - ␊ - [build]␊ - command = "npm run build"␊ - ␊ - Plugin details␊ - Package: ./plugin␊ - Version: 1.0.0␊ - Repository: git+https://github.com/netlify/build.git␊ - Report issues: https://github.com/netlify/build/issues␊ - ␊ - Error location␊ - In "onPreBuild" event in "./plugin" from netlify.toml␊ - STACK TRACE␊ - ␊ - Resolved config␊ - build:␊ - publish: packages/build/tests/mutate/fixtures/invalid_syntax␊ - publishOrigin: default␊ - plugins:␊ - - inputs: {}␊ - origin: config␊ - package: ./plugin` diff --git a/packages/build/tests/mutate/snapshots/tests.js.snap b/packages/build/tests/mutate/snapshots/tests.js.snap index 94ff81e97c..587e9a365d 100644 Binary files a/packages/build/tests/mutate/snapshots/tests.js.snap and b/packages/build/tests/mutate/snapshots/tests.js.snap differ diff --git a/packages/build/tests/mutate/tests.js b/packages/build/tests/mutate/tests.js index 30a14df568..c5c731c89e 100644 --- a/packages/build/tests/mutate/tests.js +++ b/packages/build/tests/mutate/tests.js @@ -1,3 +1,5 @@ +import os from 'os' + import { Fixture, normalizeOutput } from '@netlify/testing' import test from 'ava' @@ -8,205 +10,224 @@ test('Pass netlifyConfig to plugins', async (t) => { test('netlifyConfig properties are readonly (set) by default', async (t) => { const output = await new Fixture('./fixtures/readonly_set').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(` Error: "netlifyConfig.build.ignore" is read-only.`)) }) test('netlifyConfig properties are readonly (delete) by default', async (t) => { const output = await new Fixture('./fixtures/readonly_delete').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: Setting "netlifyConfig.build.command" to undefined is not allowed.`)) }) test('netlifyConfig properties are readonly (defineProperty) by default', async (t) => { const output = await new Fixture('./fixtures/readonly_define').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: "netlifyConfig.build.ignore" is read-only.`)) }) test('Some netlifyConfig properties can be mutated', async (t) => { const output = await new Fixture('./fixtures/general').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig properties cannot be deleted', async (t) => { const output = await new Fixture('./fixtures/delete').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: Setting "netlifyConfig.build.command" to undefined is not allowed.`)) }) test('netlifyConfig properties cannot be assigned to undefined', async (t) => { const output = await new Fixture('./fixtures/set_undefined').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: Setting "netlifyConfig.build.command" to undefined is not allowed.`)) }) test('netlifyConfig properties cannot be assigned to null', async (t) => { const output = await new Fixture('./fixtures/set_null').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: Setting "netlifyConfig.build.command" to null is not allowed.`)) }) test('netlifyConfig properties cannot be assigned to undefined with defineProperty', async (t) => { const output = await new Fixture('./fixtures/define_undefined').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: Setting "netlifyConfig.build.command" to undefined is not allowed.`)) }) test('netlifyConfig properties mutations is persisted', async (t) => { const output = await new Fixture('./fixtures/persist').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.command" value changed to 'node --version'.`)) }) test('netlifyConfig array properties can be mutated per index', async (t) => { const output = await new Fixture('./fixtures/array_index').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true( + output.includes(`Netlify configuration property "functions.*.included_files" value changed to [ 'one', 'two' ].`), + ) }) test('netlifyConfig array properties can be pushed', async (t) => { const output = await new Fixture('./fixtures/array_push').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true( + output.includes(`Netlify configuration property "functions.*.included_files" value changed to [ 'one', 'two' ].`), + ) }) test('netlifyConfig.functionsDirectory mutations are used during functions bundling', async (t) => { const output = await new Fixture('./fixtures/functions_directory_bundling').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.functionsDirectory deletion skips functions bundling', async (t) => { const output = await new Fixture('./fixtures/functions_directory_skip').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to ''.`)) }) test('netlifyConfig.functionsDirectory mutations are used by utils.functions', async (t) => { const output = await new Fixture('./fixtures/functions_directory_utils').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.functionsDirectory mutations are used by constants.FUNCTIONS_SRC', async (t) => { const output = await new Fixture('./fixtures/functions_directory_constants').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.functionsDirectory mutations are taken into account by default constants.FUNCTIONS_SRC', async (t) => { const output = await new Fixture('./fixtures/functions_directory_default').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.functions.star.directory mutations work', async (t) => { const output = await new Fixture('./fixtures/functions_directory_star').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.*.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.functions.star.directory has priority over functions.directory', async (t) => { const output = await new Fixture('./fixtures/functions_directory_star_priority').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.*.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.functions.directory mutations work', async (t) => { const output = await new Fixture('./fixtures/functions_directory_nested').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.functions.directory has priority over functions.star.directory', async (t) => { const output = await new Fixture('./fixtures/functions_directory_nested_priority').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.directory" value changed to 'test_functions'.`)) }) test('netlifyConfig.build.functions mutations work', async (t) => { const output = await new Fixture('./fixtures/functions_directory_build').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.functions" value changed to 'test_functions'.`)) }) test('netlifyConfig.functions mutations are used during functions bundling', async (t) => { const output = await new Fixture('./fixtures/functions_bundling').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.test.node_bundler" value changed to 'zisi'.`)) }) test('netlifyConfig.functions mutations on any property can be used', async (t) => { const output = await new Fixture('./fixtures/functions_any').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.test.external_node_modules" value changed to [].`)) }) test('netlifyConfig.functions mutations can add new functions configs', async (t) => { const output = await new Fixture('./fixtures/functions_new').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "functions.test" value changed to { included_files: [] }.`)) }) test('netlifyConfig.functions mutations are only logged in debug mode', async (t) => { const output = await new Fixture('./fixtures/functions_no_log_debug').withFlags({ debug: false }).runWithBuild() - t.snapshot(normalizeOutput(output)) + t.false(output.includes(`Netlify configuration property "functions.test" value changed to { included_files: [] }.`)) }) test('netlifyConfig properties are deeply readonly by default', async (t) => { const output = await new Fixture('./fixtures/readonly_deep').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: "netlifyConfig.plugins" is read-only.`)) }) test('netlifyConfig.processing can be assigned all at once', async (t) => { const output = await new Fixture('./fixtures/processing_all').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.processing.css.bundle" value changed to true.`)) }) test('netlifyConfig.processing can be assigned individually', async (t) => { const output = await new Fixture('./fixtures/processing_prop').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.processing.css.bundle" value changed to true.`)) }) test('netlifyConfig.build.command can be changed', async (t) => { const output = await new Fixture('./fixtures/build_command_change').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.command" value changed to 'node --version'.`)) }) test('netlifyConfig.build.command can be added', async (t) => { const output = await new Fixture('./fixtures/build_command_add').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.command" value changed to 'node --version'.`)) }) test('netlifyConfig.build.command can be removed', async (t) => { + if (os.platform() === 'win32') { + t.log('Test skipped on Windows.') + t.pass() + return + } const output = await new Fixture('./fixtures/build_command_remove').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.command" value changed to ''.`)) }) test('netlifyConfig.build.environment can be assigned all at once', async (t) => { const output = await new Fixture('./fixtures/env_all').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.environment.TEST_TWO" value changed.`)) }) test('netlifyConfig.build.environment can be assigned individually', async (t) => { const output = await new Fixture('./fixtures/env_prop').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.environment.TEST_TWO" value changed.`)) }) test('netlifyConfig.build.publish mutations are used by constants.PUBLISH_DIR', async (t) => { + if (os.platform() === 'win32') { + t.log('Test skipped on Windows.') + t.pass() + return + } const output = await new Fixture('./fixtures/publish_constants').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.publish" value changed to 'test'.`)) }) test('netlifyConfig.build.edge_functions mutations are used by constants.EDGE_FUNCTIONS_SRC', async (t) => { const output = await new Fixture('./fixtures/edge_functions_constants').withFlags({ debug: false }).runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.edge_functions" value changed to 'test'.`)) }) test('netlifyConfig.edge_functions can be assigned all at once', async (t) => { + if (os.platform() === 'win32') { + t.log('Test skipped on Windows.') + t.pass() + return + } const output = await new Fixture('./fixtures/edge_functions_all').withFlags({ debug: false }).runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify Build Complete`)) }) test('netlifyConfig.services can be assigned all at once', async (t) => { const output = await new Fixture('./fixtures/services_all').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.services.identity" value changed to 'two'.`)) }) test('netlifyConfig.services can be assigned individually', async (t) => { const output = await new Fixture('./fixtures/services_prop').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify configuration property "build.services.identity" value changed to 'two'.`)) }) test('netlifyConfig mutations fail if done in an event that is too late', async (t) => { const output = await new Fixture('./fixtures/too_late').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Error: "netlifyConfig.build.command" cannot be modified after "onPreBuild".`)) }) test('netlifyConfig mutations fail correctly on symbols', async (t) => { const output = await new Fixture('./fixtures/symbol').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Netlify Build completed`)) }) test('netlifyConfig mutations fail if the syntax is invalid', async (t) => { const output = await new Fixture('./fixtures/invalid_syntax').runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`Configuration property build.command must be a string`)) }) diff --git a/packages/build/tests/mutate_save/snapshots/tests.js.md b/packages/build/tests/mutate_save/snapshots/tests.js.md index 033367e509..ae9bc1ab0b 100644 --- a/packages/build/tests/mutate_save/snapshots/tests.js.md +++ b/packages/build/tests/mutate_save/snapshots/tests.js.md @@ -335,89 +335,6 @@ Generated by [AVA](https://avajs.dev). (Netlify Build completed in 1ms)␊ Build step duration: Netlify Build completed in 1ms` -## Erroneous headers created by a build command are handled - -> Snapshot 1 - - `␊ - Warning: some headers have syntax errors:␊ - ␊ - Path should come before header "test"␊ - ␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - branch: main␊ - buildbotServerSocket: /test/socket␊ - config: packages/build/tests/mutate_save/fixtures/headers_command_error/test_netlify.toml␊ - context: production␊ - debug: true␊ - repositoryRoot: packages/build/tests/mutate_save/fixtures/headers_command_error␊ - saveConfig: true␊ - testOpts:␊ - pluginsListUrl: test␊ - silentLingeringProcesses: 'true'␊ - ␊ - > Current directory␊ - packages/build/tests/mutate_save/fixtures/headers_command_error␊ - ␊ - > Config file␊ - packages/build/tests/mutate_save/fixtures/headers_command_error/test_netlify.toml␊ - ␊ - > Resolved config␊ - build:␊ - command: node command.js␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate_save/fixtures/headers_command_error␊ - publishOrigin: default␊ - ␊ - > Context␊ - production␊ - ␊ - build.command from netlify.toml ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - $ node command.js␊ - ␊ - > Updated config␊ - build:␊ - command: node command.js␊ - commandOrigin: config␊ - publish: packages/build/tests/mutate_save/fixtures/headers_command_error␊ - publishOrigin: default␊ - ␊ - (build.command completed in 1ms)␊ - Build step duration: build.command completed in 1ms␊ - ␊ - Deploy site ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - ␊ - > Uploaded config␊ - [build]␊ - command = "node command.js"␊ - ␊ - > Uploaded headers␊ - test: one␊ - ␊ - > Uploaded redirects␊ - No redirects␊ - ␊ - Site deploy was successfully initiated␊ - ␊ - (Deploy site completed in 1ms)␊ - Build step duration: Deploy site completed in 1ms␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)␊ - Build step duration: Netlify Build completed in 1ms` - ## Erroneous headers created by a plugin are handled > Snapshot 1 diff --git a/packages/build/tests/mutate_save/snapshots/tests.js.snap b/packages/build/tests/mutate_save/snapshots/tests.js.snap index 20ab8fc0f6..1300408842 100644 Binary files a/packages/build/tests/mutate_save/snapshots/tests.js.snap and b/packages/build/tests/mutate_save/snapshots/tests.js.snap differ diff --git a/packages/build/tests/mutate_save/tests.js b/packages/build/tests/mutate_save/tests.js index 326f7992b8..dbc9385cb1 100644 --- a/packages/build/tests/mutate_save/tests.js +++ b/packages/build/tests/mutate_save/tests.js @@ -88,7 +88,7 @@ test('Erroneous headers created by a build command are handled', async (t) => { branch: 'main', }) .runBuildBinary() - t.snapshot(normalizeOutput(output)) + t.true(output.includes('Warning: some headers have syntax errors')) } finally { await stopServer() } diff --git a/packages/build/tests/secrets_scanning/snapshots/tests.js.md b/packages/build/tests/secrets_scanning/snapshots/tests.js.md index cc66dd043a..c09f58ec78 100644 --- a/packages/build/tests/secrets_scanning/snapshots/tests.js.md +++ b/packages/build/tests/secrets_scanning/snapshots/tests.js.md @@ -379,47 +379,3 @@ Generated by [AVA](https://avajs.dev). - ENV_VAR_MULTI_NOT_SECRET␊ publish: packages/build/tests/secrets_scanning/fixtures/src_scanning_env_vars_set_non_empty/dist␊ publishOrigin: config` - -## secrets scanning, should not fail if the secrets values are not detected in the build output - -> Snapshot 1 - - `␊ - Netlify Build ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - > Version␊ - @netlify/build 1.0.0␊ - ␊ - > Flags␊ - debug: false␊ - ␊ - > Current directory␊ - packages/build/tests/secrets_scanning/fixtures/src_scanning_env_vars_no_matches␊ - ␊ - > Config file␊ - packages/build/tests/secrets_scanning/fixtures/src_scanning_env_vars_no_matches/netlify.toml␊ - ␊ - > Context␊ - production␊ - ␊ - build.command from netlify.toml ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - $ cp -r ./src/static-files ./dist␊ - ␊ - (build.command completed in 1ms)␊ - ␊ - Scanning for secrets in code and build output. ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - SECRETS_SCAN_OMIT_PATHS override option set to: netlify.toml␊ - ␊ - Secrets scanning complete. 4 file(s) scanned. No secrets detected in build output or repo code!␊ - ␊ - (Secrets scanning completed in 1ms)␊ - ␊ - Netlify Build Complete ␊ - ────────────────────────────────────────────────────────────────␊ - ␊ - (Netlify Build completed in 1ms)` diff --git a/packages/build/tests/secrets_scanning/snapshots/tests.js.snap b/packages/build/tests/secrets_scanning/snapshots/tests.js.snap index 95140b6fa5..c278f9adc6 100644 Binary files a/packages/build/tests/secrets_scanning/snapshots/tests.js.snap and b/packages/build/tests/secrets_scanning/snapshots/tests.js.snap differ diff --git a/packages/build/tests/secrets_scanning/tests.js b/packages/build/tests/secrets_scanning/tests.js index 8716ae4a8c..aec29306b4 100644 --- a/packages/build/tests/secrets_scanning/tests.js +++ b/packages/build/tests/secrets_scanning/tests.js @@ -63,5 +63,5 @@ test('secrets scanning, should not fail if the secrets values are not detected i const output = await new Fixture('./fixtures/src_scanning_env_vars_no_matches') .withFlags({ debug: false, explicitSecretKeys: 'ENV_VAR_1,ENV_VAR_2' }) .runWithBuild() - t.snapshot(normalizeOutput(output)) + t.true(output.includes(`No secrets detected in build output or repo code!`)) })