From 17d1e6af6b2644448fe93a694b1e9c1d4493a253 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:27:03 +0000 Subject: [PATCH] fix(deps): update netlify packages (#6385) * fix(deps): update netlify packages * fix: dont try reading response from error * fix: add more tests and logs * fix: check what happens if every test has its own directory * fix: try adding a timeout --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Simon Knott --- package-lock.json | 84 +++++++-------- package.json | 8 +- .../commands/deploy/deploy.test.js | 101 +++++++++--------- 3 files changed, 96 insertions(+), 97 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6fcc98ecde6..eca5bc9851e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,12 +13,12 @@ "@bugsnag/js": "7.20.2", "@fastify/static": "6.10.2", "@netlify/blobs": "6.5.0", - "@netlify/build": "29.33.7", - "@netlify/build-info": "7.12.1", - "@netlify/config": "20.11.1", + "@netlify/build": "29.35.1", + "@netlify/build-info": "7.13.0", + "@netlify/config": "20.12.0", "@netlify/edge-bundler": "11.2.2", "@netlify/local-functions-proxy": "1.1.1", - "@netlify/zip-it-and-ship-it": "9.29.1", + "@netlify/zip-it-and-ship-it": "9.29.2", "@octokit/rest": "19.0.13", "ansi-escapes": "6.2.0", "ansi-styles": "6.2.1", @@ -2228,22 +2228,22 @@ } }, "node_modules/@netlify/build": { - "version": "29.33.7", - "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.33.7.tgz", - "integrity": "sha512-eq3sMthu7jPJPpd656EX/T9Siu+2lBAWJUdkMdoaa3fl0iZo4KmBZyvZcN+u4GH+hSo+WCEMDyWz1N0o2LfC9w==", + "version": "29.35.1", + "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.35.1.tgz", + "integrity": "sha512-BOXhBFL85D6WdfXFxkZ3q1DBTbL5BG+GwkJWMJS7W5uJYL9+DskJ0aOlFjosJqMbNF4vZds1ChTkufpepr3YHA==", "dependencies": { "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^6.5.0", "@netlify/cache-utils": "^5.1.5", - "@netlify/config": "^20.11.1", + "@netlify/config": "^20.12.0", "@netlify/edge-bundler": "11.2.2", "@netlify/framework-info": "^9.8.10", - "@netlify/functions-utils": "^5.2.50", + "@netlify/functions-utils": "^5.2.51", "@netlify/git-utils": "^5.1.1", "@netlify/opentelemetry-utils": "^1.0.1", "@netlify/plugins-list": "^6.73.0", "@netlify/run-utils": "^5.1.1", - "@netlify/zip-it-and-ship-it": "9.29.1", + "@netlify/zip-it-and-ship-it": "9.29.2", "@opentelemetry/api": "~1.6.0", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", @@ -2307,9 +2307,9 @@ } }, "node_modules/@netlify/build-info": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.12.1.tgz", - "integrity": "sha512-l4Vf9kPueqHI9Kv9jlMVO/jytZSZDkhdn5Re9UlWG7lFi5NZHkf7srzYowxWl6EBnraYERQ7xTovagfvt04F+w==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.13.0.tgz", + "integrity": "sha512-rVwq9HGp72mLjSzmyHXMwmKBtArbZYdvLMnqIdiTOVJDOC7nL8mce1JQhHC4DI0dNe/3k3xfzceeKPeeNY993A==", "dependencies": { "@bugsnag/js": "^7.20.0", "@iarna/toml": "^2.2.5", @@ -2818,9 +2818,9 @@ } }, "node_modules/@netlify/config": { - "version": "20.11.1", - "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.11.1.tgz", - "integrity": "sha512-Lm5x/3f2/QRRpDqb88HDNKU/OfAlboZ0saAq46oIrVMsqRY3IfC7BgYObjYOZKN4XxzdbyuCa5wjA68fZrzRow==", + "version": "20.12.0", + "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.12.0.tgz", + "integrity": "sha512-RgUxG8I2tO/mef3/UY2k10yHOz68UKmJjpM8NCLd7hNYXfdXJeBKTwGJklrjV7zkx3XKbDgSJZwICBF0s6IM0Q==", "dependencies": { "@iarna/toml": "^2.2.5", "chalk": "^5.0.0", @@ -3472,11 +3472,11 @@ } }, "node_modules/@netlify/functions-utils": { - "version": "5.2.50", - "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.50.tgz", - "integrity": "sha512-XbJPdptmINULEL9YBbKMvee1/qsnjWvH4tnTpSo9yLsOx2O6/YDqU/uUNI/iJTwZp2fu7RaLI/MU6nkpCceW1g==", + "version": "5.2.51", + "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.51.tgz", + "integrity": "sha512-A4XLQOE2pfcOHcCTs97G6FDVQg20zGoROCAZcpnNd8bMvBDDVgziC/xoFxm4xGC36u0YogSECsLoIbSKSxLloA==", "dependencies": { - "@netlify/zip-it-and-ship-it": "9.29.1", + "@netlify/zip-it-and-ship-it": "9.29.2", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, @@ -3935,9 +3935,9 @@ } }, "node_modules/@netlify/zip-it-and-ship-it": { - "version": "9.29.1", - "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.29.1.tgz", - "integrity": "sha512-Dli45ALeBTvoedU5BGNX1yvvOw7FUm6SHzkxoUPs/4ekQTwPz9IZI35fBRRY28eNJANuZw51PRhtglIyUbYKIg==", + "version": "9.29.2", + "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.29.2.tgz", + "integrity": "sha512-9o/4lsFWuyPpe38Rhk/00JyccKSBRGM9Av3DINnh/QrpTeIC6esfJsaJNQ4JQ+gU4XXAwxPY9Uk+16WMPs/zkg==", "dependencies": { "@babel/parser": "^7.22.5", "@babel/types": "7.23.6", @@ -24548,22 +24548,22 @@ "integrity": "sha512-wRFlNnL/Qv3WNLZd3OT/YYqF1zb6iPSo8T31sl9ccL1ahBxW1fBqKgF4b1XL7Z+6mRIkatvcsVPkWBcO+oJMNA==" }, "@netlify/build": { - "version": "29.33.7", - "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.33.7.tgz", - "integrity": "sha512-eq3sMthu7jPJPpd656EX/T9Siu+2lBAWJUdkMdoaa3fl0iZo4KmBZyvZcN+u4GH+hSo+WCEMDyWz1N0o2LfC9w==", + "version": "29.35.1", + "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.35.1.tgz", + "integrity": "sha512-BOXhBFL85D6WdfXFxkZ3q1DBTbL5BG+GwkJWMJS7W5uJYL9+DskJ0aOlFjosJqMbNF4vZds1ChTkufpepr3YHA==", "requires": { "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^6.5.0", "@netlify/cache-utils": "^5.1.5", - "@netlify/config": "^20.11.1", + "@netlify/config": "^20.12.0", "@netlify/edge-bundler": "11.2.2", "@netlify/framework-info": "^9.8.10", - "@netlify/functions-utils": "^5.2.50", + "@netlify/functions-utils": "^5.2.51", "@netlify/git-utils": "^5.1.1", "@netlify/opentelemetry-utils": "^1.0.1", "@netlify/plugins-list": "^6.73.0", "@netlify/run-utils": "^5.1.1", - "@netlify/zip-it-and-ship-it": "9.29.1", + "@netlify/zip-it-and-ship-it": "9.29.2", "@opentelemetry/api": "~1.6.0", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", @@ -24837,9 +24837,9 @@ } }, "@netlify/build-info": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.12.1.tgz", - "integrity": "sha512-l4Vf9kPueqHI9Kv9jlMVO/jytZSZDkhdn5Re9UlWG7lFi5NZHkf7srzYowxWl6EBnraYERQ7xTovagfvt04F+w==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.13.0.tgz", + "integrity": "sha512-rVwq9HGp72mLjSzmyHXMwmKBtArbZYdvLMnqIdiTOVJDOC7nL8mce1JQhHC4DI0dNe/3k3xfzceeKPeeNY993A==", "requires": { "@bugsnag/js": "^7.20.0", "@iarna/toml": "^2.2.5", @@ -24931,9 +24931,9 @@ } }, "@netlify/config": { - "version": "20.11.1", - "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.11.1.tgz", - "integrity": "sha512-Lm5x/3f2/QRRpDqb88HDNKU/OfAlboZ0saAq46oIrVMsqRY3IfC7BgYObjYOZKN4XxzdbyuCa5wjA68fZrzRow==", + "version": "20.12.0", + "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.12.0.tgz", + "integrity": "sha512-RgUxG8I2tO/mef3/UY2k10yHOz68UKmJjpM8NCLd7hNYXfdXJeBKTwGJklrjV7zkx3XKbDgSJZwICBF0s6IM0Q==", "requires": { "@iarna/toml": "^2.2.5", "chalk": "^5.0.0", @@ -25381,11 +25381,11 @@ } }, "@netlify/functions-utils": { - "version": "5.2.50", - "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.50.tgz", - "integrity": "sha512-XbJPdptmINULEL9YBbKMvee1/qsnjWvH4tnTpSo9yLsOx2O6/YDqU/uUNI/iJTwZp2fu7RaLI/MU6nkpCceW1g==", + "version": "5.2.51", + "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.51.tgz", + "integrity": "sha512-A4XLQOE2pfcOHcCTs97G6FDVQg20zGoROCAZcpnNd8bMvBDDVgziC/xoFxm4xGC36u0YogSECsLoIbSKSxLloA==", "requires": { - "@netlify/zip-it-and-ship-it": "9.29.1", + "@netlify/zip-it-and-ship-it": "9.29.2", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, @@ -25639,9 +25639,9 @@ } }, "@netlify/zip-it-and-ship-it": { - "version": "9.29.1", - "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.29.1.tgz", - "integrity": "sha512-Dli45ALeBTvoedU5BGNX1yvvOw7FUm6SHzkxoUPs/4ekQTwPz9IZI35fBRRY28eNJANuZw51PRhtglIyUbYKIg==", + "version": "9.29.2", + "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.29.2.tgz", + "integrity": "sha512-9o/4lsFWuyPpe38Rhk/00JyccKSBRGM9Av3DINnh/QrpTeIC6esfJsaJNQ4JQ+gU4XXAwxPY9Uk+16WMPs/zkg==", "requires": { "@babel/parser": "^7.22.5", "@babel/types": "7.23.6", diff --git a/package.json b/package.json index f28adb52dd5..f8c5cc8d146 100644 --- a/package.json +++ b/package.json @@ -73,12 +73,12 @@ "@bugsnag/js": "7.20.2", "@fastify/static": "6.10.2", "@netlify/blobs": "6.5.0", - "@netlify/build": "29.33.7", - "@netlify/build-info": "7.12.1", - "@netlify/config": "20.11.1", + "@netlify/build": "29.35.1", + "@netlify/build-info": "7.13.0", + "@netlify/config": "20.12.0", "@netlify/edge-bundler": "11.2.2", "@netlify/local-functions-proxy": "1.1.1", - "@netlify/zip-it-and-ship-it": "9.29.1", + "@netlify/zip-it-and-ship-it": "9.29.2", "@octokit/rest": "19.0.13", "ansi-escapes": "6.2.0", "ansi-styles": "6.2.1", diff --git a/tests/integration/commands/deploy/deploy.test.js b/tests/integration/commands/deploy/deploy.test.js index 2693adf43b4..394b4ee51b1 100644 --- a/tests/integration/commands/deploy/deploy.test.js +++ b/tests/integration/commands/deploy/deploy.test.js @@ -8,6 +8,7 @@ import { afterAll, beforeAll, describe, test } from 'vitest' import { callCli } from '../../utils/call-cli.js' import { createLiveTestSite, generateSiteName } from '../../utils/create-live-test-site.js' +import { pause } from '../../utils/pause.js' import { withSiteBuilder } from '../../utils/site-builder.ts' // eslint-disable-next-line no-underscore-dangle @@ -19,20 +20,12 @@ const SITE_NAME = generateSiteName('netlify-test-deploy-') const validateContent = async ({ content, path, siteUrl, t }) => { const response = await fetch(`${siteUrl}${path}`) const body = await response.text() - const statusCode = response.status - try { - if (content === undefined) { - t.expect(response.status).toBe(404) - return - } - t.expect(body).toEqual(content) - } catch (error) { - const { - response: { statusMessage }, - } = error - - throw new Error(`Failed getting content: ${statusCode} - ${statusMessage} - ${body}`) + if (content === undefined) { + t.expect(response.status).toBe(404) + return } + t.expect(response.status, `status should be 200. request id: ${response.headers.get('x-nf-request-id')}`).toBe(200) + t.expect(body, `body should be as expected. request id: ${response.headers.get('x-nf-request-id')}`).toEqual(content) } const validateDeploy = async ({ content, contentMessage, deploy, siteName, t }) => { @@ -61,14 +54,14 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy site when dir flag is passed', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { const content = '

⊂◉‿◉つ

' builder.withContentFile({ path: 'public/index.html', content, }) - await builder.buildAsync() + await builder.build() const deploy = await callCli(['deploy', '--json', '--dir', 'public'], { cwd: builder.directory, @@ -80,7 +73,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy site by name', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { const content = '

⊂◉‿◉つ

' builder .withContentFile({ @@ -93,7 +86,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }) - await builder.buildAsync() + await builder.build() const deploy = await callCli(['deploy', '--json', '--site', SITE_NAME], { cwd: builder.directory, @@ -104,7 +97,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy site when publish directory set in netlify.toml', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { const content = '

⊂◉‿◉つ

' builder .withContentFile({ @@ -117,7 +110,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }) - await builder.buildAsync() + await builder.build() const deploy = await callCli(['deploy', '--json'], { cwd: builder.directory, @@ -129,7 +122,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy Edge Functions when directory exists', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { const content = 'Edge Function works NOT' builder .withContentFile({ @@ -147,7 +140,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co name: 'edge', }) - await builder.buildAsync() + await builder.build() const options = { cwd: builder.directory, @@ -157,6 +150,9 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co await callCli(['build'], options) const deploy = await callCli(['deploy', '--json'], options).then((output) => JSON.parse(output)) + // give edge functions manifest a couple ticks to propagate + await pause(500) + await validateDeploy({ deploy, siteName: SITE_NAME, @@ -168,7 +164,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy Edge Functions with custom cwd when directory exists', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { const content = 'Edge Function works NOT' const pathPrefix = 'app/cool' builder @@ -189,7 +185,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co pathPrefix, }) - await builder.buildAsync() + await builder.build() const options = { cwd: builder.directory, @@ -201,6 +197,9 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co JSON.parse(output), ) + // give edge functions manifest a couple ticks to propagate + await pause(500) + await validateDeploy({ deploy, siteName: SITE_NAME, @@ -212,7 +211,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should run build command before deploy when build flag is passed', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { const content = '

⊂◉‿◉つ

' builder .withContentFile({ @@ -225,7 +224,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }) - await builder.buildAsync() + await builder.build() const output = await callCli(['deploy', '--build'], { cwd: builder.directory, @@ -236,8 +235,8 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) }) - test('should return valid json when both --build and --json are passed', async () => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + test('should return valid json when both --build and --json are passed', async (t) => { + await withSiteBuilder(t, async (builder) => { const content = '

⊂◉‿◉つ

' builder .withContentFile({ @@ -250,7 +249,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }) - await builder.buildAsync() + await builder.build() const output = await callCli(['deploy', '--build', '--json'], { cwd: builder.directory, @@ -262,7 +261,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy hidden public folder but ignore hidden/__MACOSX files', async (t) => { - await withSiteBuilder('site-with-a-dedicated-publish-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { builder .withContentFiles([ { @@ -288,7 +287,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }) - await builder.buildAsync() + await builder.build() const deploy = await callCli(['deploy', '--json'], { cwd: builder.directory, @@ -318,7 +317,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should filter node_modules from root directory', async (t) => { - await withSiteBuilder('site-with-a-project-directory', async (builder) => { + await withSiteBuilder(t, async (builder) => { builder .withContentFiles([ { @@ -336,7 +335,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }) - await builder.buildAsync() + await builder.build() const deploy = await callCli(['deploy', '--json'], { cwd: builder.directory, @@ -354,7 +353,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should not filter node_modules from publish directory', async (t) => { - await withSiteBuilder('site-with-a-project-directory', async (builder) => { + await withSiteBuilder(t, async (builder) => { builder .withContentFiles([ { @@ -372,7 +371,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }) - await builder.buildAsync() + await builder.build() const deploy = await callCli(['deploy', '--json'], { cwd: builder.directory, @@ -390,8 +389,8 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should exit with error when deploying an empty directory', async (t) => { - await withSiteBuilder('site-with-an-empty-directory', async (builder) => { - await builder.buildAsync() + await withSiteBuilder(t, async (builder) => { + await builder.build() try { await callCli(['deploy', '--dir', '.'], { @@ -405,7 +404,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should refresh configuration when --build is passed', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { await builder .withContentFile({ path: 'public/index.html', @@ -436,7 +435,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }, }) - .buildAsync() + .build() const { deploy_url: deployUrl } = await callCli( ['deploy', '--build', '--json'], @@ -454,7 +453,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy functions from internal functions directory', async (t) => { - await withSiteBuilder('site-with-internal-functions', async (builder) => { + await withSiteBuilder(t, async (builder) => { await builder .withNetlifyToml({ config: { @@ -498,7 +497,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co `, path: '.netlify/functions-internal/func-4.mjs', }) - .buildAsync() + .build() const { deploy_url: deployUrl } = await callCli( ['deploy', '--build', '--json'], @@ -526,7 +525,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should deploy functions from internal functions directory when setting `base` to a sub-directory', async (t) => { - await withSiteBuilder('site-with-internal-functions-sub-directory', async (builder) => { + await withSiteBuilder(t, async (builder) => { await builder .withNetlifyToml({ config: { @@ -542,7 +541,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co body: 'Internal', }), }) - .buildAsync() + .build() const { deploy_url: deployUrl } = await callCli( ['deploy', '--build', '--json'], @@ -559,7 +558,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should handle redirects mutated by plugins', async (t) => { - await withSiteBuilder('site-with-public-folder', async (builder) => { + await withSiteBuilder(t, async (builder) => { const content = '

⊂◉‿◉つ

' await builder .withContentFile({ @@ -600,7 +599,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }, }, }) - .buildAsync() + .build() const deploy = await callCli( ['deploy', '--json', '--build'], @@ -648,7 +647,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co runtime: 'js', } - await withSiteBuilder('site-with-functions-manifest-1', async (builder) => { + await withSiteBuilder(t, async (builder) => { await builder .withNetlifyToml({ config: { @@ -684,7 +683,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co body: 'Bundled at deployment', }), }) - .buildAsync() + .build() const { deploy_url: deployUrl } = await callCli( ['deploy', '--json'], @@ -707,7 +706,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co runtime: 'js', } - await withSiteBuilder('site-with-functions-manifest-2', async (builder) => { + await withSiteBuilder(t, async (builder) => { await builder .withNetlifyToml({ config: { @@ -743,7 +742,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co body: 'Bundled at deployment', }), }) - .buildAsync() + .build() const { deploy_url: deployUrl } = await callCli( ['deploy', '--json', '--skip-functions-cache'], @@ -768,7 +767,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co runtime: 'js', } - await withSiteBuilder('site-with-functions-manifest-3', async (builder) => { + await withSiteBuilder(t, async (builder) => { await builder .withNetlifyToml({ config: { @@ -804,7 +803,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co body: 'Bundled at deployment', }), }) - .buildAsync() + .build() const { deploy_url: deployUrl } = await callCli( ['deploy', '--json'], @@ -821,7 +820,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) test('should upload blobs when saved into .netlify directory', async (t) => { - await withSiteBuilder('site-with-blobs', async (builder) => { + await withSiteBuilder(t, async (builder) => { await builder .withNetlifyToml({ config: {