Skip to content

Commit

Permalink
Merge branch 'master' into rf-region-eulr
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Jul 18, 2024
2 parents 7ea0942 + b2a7ccd commit d6ea87b
Show file tree
Hide file tree
Showing 331 changed files with 17,690 additions and 16,254 deletions.
2 changes: 1 addition & 1 deletion .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
".yarn/releases",
".tmp/",
"cache/",
"packages/*/api.md",
"packages/*/*.api.md",
"CHANGELOG*.md",
".yarnrc.yml",
],
Expand Down
4 changes: 2 additions & 2 deletions .github/action-scripts/generateTypedDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const branchName = "docs/update-typed-docs";
const reviewers = ["AlCalzone"];
const assignees = [];

const checkPaths = ["docs/", "packages/*/api.md"];
const checkPaths = ["docs/", "packages/*/*.api.md"];

/**
* @param {{github: Github, context: Context}} param
*/
async function main(param) {
const { github, context } = param;
const { github } = param;

// check if our local working copy has any changes in the docs directory
const isChanged = !!(await exec.exec(
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/prepare-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ inputs:
runs:
using: 'composite'
steps:
- name: Enable Corepack
shell: bash
run: corepack enable

- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
5 changes: 0 additions & 5 deletions .github/bot-scripts/ensureLogfileInDiscussion.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ Please consider uploading a logfile that captures your problem. As a reminder, h
}
}

const options = {
owner: context.repo.owner,
repo: context.repo.repo,
};

// TODO: Consider if we want to delete outdated comments. That may delete replies as well though.
if (hasZjsLog || !message) return;

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows-disabled/approve-workflow-runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Enable Corepack
shell: bash
run: corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

94 changes: 94 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master", "release-*" ]
pull_request:
branches: [ "master", "release-*" ]
schedule:
- cron: '43 18 * * 5'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
queries: +security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.BOT_TOKEN }}
alert-lookup: true
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
with:
fetch-depth: 0

- name: Enable Corepack
shell: bash
run: corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nightly-config-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
with:
fetch-depth: 0 # Fetch the history, or this action won't work

- name: Enable Corepack
shell: bash
run: corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
49 changes: 3 additions & 46 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ jobs:
githubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Compile TypeScript code
run: |
# yarn clean $TURBO_FLAGS
yarn build $TURBO_FLAGS
run: yarn build $TURBO_FLAGS

- name: Save Turbo Cache between jobs
uses: ./.github/actions/build-cache-upload
Expand Down Expand Up @@ -118,8 +116,6 @@ jobs:
# ===================

lint:
needs: [build]

runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -129,20 +125,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore Turbo Cache from previous jobs
uses: ./.github/actions/build-cache-download

- name: Prepare testing environment
uses: ./.github/actions/prepare-env
with:
node-version: ${{ matrix.node-version }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

# For linting to succeed, we need to build the eslint plugin first.
# Thanks to caching from the previous job, this should be almost a no-op
- name: Compile TypeScript code
run: yarn build $TURBO_FLAGS

- name: Run linters
run: yarn run lint $TURBO_FLAGS

Expand Down Expand Up @@ -179,8 +167,6 @@ jobs:
# ===================

lint-zwave:
needs: [build]

runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -190,9 +176,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore Turbo Cache from previous jobs
uses: ./.github/actions/build-cache-download

- name: Prepare testing environment
uses: ./.github/actions/prepare-env
with:
Expand All @@ -205,8 +188,6 @@ jobs:
# ===================
# Runs unit tests on all supported node versions and OSes
unit-tests:
needs: [build]

runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -217,20 +198,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore Turbo Cache from previous jobs
uses: ./.github/actions/build-cache-download

- name: Prepare testing environment
uses: ./.github/actions/prepare-env
with:
node-version: ${{ matrix.node-version }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

# For the partial tests to succeed, we need to build the packages first.
# Thanks to caching from the previous job, this should be almost a no-op
- name: Compile TypeScript code
run: yarn build $TURBO_FLAGS

# For pull requests, only run tests for changed files
- name: Run component tests (changes)
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -300,8 +273,6 @@ jobs:
github.ref == 'refs/heads/master' &&
github.event_name == 'push'
needs: [build]

runs-on: ubuntu-latest

strategy:
Expand All @@ -312,18 +283,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore Turbo Cache from previous jobs
uses: ./.github/actions/build-cache-download

- name: Prepare testing environment
uses: ./.github/actions/prepare-env
with:
node-version: ${{ matrix.node-version }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Compile TypeScript code
run: yarn build $TURBO_FLAGS

- name: Update CC table # (maybe)
uses: actions/github-script@v7
with:
Expand All @@ -343,8 +308,6 @@ jobs:
github.ref == 'refs/heads/master' &&
github.event_name == 'push'
needs: [build]

runs-on: ubuntu-latest

strategy:
Expand All @@ -355,18 +318,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore Turbo Cache from previous jobs
uses: ./.github/actions/build-cache-download

- name: Prepare testing environment
uses: ./.github/actions/prepare-env
with:
node-version: ${{ matrix.node-version }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Compile TypeScript code
run: yarn build $TURBO_FLAGS

- name: Update overview
uses: actions/github-script@v7
with:
Expand All @@ -386,7 +343,7 @@ jobs:
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
needs: [lint, lint-zwave, unit-tests, test-packages]
needs: [build, lint, lint-zwave, unit-tests, test-packages]

runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -431,7 +388,7 @@ jobs:
run: |
yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}"
yarn npm whoami
yarn workspaces foreach -vti --no-private npm publish --tolerate-republish $TAG
yarn workspaces foreach --all -vti --no-private npm publish --tolerate-republish $TAG
- name: Create Github Release
Expand Down
Loading

0 comments on commit d6ea87b

Please sign in to comment.