Skip to content

Commit

Permalink
Merge branch 'main' into oct-30
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahetter authored Nov 26, 2024
2 parents 321292a + e9dc383 commit ef0ed31
Show file tree
Hide file tree
Showing 64 changed files with 3,866 additions and 2,129 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# This posts the status to the PR/commit
- uses: haya14busa/action-workflow_run-status@v1
- name: Download deltas
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
# This is the workflow that triggered this run
workflow: ${{ github.event.workflow.id }}
Expand Down
102 changes: 100 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Install PNPM
run: |
corepack enable
corepack prepare pnpm@7.32.4 --activate
corepack prepare pnpm@9.14.2 --activate
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
- name: Setup Deno
uses: denoland/setup-deno@v1
Expand Down Expand Up @@ -117,7 +117,105 @@ jobs:
path: |
/home/runner/.npm/_logs/**/*
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
continue-on-error: true
with:
flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }}
token: ${{ secrets.CODECOV_TOKEN }}
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
# Specific tests for known test that failed on windows using node 23.
# Can be replaced with larger node 23 tests in the future.
integration-win-node-23:
name: Integration test windows latest node23 specific
runs-on: windows-latest
timeout-minutes: 40
steps:
# Sets an output parameter if this is a release PR
- name: Check for release
id: release-check
# For windows we have to use $env:
run: |-
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT
echo "IS_RELEASE=true" >> $env:GITHUB_OUTPUT
if: "${{ startsWith(github.head_ref, 'release-') }}"
# This improves Windows network performance, we need this since we open many ports in our tests
- name: Increase Windows port limit and reduce time wait delay
run: |
netsh int ipv4 set dynamicport tcp start=1025 num=64511
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters /v TcpTimedWaitDelay /t REG_DWORD /d 30 /f
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '23.x'
cache: npm
check-latest: true
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
- name: Install PNPM
run: |
corepack enable
corepack prepare [email protected] --activate
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
- name: Setup Deno
uses: denoland/setup-deno@v1
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
with:
deno-version: v1.44.4
- name: Install core dependencies
run: npm ci --no-audit
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
- name: Generate self-signed certificates
run: npm run certs
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
shell: bash
- name: Prepare tests
run: npm run test:init
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
- name: Tests
uses: nick-fields/retry@v3
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
command: npm exec vitest -- run tests/integration/commands/dev/dev.test.ts
env:
# GitHub secrets are not available when running on PR from forks
# We set a flag so we can skip tests that access Netlify API
NETLIFY_TEST_DISABLE_LIVE:
${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_TEST_GITHUB_TOKEN is used to avoid reaching GitHub API limits in exec-fetcher.js
NETLIFY_TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Changes the polling interval used by the file watcher
CHOKIDAR_INTERVAL: 20
CHOKIDAR_USEPOLLING: 1
- name: Get test coverage flags
id: test-coverage-flags
# For windows we have to use $env:
run: |-
os=windows-latest
node=$(node --version)
echo "os=${os/-latest/}" >> $GITHUB_OUTPUT
echo "os=${os/-latest/}" >> $env:GITHUB_OUTPUT
echo "node=node_${node/.*.*/}" >> $GITHUB_OUTPUT
echo "node=node_${node/.*.*/}" >> $env:GITHUB_OUTPUT
shell: bash
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'

- name: Store npm error artefacts
uses: actions/upload-artifact@v4
if: always()
with:
name: npm-logs--windows-latest--23x
path: |
/home/runner/.npm/_logs/**/*
- uses: codecov/codecov-action@v5
continue-on-error: true
with:
flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }}
Expand Down
6 changes: 4 additions & 2 deletions bin/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { argv } from 'process'

import updateNotifier from 'update-notifier'

import { createMainCommand } from '../dist/commands/index.js'
import { runProgram } from '../dist/utils/run-program.js'
import { error } from '../dist/utils/command-helpers.js'
import getPackageJson from '../dist/utils/get-package-json.js'
import { createMainCommand } from '../dist/commands/main.js'

// 12 hours
const UPDATE_CHECK_INTERVAL = 432e5
Expand All @@ -24,7 +25,8 @@ try {
const program = createMainCommand()

try {
await program.parseAsync(argv)
await runProgram(program, argv)

program.onEnd()
} catch (error_) {
program.onEnd(error_)
Expand Down
2 changes: 2 additions & 0 deletions docs/commands/blobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ netlify blobs:delete
**Flags**

- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
- `force` (*boolean*) - Bypasses prompts & Force the command to run.
- `debug` (*boolean*) - Print debugging information

---
Expand Down Expand Up @@ -124,6 +125,7 @@ netlify blobs:set
**Flags**

- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
- `force` (*boolean*) - Bypasses prompts & Force the command to run.
- `input` (*string*) - Defines the filesystem path where the blob data should be read from
- `debug` (*boolean*) - Print debugging information

Expand Down
3 changes: 3 additions & 0 deletions docs/commands/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ netlify env:clone
**Flags**

- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
- `force` (*boolean*) - Bypasses prompts & Force the command to run.
- `from` (*string*) - Site ID (From)
- `to` (*string*) - Site ID (To)
- `debug` (*boolean*) - Print debugging information
Expand Down Expand Up @@ -167,6 +168,7 @@ netlify env:set

- `context` (*string*) - Specify a deploy context or branch (contexts: "production", "deploy-preview", "branch-deploy", "dev") (default: all contexts)
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
- `force` (*boolean*) - Bypasses prompts & Force the command to run.
- `scope` (*builds | functions | post-processing | runtime*) - Specify a scope (default: all scopes)
- `secret` (*boolean*) - Indicate whether the environment variable value can be read again.
- `debug` (*boolean*) - Print debugging information
Expand Down Expand Up @@ -202,6 +204,7 @@ netlify env:unset

- `context` (*string*) - Specify a deploy context or branch (contexts: "production", "deploy-preview", "branch-deploy", "dev") (default: all contexts)
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
- `force` (*boolean*) - Bypasses prompts & Force the command to run.
- `debug` (*boolean*) - Print debugging information

**Examples**
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ netlify sites:delete
**Flags**

- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
- `force` (*boolean*) - delete without prompting (useful for CI)
- `force` (*boolean*) - Delete without prompting (useful for CI).
- `debug` (*boolean*) - Print debugging information

**Examples**
Expand Down
2 changes: 1 addition & 1 deletion functions-templates/javascript/sanity-create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"author": "Sanity.io",
"license": "MIT",
"dependencies": {
"@sanity/client": "^0.147.3"
"@sanity/client": "^6.0.0"
}
}
2 changes: 1 addition & 1 deletion functions-templates/javascript/sanity-groq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"author": "Sanity.io",
"license": "MIT",
"dependencies": {
"@sanity/client": "^0.147.3"
"@sanity/client": "^6.0.0"
}
}
2 changes: 1 addition & 1 deletion functions-templates/rust/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "0.1.0"
[dependencies]
aws_lambda_events = "0.15.0"
http = "0.2.9"
lambda_runtime = "0.11.0"
lambda_runtime = "0.13.0"
log = "0.4.17"
simple_logger = "1.16.0"
tokio = "1.27.0"
30 changes: 15 additions & 15 deletions functions-templates/typescript/hello-world/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion functions-templates/typescript/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"license": "MIT",
"dependencies": {
"@netlify/functions": "^2.8.2",
"@types/node": "^20.0.0",
"@types/node": "^22.0.0",
"typescript": "^4.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@netlify/functions": "^2.8.2",
"@types/node": "^20.0.0",
"@types/node": "^22.0.0",
"typescript": "^4.5.5"
}
}
Loading

0 comments on commit ef0ed31

Please sign in to comment.