diff --git a/.clang-format b/.clang-format index a79f189fde97..a92906763f98 100644 --- a/.clang-format +++ b/.clang-format @@ -856,11 +856,11 @@ IncludeCategories: Priority: 3 # Built-in headers (e.g., ``) should always come at the end... - - Regex: '<[[:alnum:].]+>' + - Regex: "<[[:alnum:].]+>" Priority: 4 # All other headers (e.g., those resolved using relative paths) should come first... - - Regex: '.*' + - Regex: ".*" Priority: 1 #/ diff --git a/.codecov.yml b/.codecov.yml index 4e6d1c77d976..7942594a3450 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -28,7 +28,6 @@ codecov: # Default branch to show (if not set, inherited from repository settings): branch: develop - coverage: # Number of decimals to display in UI: precision: 4 @@ -93,7 +92,6 @@ coverage: # If CI fails, report an "error" commit status: if_ci_failed: error - # Comment settings: comment: layout: "header, diff, changes, sunburst, uncovered, tree" diff --git a/.commitlintrc.js b/.commitlintrc.js index 91609f5ad685..aceeca3bba72 100644 --- a/.commitlintrc.js +++ b/.commitlintrc.js @@ -1,27 +1,26 @@ /** -* @license Apache-2.0 -* -* Copyright (c) 2023 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * @license Apache-2.0 + * + * Copyright (c) 2023 The Stdlib Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ -'use strict'; +"use strict"; // MODULES // -var config = require( './etc/commitlint/.commitlintrc.js' ); // eslint-disable-line node/no-unpublished-require - +var config = require("./etc/commitlint/.commitlintrc.js"); // eslint-disable-line node/no-unpublished-require // EXPORTS // diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 1c329ea899c0..cbe66d099c5d 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -57,13 +57,9 @@ This folder includes configuration for developing the project in a local contain diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9ab8cc667fff..0a4bc8a5c757 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,9 +10,7 @@ "postCreateCommand": "./.devcontainer/post-create", "customizations": { "codespaces": { - "openFiles": [ - "README.md" - ] + "openFiles": ["README.md"] }, "vscode": { "settings": { diff --git a/.eslintrc.js b/.eslintrc.js index 0bfa6a817256..5dd4dae502b5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,27 +1,26 @@ /** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * @license Apache-2.0 + * + * Copyright (c) 2018 The Stdlib Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ -'use strict'; +"use strict"; // MODULES // -var eslint = require( './etc/eslint/.eslintrc.overrides.js' ); - +var eslint = require("./etc/eslint/.eslintrc.overrides.js"); // EXPORTS // diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 4ba43d0f0492..4f6debbe6d55 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -26,4 +26,3 @@ contact_links: - name: 👏 Support Us url: https://github.com/stdlib-js/stdlib/blob/develop/docs/support_the_project.md about: Want to help support the project? 😍 - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 855e454e3ebf..5495f235f59d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,7 +6,7 @@ Resolves #{{TODO: add issue number}}. This pull request: -- {{TODO: add description describing what this pull request does}} +- {{TODO: add description describing what this pull request does}} ## Related Issues @@ -14,7 +14,7 @@ This pull request: This pull request: -- resolves #{{TODO: add issue number}} +- resolves #{{TODO: add issue number}} ## Questions @@ -32,9 +32,9 @@ No. > Please ensure the following tasks are completed before submitting this pull request. -- [ ] Read, understood, and followed the [contributing guidelines][contributing]. +- [ ] Read, understood, and followed the [contributing guidelines][contributing]. -* * * +--- @stdlib-js/reviewers diff --git a/.github/codeql/codeql_config.yml b/.github/codeql/codeql_config.yml index a2c52c0c093e..6a3067e86a4e 100644 --- a/.github/codeql/codeql_config.yml +++ b/.github/codeql/codeql_config.yml @@ -20,18 +20,18 @@ name: codeql_configuration # Define paths for which code scanning should be performed: paths: - - 'lib' + - "lib" # Define paths for which code scanning should *not* be performed: paths-ignore: - - '**/_tools' - - '**/test/*.js' - - '**/test/**/*.js' - - '**/benchmark/*.js' - - '**/benchmark/**/*.js' - - '**/examples/*.js' - - '**/examples/**/*.js' - - '**/data' - - '**/scripts' - - '**/etc' - - '**/docs' + - "**/_tools" + - "**/test/*.js" + - "**/test/**/*.js" + - "**/benchmark/*.js" + - "**/benchmark/**/*.js" + - "**/examples/*.js" + - "**/examples/**/*.js" + - "**/data" + - "**/scripts" + - "**/etc" + - "**/docs" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9077f78ef69c..e00db1c18e18 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,32 +18,32 @@ version: 2 updates: -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: monthly - ignore: - - dependency-name: "distributhor/workflow-webhook" + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly + ignore: + - dependency-name: "distributhor/workflow-webhook" -- package-ecosystem: npm - directory: "/" - schedule: - interval: monthly - open-pull-requests-limit: 10 - allow: - - dependency-name: "*" - dependency-type: "production" - ignore: - - dependency-name: "remark*" - - dependency-name: "chai" - - dependency-name: "debug" - - dependency-name: "ajv" - - dependency-name: "d3-scale" - - dependency-name: "d3-shape" - - dependency-name: "d3-time-format" - - dependency-name: "d3-format" - - dependency-name: "readable-stream" - - dependency-name: "mkdirp" - - dependency-name: "semver" - - dependency-name: "glob" - - dependency-name: "node-gyp" + - package-ecosystem: npm + directory: "/" + schedule: + interval: monthly + open-pull-requests-limit: 10 + allow: + - dependency-name: "*" + dependency-type: "production" + ignore: + - dependency-name: "remark*" + - dependency-name: "chai" + - dependency-name: "debug" + - dependency-name: "ajv" + - dependency-name: "d3-scale" + - dependency-name: "d3-shape" + - dependency-name: "d3-time-format" + - dependency-name: "d3-format" + - dependency-name: "readable-stream" + - dependency-name: "mkdirp" + - dependency-name: "semver" + - dependency-name: "glob" + - dependency-name: "node-gyp" diff --git a/.github/labeler.yml b/.github/labeler.yml index 2994baf6234e..68c9a60e2f5a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -17,25 +17,25 @@ #/ BLAS: -- changed-files: - - any-glob-to-all-files: '**/blas/**/*' + - changed-files: + - any-glob-to-all-files: "**/blas/**/*" LAPACK: -- changed-files: - - any-glob-to-all-files: '**/lapack/**/*' + - changed-files: + - any-glob-to-all-files: "**/lapack/**/*" Math: -- changed-files: - - any-glob-to-all-files: '**/math/**/*' + - changed-files: + - any-glob-to-all-files: "**/math/**/*" REPL: -- changed-files: - - any-glob-to-all-files: '**/repl/**/*' + - changed-files: + - any-glob-to-all-files: "**/repl/**/*" Statistics: -- changed-files: - - any-glob-to-all-files: '**/stats/**/*' + - changed-files: + - any-glob-to-all-files: "**/stats/**/*" Tools: -- changed-files: - - any-glob-to-all-files: '**/_tools/**/*' + - changed-files: + - any-glob-to-all-files: "**/_tools/**/*" diff --git a/.github/workflows/autoclose.yml b/.github/workflows/autoclose.yml index 9ef595156cfe..d40930baf952 100644 --- a/.github/workflows/autoclose.yml +++ b/.github/workflows/autoclose.yml @@ -27,12 +27,10 @@ on: # Workflow jobs: jobs: - # Define a job which closes a pull request if a contributor failed to setup EditorConfig: editorconfig: - # Define job name: - name: 'Check for EditorConfig label' + name: "Check for EditorConfig label" # Only run this job if the pull request has a specific label: if: "${{ github.event.label.name == 'autoclose: EditorConfig' }}" @@ -47,9 +45,8 @@ jobs: # Define the sequence of job steps: steps: - # Close the pull request: - - name: 'Close pull request' + - name: "Close pull request" run: gh pr close "$NUMBER" --comment "$BODY" env: GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -66,9 +63,8 @@ jobs: # Define a job which closes a pull request if a contributor failed to follow contributing guidelines: contributor_guidelines: - # Define job name: - name: 'Check for contributor guidelines label' + name: "Check for contributor guidelines label" # Only run this job if the pull request has a specific label: if: "${{ github.event.label.name == 'autoclose: Contributor Guidelines' }}" @@ -83,9 +79,8 @@ jobs: # Define the sequence of job steps: steps: - # Close the pull request: - - name: 'Close pull request' + - name: "Close pull request" run: gh pr close "$NUMBER" --comment "$BODY" env: GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -102,9 +97,8 @@ jobs: # Define a job which closes a pull request if a contributor failed to follow project conventions: project_conventions: - # Define job name: - name: 'Check for project conventions label' + name: "Check for project conventions label" # Only run this job if the pull request has a specific label: if: "${{ github.event.label.name == 'autoclose: Project Conventions' }}" @@ -119,9 +113,8 @@ jobs: # Define the sequence of job steps: steps: - # Close the pull request: - - name: 'Close pull request' + - name: "Close pull request" run: gh pr close "$NUMBER" --comment "$BODY" env: GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -142,9 +135,8 @@ jobs: # Define a job which closes a pull request if a pull request is considered spam: spam: - # Define job name: - name: 'Check for spam label' + name: "Check for spam label" # Only run this job if the pull request has a specific label: if: "${{ github.event.label.name == 'autoclose: Spam' }}" @@ -159,9 +151,8 @@ jobs: # Define the sequence of job steps: steps: - # Close the pull request: - - name: 'Close pull request' + - name: "Close pull request" run: gh pr close "$NUMBER" --comment "$BODY" env: GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -173,7 +164,7 @@ jobs: Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. # Lock pull request conversation: - - name: 'Lock conversation' + - name: "Lock conversation" run: gh pr lock "$NUMBER" --reason spam env: GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -182,9 +173,8 @@ jobs: # Define a job which closes a pull request if a pull request is considered stale: stale: - # Define job name: - name: 'Check for stale label' + name: "Check for stale label" # Only run this job if the pull request has a specific label: if: "${{ github.event.label.name == 'autoclose: Stale' }}" @@ -201,7 +191,7 @@ jobs: # Define the sequence of job steps: steps: # Close the pull request: - - name: 'Close pull request' + - name: "Close pull request" run: gh pr close "$NUMBER" --comment "$BODY" env: GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} diff --git a/.github/workflows/check_contributing_guidelines_acceptance.yml b/.github/workflows/check_contributing_guidelines_acceptance.yml index bced3463ec75..d31baad17804 100644 --- a/.github/workflows/check_contributing_guidelines_acceptance.yml +++ b/.github/workflows/check_contributing_guidelines_acceptance.yml @@ -26,7 +26,7 @@ on: # Define the input parameters for the workflow: inputs: pull_request_number: - description: 'Pull request number' + description: "Pull request number" required: true type: number user: @@ -35,7 +35,7 @@ on: # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'stdlib-bot GitHub token to create pull request comments' + description: "stdlib-bot GitHub token to create pull request comments" required: true # Trigger on pull request events: @@ -55,12 +55,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for checking the contributing guidelines acceptance... check_acknowledgment: - # Define a display name: - name: 'Check Contributing Guidelines Acceptance' + name: "Check Contributing Guidelines Acceptance" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -71,7 +69,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -86,7 +84,7 @@ jobs: timeout-minutes: 10 # Check contributing guidelines acceptance: - - name: 'Check contributing guidelines acceptance' + - name: "Check contributing guidelines acceptance" env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} PR_NUMBER: ${{ github.event.pull_request.number || inputs.pull_request_number }} diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index 5f6a3e434863..990cd781b0f0 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -20,7 +20,7 @@ name: check_licenses # Workflow triggers: -on: [ pull_request ] +on: [pull_request] # Global permissions: permissions: @@ -29,20 +29,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for checking that pull requests do not introduce dependencies which fail license requirements... check_licenses: - # Define a display name: - name: 'Check licenses' + name: "Check licenses" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define environment variables: env: - BUILD_TASK: 'check_licenses' - GITHUB: 'true' + BUILD_TASK: "check_licenses" + GITHUB: "true" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/check_licenses.log" LOG_NUM_LINES: 5000 @@ -55,9 +53,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -72,22 +69,22 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 2 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -106,19 +103,19 @@ jobs: timeout-minutes: 2 # Perform install sequence (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 30 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" "${{ env.BUILD_TASK }}" "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -126,7 +123,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() diff --git a/.github/workflows/check_required_files.yml b/.github/workflows/check_required_files.yml index 8a1f96dd1317..659c8546bdf0 100644 --- a/.github/workflows/check_required_files.yml +++ b/.github/workflows/check_required_files.yml @@ -26,7 +26,7 @@ on: # Define the input parameters for the workflow: inputs: pull_request_number: - description: 'Pull request number' + description: "Pull request number" required: true type: number user: @@ -36,14 +36,14 @@ on: # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'stdlib-bot GitHub token to create pull request comments' + description: "stdlib-bot GitHub token to create pull request comments" required: true # Allow the workflow to be manually triggered: workflow_dispatch: inputs: pull_request_number: - description: 'Pull request number' + description: "Pull request number" required: true type: number user: @@ -57,21 +57,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for checking that pull requests contain the required files... check_required_files: - # Define a display name: - name: 'Check Required Files' + name: "Check Required Files" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Get list of added files: - - name: 'Get list of added files' + - name: "Get list of added files" id: added-files env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} @@ -91,7 +88,7 @@ jobs: echo "files=${files}" >> $GITHUB_OUTPUT # Check whether the pull request contains a new `README.md` file; if not, exit with a non-zero exit code: - - name: 'Exit if pull request does not contain a new README.md file' + - name: "Exit if pull request does not contain a new README.md file" run: | if [[ ! "${{ steps.added-files.outputs.files }}" =~ "README.md" ]]; then echo "Pull request does not contain a new README.md file." @@ -99,7 +96,7 @@ jobs: fi # Check whether the pull request contains files which are required to be present for all packages: - - name: 'Check whether the pull request contains files which are required to be present for all packages' + - name: "Check whether the pull request contains files which are required to be present for all packages" run: | # Define a list of required files: required_files=( @@ -195,7 +192,7 @@ jobs: timeout-minutes: 10 # Create a comment on the pull request informing the user whether the pull request is missing required files: - - name: 'Create a comment on the pull request informing the user whether the pull request is missing required files' + - name: "Create a comment on the pull request informing the user whether the pull request is missing required files" # Pin action to full length commit SHA uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 with: diff --git a/.github/workflows/cleanup_coverage.yml b/.github/workflows/cleanup_coverage.yml index 353087d0ac9b..a8675ff69794 100644 --- a/.github/workflows/cleanup_coverage.yml +++ b/.github/workflows/cleanup_coverage.yml @@ -21,7 +21,6 @@ name: cleanup_coverage # Workflow triggers: on: - # Trigger the workflow when a pull request is closed (e.g., merged or closed without merging): pull_request_target: types: @@ -29,19 +28,17 @@ on: # Workflow jobs: jobs: - # Define a job to perform coverage cleanup... cleanup: - # Define a display name: - name: 'Cleanup coverage' + name: "Cleanup coverage" # Define the type of virtual host machine: runs-on: ubuntu-latest steps: # Delete the 'pr-' branch from the 'stdlib-js/www-test-code-coverage' repository: - - name: 'Delete coverage branch for PR' + - name: "Delete coverage branch for PR" env: REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} PR_NUMBER: ${{ github.event.pull_request.number }} @@ -51,7 +48,7 @@ jobs: || echo "Branch pr-${PR_NUMBER} does not exist or could not be deleted." # Find and update the '## Coverage Report' comment in the PR - - name: 'Update coverage comment in PR' + - name: "Update coverage comment in PR" # Pin action to full length commit SHA uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 157003d59e88..436eba4feb44 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ on: # branches: [ "develop", "master" ] schedule: # Run the workflow once a week (Sunday at midnight): - - cron: '0 0 * * 0' + - cron: "0 0 * * 0" # Allow the workflow to be manually run: workflow_dispatch: @@ -38,12 +38,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for performing CodeQL analysis... analyze: - # Define a display name: - name: 'Analyze' + name: "Analyze" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -71,13 +69,11 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # CodeQL supports the following languages: # # [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] @@ -85,13 +81,12 @@ jobs: # Use only 'java-kotlin' to analyze code written in Java, Kotlin, or both. # # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript, or both. - language: [ 'javascript-typescript' ] + language: ["javascript-typescript"] # Define the sequence of job steps: steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -106,7 +101,7 @@ jobs: timeout-minutes: 10 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" sudo -E apt-get update -q @@ -119,15 +114,15 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -155,7 +150,7 @@ jobs: timeout-minutes: 2 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 @@ -166,7 +161,7 @@ jobs: # make install-node-addons # Initialize CodeQL tools for scanning: - - name: 'Initialize CodeQL' + - name: "Initialize CodeQL" # Pin action to full length commit SHA uses: github/codeql-action/init@382a50a0284c0de445104889a9d6003acb4b3c1d # v2.15.4 @@ -175,10 +170,10 @@ jobs: languages: ${{ matrix.language }} # Specify a path to a custom CodeQL configuration file: - config-file: './.github/codeql/codeql_config.yml' + config-file: "./.github/codeql/codeql_config.yml" # Perform CodeQL analysis: - - name: 'Perform CodeQL Analysis' + - name: "Perform CodeQL Analysis" # Pin action to full length commit SHA uses: github/codeql-action/analyze@382a50a0284c0de445104889a9d6003acb4b3c1d # v2.15.4 diff --git a/.github/workflows/create_address_commit_comment_issues.yml b/.github/workflows/create_address_commit_comment_issues.yml index 7ae675950fcc..c3ec68b8865c 100644 --- a/.github/workflows/create_address_commit_comment_issues.yml +++ b/.github/workflows/create_address_commit_comment_issues.yml @@ -23,7 +23,7 @@ name: create_address_commit_comment_issues on: # Run the workflow daily at midnight UTC: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for creating issues from commit comments... create_issues: - # Define a display name: - name: 'Create issues from commit comments' + name: "Create issues from commit comments" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -51,7 +49,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -66,7 +64,7 @@ jobs: timeout-minutes: 10 # Create issues from commit comments: - - name: 'Create issues from commit comments' + - name: "Create issues from commit comments" env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} run: | diff --git a/.github/workflows/deprecate_packages.yml b/.github/workflows/deprecate_packages.yml index 7a66319199cc..e184d1d7a463 100644 --- a/.github/workflows/deprecate_packages.yml +++ b/.github/workflows/deprecate_packages.yml @@ -25,10 +25,10 @@ on: workflow_dispatch: inputs: packages: - description: 'List of packages (space separated):' + description: "List of packages (space separated):" required: true message: - description: 'Custom deprecation message:' + description: "Custom deprecation message:" # Global permissions: permissions: @@ -37,7 +37,6 @@ permissions: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -46,12 +45,10 @@ concurrency: # Workflow jobs: jobs: - # Define a job for deprecating packages... deprecate: - # Define a display name: - name: 'Deprecate packages' + name: "Deprecate packages" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -59,7 +56,7 @@ jobs: # Define the sequence of job steps... steps: # Deprecate the specified packages on npm and the respective GitHub repositories: - - name: 'Deprecate packages' + - name: "Deprecate packages" env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} run: | diff --git a/.github/workflows/do_not_merge.yml b/.github/workflows/do_not_merge.yml index 9afe2a559e70..95a1e109c9f7 100644 --- a/.github/workflows/do_not_merge.yml +++ b/.github/workflows/do_not_merge.yml @@ -31,12 +31,10 @@ on: # Workflow jobs: jobs: - # Define a job which fails a pull request if the pull request has a "Do Not Merge" label: do_not_merge: - # Define job name: - name: 'Check for Do Not Merge label' + name: "Check for Do Not Merge label" # Only run this job if the pull request has a "Do Not Merge" label: if: ${{ contains(github.event.*.labels.*.name, 'Do Not Merge') }} @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps: steps: - # Fail the pull request: - - name: 'Prevent merge' + - name: "Prevent merge" run: | echo "Pull request is labeled as 'Do Not Merge'." echo "This workflow fails so that the pull request cannot be merged." diff --git a/.github/workflows/first_time_greeting.yml b/.github/workflows/first_time_greeting.yml index 1eb5acae18f8..b10ffdc6afb0 100644 --- a/.github/workflows/first_time_greeting.yml +++ b/.github/workflows/first_time_greeting.yml @@ -29,21 +29,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for commenting on first-time contributions... greeting: - # Define a display name: - name: 'Welcome new contributors' + name: "Welcome new contributors" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Greet first-time contributors: - - name: 'Greet first-time contributors' + - name: "Greet first-time contributors" # Pin action to full length commit SHA uses: actions/first-interaction@34f15e814fe48ac9312ccf29db4e74fa767cbab7 # v1.3.0 with: diff --git a/.github/workflows/generate_pr_commit_message.yml b/.github/workflows/generate_pr_commit_message.yml index 15ec17886ef8..3d399092f412 100644 --- a/.github/workflows/generate_pr_commit_message.yml +++ b/.github/workflows/generate_pr_commit_message.yml @@ -38,12 +38,10 @@ permissions: # Workflow jobs: jobs: - # Job to generate commit message draft: generate-commit-message: - # Define a display name: - name: 'Generate PR Commit Message Draft' + name: "Generate PR Commit Message Draft" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -58,7 +56,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -66,7 +64,7 @@ jobs: fetch-depth: 0 # Generate commit message: - - name: 'Generate commit message' + - name: "Generate commit message" id: commit_message run: | COMMIT_MESSAGE=$($GITHUB_WORKSPACE/.github/workflows/scripts/generate_pr_commit_message $PR_NUMBER) @@ -86,7 +84,7 @@ jobs: exit 0 # Post commit message as PR comment: - - name: 'Post commit message as PR comment' + - name: "Post commit message as PR comment" # Pin action to full length commit SHA uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 with: diff --git a/.github/workflows/git_note_amend_message.yml b/.github/workflows/git_note_amend_message.yml index 1732f13d28cb..3af2035c099f 100644 --- a/.github/workflows/git_note_amend_message.yml +++ b/.github/workflows/git_note_amend_message.yml @@ -26,11 +26,11 @@ on: # Define the input parameters for the workflow: inputs: commit_hash: - description: 'Commit hash to create note for' + description: "Commit hash to create note for" required: true type: string message: - description: 'New commit message' + description: "New commit message" required: true type: string @@ -39,34 +39,32 @@ on: # Define the input parameters for the workflow: inputs: commit_hash: - description: 'Commit hash to create note for' + description: "Commit hash to create note for" required: true type: string message: - description: 'New commit message' + description: "New commit message" required: true type: string # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'GitHub token for stdlib-bot' + description: "GitHub token for stdlib-bot" required: true STDLIB_BOT_GPG_PRIVATE_KEY: - description: 'GPG private key for stdlib-bot' + description: "GPG private key for stdlib-bot" required: true STDLIB_BOT_GPG_PASSPHRASE: - description: 'GPG passphrase for stdlib-bot' + description: "GPG passphrase for stdlib-bot" required: true # Workflow jobs: jobs: - # Define a job to create a Git note amending a commit message: create_git_note_amending_commit_message: - # Define job name: - name: 'Create Git Note Amending Commit Message' + name: "Create Git Note Amending Commit Message" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -74,7 +72,7 @@ jobs: # Define the sequence of job steps: steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -88,7 +86,7 @@ jobs: persist-credentials: false # Verify commit exists: - - name: 'Verify commit exists' + - name: "Verify commit exists" run: | if ! git rev-parse --quiet --verify ${{ inputs.commit_hash }}^{commit}; then echo "Error: Commit ${{ inputs.commit_hash }} not found" @@ -96,7 +94,7 @@ jobs: fi # Create Git note: - - name: 'Create Git note' + - name: "Create Git note" run: | # Create Git note file: cat > "docs/git-notes/${{ inputs.commit_hash }}.txt" << EOF @@ -113,12 +111,12 @@ jobs: cat "docs/git-notes/${{ inputs.commit_hash }}.txt" >> $GITHUB_STEP_SUMMARY # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -128,10 +126,10 @@ jobs: git_commit_gpgsign: true # Commit and push changes: - - name: 'Commit and push changes' + - name: "Commit and push changes" env: - REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} - USER_NAME: stdlib-bot + REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} + USER_NAME: stdlib-bot run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "${USER_NAME}" diff --git a/.github/workflows/git_note_filter_packages.yml b/.github/workflows/git_note_filter_packages.yml index 4a989fb181e4..d792bea968fd 100644 --- a/.github/workflows/git_note_filter_packages.yml +++ b/.github/workflows/git_note_filter_packages.yml @@ -26,11 +26,11 @@ on: # Define the input parameters for the workflow:a inputs: commit_hash: - description: 'Commit hash to create note for' + description: "Commit hash to create note for" required: true type: string excludes: - description: 'Comma-separated list of packages to exclude' + description: "Comma-separated list of packages to exclude" required: true type: string @@ -39,34 +39,32 @@ on: # Define the input parameters for the workflow: inputs: commit_hash: - description: 'Commit hash to create note for' + description: "Commit hash to create note for" required: true type: string excludes: - description: 'Comma-separated list of packages to exclude' + description: "Comma-separated list of packages to exclude" required: true type: string # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'GitHub token for stdlib-bot' + description: "GitHub token for stdlib-bot" required: true STDLIB_BOT_GPG_PRIVATE_KEY: - description: 'GPG private key for stdlib-bot' + description: "GPG private key for stdlib-bot" required: true STDLIB_BOT_GPG_PASSPHRASE: - description: 'GPG passphrase for stdlib-bot' + description: "GPG passphrase for stdlib-bot" required: true # Workflow jobs: jobs: - # Define a job to create a Git note amending a commit message: create_git_note_filtering_packages: - # Define job name: - name: 'Create Git Note Filtering Packages for Commit' + name: "Create Git Note Filtering Packages for Commit" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -74,7 +72,7 @@ jobs: # Define the sequence of job steps: steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -88,7 +86,7 @@ jobs: persist-credentials: false # Verify commit exists: - - name: 'Verify commit exists' + - name: "Verify commit exists" run: | if ! git rev-parse --quiet --verify ${{ inputs.commit_hash }}^{commit}; then echo "Error: Commit ${{ inputs.commit_hash }} not found" @@ -96,7 +94,7 @@ jobs: fi # Create Git note: - - name: 'Create Git note' + - name: "Create Git note" run: | # Start creating the note file: cat > "docs/git-notes/${{ inputs.commit_hash }}.txt" << 'EOF' @@ -122,12 +120,12 @@ jobs: cat "docs/git-notes/${{ inputs.commit_hash }}.txt" >> $GITHUB_STEP_SUMMARY # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -137,10 +135,10 @@ jobs: git_commit_gpgsign: true # Commit and push changes: - - name: 'Commit and push changes' + - name: "Commit and push changes" env: - REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} - USER_NAME: stdlib-bot + REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} + USER_NAME: stdlib-bot run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "${USER_NAME}" diff --git a/.github/workflows/good_first_issue.yml b/.github/workflows/good_first_issue.yml index f59488d7de8e..cb063a3e1e48 100644 --- a/.github/workflows/good_first_issue.yml +++ b/.github/workflows/good_first_issue.yml @@ -27,12 +27,10 @@ on: # Workflow jobs: jobs: - # Define a job which posts a comment to "good first issues": add_comment: - # Define job name: - name: 'Check for Good First Issue label' + name: "Check for Good First Issue label" # Only run this job if the pull request has a specific label: if: "${{ github.event.label.name == 'Good First Issue' }}" @@ -47,9 +45,8 @@ jobs: # Define the sequence of job steps: steps: - # Post a comment: - - name: 'Add comment' + - name: "Add comment" run: gh issue comment "$NUMBER" --body "$BODY" env: GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} diff --git a/.github/workflows/label_commands.yml b/.github/workflows/label_commands.yml index 4538336cc0e2..b9adc5fbe683 100644 --- a/.github/workflows/label_commands.yml +++ b/.github/workflows/label_commands.yml @@ -27,12 +27,10 @@ on: # Workflow jobs: jobs: - # Define a job for removing the label and adding in-progress label: manage_labels: - # Define a display name: - name: 'Manage labels' + name: "Manage labels" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -47,8 +45,7 @@ jobs: # Define the job's steps: steps: - - - name: 'Remove label' + - name: "Remove label" # Pin action to full length commit SHA uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: @@ -65,7 +62,7 @@ jobs: console.log( 'Error removing label: %s', error.message ); } - - name: 'Add in-progress label' + - name: "Add in-progress label" # Pin action to full length commit SHA uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: @@ -79,7 +76,7 @@ jobs: }) # Add initial reaction to comment with slash command: - - name: 'Add initial reaction' + - name: "Add initial reaction" run: | curl -X POST \ -H "Accept: application/vnd.github.v3+json" \ @@ -89,12 +86,11 @@ jobs: # Define a job for checking for required files: check_files: - # Define a display name: - name: 'Check for required files' + name: "Check for required files" # Ensure initial reaction job has completed before running this job: - needs: [ manage_labels ] + needs: [manage_labels] # Define the conditions under which the job should run: if: | @@ -110,12 +106,11 @@ jobs: # Define a job for updating copyright header years: update_copyright_years: - # Define a display name: - name: 'Update copyright header years' + name: "Update copyright header years" # Ensure initial reaction job has completed before running this job: - needs: [ manage_labels ] + needs: [manage_labels] # Define the conditions under which the job should run: if: | @@ -132,12 +127,11 @@ jobs: # Define a job for auto-fixing lint errors: fix_lint_errors: - # Define a display name: - name: 'Auto-fix lint errors' + name: "Auto-fix lint errors" # Ensure initial reaction job has completed before running this job: - needs: [ manage_labels ] + needs: [manage_labels] # Define the conditions under which the job should run: if: | @@ -154,12 +148,11 @@ jobs: # Define a job for merging develop branch: merge_develop: - # Define a display name: - name: 'Merge changes from develop branch into this PR' + name: "Merge changes from develop branch into this PR" # Ensure initial reaction job has completed before running this job: - needs: [ manage_labels ] + needs: [manage_labels] # Define the conditions under which the job should run: if: | @@ -176,12 +169,11 @@ jobs: # Define a job for rebasing on develop branch: rebase_develop: - # Define a display name: - name: 'Rebase this PR on top of develop branch' + name: "Rebase this PR on top of develop branch" # Ensure initial reaction job has completed before running this job: - needs: [ manage_labels ] + needs: [manage_labels] # Define the conditions under which the job should run: if: | @@ -198,15 +190,22 @@ jobs: # Define a job for removing the in-progress label: remove_progress_label: - # Define a display name: - name: 'Remove in-progress label' + name: "Remove in-progress label" # Define the type of virtual host machine: runs-on: ubuntu-latest # Ensure all previous jobs have completed before running this job: - needs: [ manage_labels, check_files, update_copyright_years, fix_lint_errors, merge_develop, rebase_develop ] + needs: + [ + manage_labels, + check_files, + update_copyright_years, + fix_lint_errors, + merge_develop, + rebase_develop, + ] # Define the conditions under which the job should run: if: | diff --git a/.github/workflows/label_good_first_prs.yml b/.github/workflows/label_good_first_prs.yml index 0f60ecd4f3f8..ad053a488092 100644 --- a/.github/workflows/label_good_first_prs.yml +++ b/.github/workflows/label_good_first_prs.yml @@ -31,10 +31,8 @@ on: # Workflow jobs: jobs: - # Define a job which automatically labels pull requests based on whether they reference good first issues labeler: - # Define job name: name: 'Label PRs for issues with label "Good First Issue" as "Good First PR"s' @@ -52,7 +50,7 @@ jobs: # Define the sequence of job steps: steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -68,7 +66,7 @@ jobs: # Check whether any of the referenced issues is a "Good First Issue": - name: 'Check whether any of the referenced issues is a "Good First Issue"' - id: 'check-pr' + id: "check-pr" env: PR_NUMBER: ${{ github.event.pull_request.number }} run: | diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 2626d24d9ecc..06b2317dff05 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -36,12 +36,10 @@ on: # Workflow jobs: jobs: - # Define a job which automatically labels pull requests based on the contents of the pull request: labeler: - # Define job name: - name: 'Labeler' + name: "Labeler" # Only run this job if the pull request did not have label `automated-pr`: if: contains(github.event.pull_request.labels.*.name, 'automated-pr') == false @@ -56,9 +54,8 @@ jobs: # Define the sequence of job steps: steps: - # Automatically label pull requests: - - name: 'Automatically label pull requests' + - name: "Automatically label pull requests" # Pin action to full length commit SHA uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: diff --git a/.github/workflows/lint_autofix.yml b/.github/workflows/lint_autofix.yml index d01dd0614dff..554e25d418bc 100644 --- a/.github/workflows/lint_autofix.yml +++ b/.github/workflows/lint_autofix.yml @@ -21,45 +21,41 @@ name: lint_autofix # Workflow triggers: on: - # Allow the workflow to be triggered by other workflows workflow_call: # Define the input parameters for the workflow: inputs: pull_request_number: - description: 'PR number' + description: "PR number" required: true type: number # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'GitHub token for stdlib-bot' + description: "GitHub token for stdlib-bot" required: true STDLIB_BOT_GPG_PRIVATE_KEY: - description: 'GPG private key for stdlib-bot' + description: "GPG private key for stdlib-bot" required: true STDLIB_BOT_GPG_PASSPHRASE: - description: 'GPG passphrase for stdlib-bot' + description: "GPG passphrase for stdlib-bot" required: true # Workflow jobs: jobs: - # Define a job for automatically fixing lint errors: autofix: - # Define a display name: - name: 'Fix lint errors' + name: "Fix lint errors" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Get PR details: - - name: 'Get PR details' + - name: "Get PR details" id: pr-details run: | pr_response=$(curl -s \ @@ -79,7 +75,7 @@ jobs: echo "repository=$pr_repo_full_name" >> $GITHUB_OUTPUT # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -93,30 +89,30 @@ jobs: token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} # File path to checkout to: - path: './' + path: "./" # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Get list of changed files: - - name: 'Get list of changed files' + - name: "Get list of changed files" id: changed-files run: | page=1 @@ -134,32 +130,32 @@ jobs: echo "files=${files}" >> $GITHUB_OUTPUT # Fix JavaScript lint errors: - - name: 'Fix JavaScript lint errors' + - name: "Fix JavaScript lint errors" id: fix-lint-errors run: | files="${{ steps.changed-files.outputs.files }}" FIX=1 . "$GITHUB_WORKSPACE/.github/workflows/scripts/lint_javascript_files" "$files" || true # Add missing trailing newlines: - - name: 'Add missing trailing newlines' + - name: "Add missing trailing newlines" id: add-trailing-newlines run: | files="${{ steps.changed-files.outputs.files }}" . "$GITHUB_WORKSPACE/.github/workflows/scripts/add_trailing_newlines" "$files" # Remove related packages from README.md files: - - name: 'Remove related packages from README.md files' + - name: "Remove related packages from README.md files" run: | files="${{ steps.changed-files.outputs.files }}" . "$GITHUB_WORKSPACE/.github/workflows/scripts/remove_related_packages" "$files" # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -169,12 +165,12 @@ jobs: git_commit_gpgsign: true # Commit and push changes: - - name: 'Commit and push changes' + - name: "Commit and push changes" env: - REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} - USER_NAME: stdlib-bot - BRANCH_NAME: ${{ steps.pr-details.outputs.branch }} - REPO_NAME: ${{ steps.pr-details.outputs.repository }} + REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} + USER_NAME: stdlib-bot + BRANCH_NAME: ${{ steps.pr-details.outputs.branch }} + REPO_NAME: ${{ steps.pr-details.outputs.repository }} run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "$USER_NAME" diff --git a/.github/workflows/lint_changed_files.yml b/.github/workflows/lint_changed_files.yml index 380805af49cb..f0090c1749fc 100644 --- a/.github/workflows/lint_changed_files.yml +++ b/.github/workflows/lint_changed_files.yml @@ -37,12 +37,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for linting committed code... lint: - # Define a display name: - name: 'Lint Changed Files' + name: "Lint Changed Files" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -50,7 +48,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -65,15 +63,15 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Cache dependencies: - - name: 'Cache dependencies' + - name: "Cache dependencies" # Pin action to full length commit SHA uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 id: cache @@ -85,20 +83,20 @@ jobs: ${{ runner.os }}-node- # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" if: steps.cache.outputs.cache-hit != 'true' run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Get list of changed files: - - name: 'Get list of changed files' + - name: "Get list of changed files" id: changed-files continue-on-error: true run: | @@ -118,7 +116,7 @@ jobs: echo "files=${files}" >> $GITHUB_OUTPUT # Lint file names: - - name: 'Lint file names' + - name: "Lint file names" run: | # Determine root directory: root=$(git rev-parse --show-toplevel) @@ -130,13 +128,13 @@ jobs: echo "${{ steps.changed-files.outputs.files }}" || "${lint_filenames}" # Lint files against EditorConfig: - - name: 'Lint against EditorConfig' + - name: "Lint against EditorConfig" if: success() || failure() run: | make lint-editorconfig-files EDITORCONFIG_FORMAT=github-actions FILES="${{ steps.changed-files.outputs.files }}" # Lint Markdown files: - - name: 'Lint Markdown files' + - name: "Lint Markdown files" if: success() || failure() run: | files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.md$' | tr '\n' ' ' | sed 's/ $//') @@ -145,7 +143,7 @@ jobs: fi # Lint shell script files: - - name: 'Lint shell script files' + - name: "Lint shell script files" if: success() || failure() run: | files=$(echo "${{ steps.random-files.outputs.files }}" | tr ' ' '\n' | grep -vE '\.(js|md|json|ts|c|h)$' | while read -r file; do head -n1 "$file" | grep -q '^\#\!/usr/bin/env bash' && echo "$file"; done | tr '\n' ' ' | sed 's/ $//') @@ -158,13 +156,13 @@ jobs: fi # Lint package.json files: - - name: 'Lint package.json files' + - name: "Lint package.json files" if: success() || failure() run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/lint_package_json_files" "${{ steps.changed-files.outputs.files }}" # Lint REPL help files... - - name: 'Lint REPL help files' + - name: "Lint REPL help files" if: success() || failure() run: | # Determine root directory: @@ -179,7 +177,7 @@ jobs: fi # Lint JavaScript files: - - name: 'Lint JavaScript files' + - name: "Lint JavaScript files" if: success() || failure() run: | # Determine root directory: @@ -234,7 +232,7 @@ jobs: fi # Lint Python files: - - name: 'Lint Python files' + - name: "Lint Python files" if: success() || failure() run: | files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.py$' | tr '\n' ' ' | sed 's/ $//') @@ -247,7 +245,7 @@ jobs: fi # Check for R files: - - name: 'Check for R files' + - name: "Check for R files" if: success() || failure() id: check-r-files run: | @@ -261,15 +259,15 @@ jobs: fi # Setup R: - - name: 'Setup R' + - name: "Setup R" if: ( success() || failure() ) && steps.check-r-files.outputs.files != '' # Pin action to full length commit SHA uses: r-lib/actions/setup-r@473c68190595b311a74f208fba61a8d8c0d4c247 # v2.11.1 with: - r-version: '3.5.3' + r-version: "3.5.3" # Lint R files: - - name: 'Lint R files' + - name: "Lint R files" if: ( success() || failure() ) && steps.check-r-files.outputs.files != '' run: | # Install R dependencies: @@ -279,7 +277,7 @@ jobs: make lint-r-files FILES="${{ steps.check-r-files.outputs.files }}" # Lint C files: - - name: 'Lint C files' + - name: "Lint C files" if: success() || failure() run: | # Determine root directory: @@ -325,7 +323,7 @@ jobs: fi # Lint TypeScript declarations files: - - name: 'Lint TypeScript declarations files' + - name: "Lint TypeScript declarations files" if: success() || failure() run: | files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.d\.ts$' | tr '\n' ' ' | sed 's/ $//') @@ -334,7 +332,7 @@ jobs: fi # Lint license headers: - - name: 'Lint license headers' + - name: "Lint license headers" if: success() || failure() run: | files=$(echo "${{ steps.changed-files.outputs.files }}") diff --git a/.github/workflows/lint_copyright_years.yml b/.github/workflows/lint_copyright_years.yml index e1c361c50b3c..91407f9bd010 100644 --- a/.github/workflows/lint_copyright_years.yml +++ b/.github/workflows/lint_copyright_years.yml @@ -17,7 +17,7 @@ #/ # Workflow name: -name: 'lint_copyright_years' +name: "lint_copyright_years" # Workflow triggers: on: @@ -33,12 +33,12 @@ permissions: jobs: # Define a job for linting copyright years in newly added files: lint: - name: 'Lint Copyright Years' + name: "Lint Copyright Years" runs-on: ubuntu-latest steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -53,7 +53,7 @@ jobs: timeout-minutes: 10 # Get list of newly added files: - - name: 'Get list of newly added files' + - name: "Get list of newly added files" id: added-files run: | page=1 @@ -74,7 +74,7 @@ jobs: echo "files=${files}" >> $GITHUB_OUTPUT # Check copyright years in newly added files: - - name: 'Check copyright years' + - name: "Check copyright years" run: | current_year=$(date +"%Y") files="${{ steps.added-files.outputs.files }}" diff --git a/.github/workflows/lint_pr_title.yml b/.github/workflows/lint_pr_title.yml index 7ff1f7b2702d..30103e57bd86 100644 --- a/.github/workflows/lint_pr_title.yml +++ b/.github/workflows/lint_pr_title.yml @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for linting PR titles... lint_pr_title: - # Define a display name: - name: 'Lint PR title' + name: "Lint PR title" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -53,9 +51,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,21 +67,21 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Perform install sequence (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 30 # Perform linting: - - name: 'Perform linting' + - name: "Perform linting" env: PR_TITLE: ${{ github.event.pull_request.title }} run: | diff --git a/.github/workflows/lint_random_files.yml b/.github/workflows/lint_random_files.yml index b4dff058e24b..b908c966b0a6 100644 --- a/.github/workflows/lint_random_files.yml +++ b/.github/workflows/lint_random_files.yml @@ -26,47 +26,47 @@ on: inputs: num: type: string - description: 'Maximum number of files to lint:' - default: '100' + description: "Maximum number of files to lint:" + default: "100" pattern: - description: 'Regular expression for files to include:' + description: "Regular expression for files to include:" default: .* javascript: type: boolean - description: 'Lint JavaScript and TypeScript' + description: "Lint JavaScript and TypeScript" default: true markdown: type: boolean - description: 'Lint Markdown' + description: "Lint Markdown" default: true json: type: boolean - description: 'Lint JSON' + description: "Lint JSON" default: true repl: type: boolean - description: 'Lint REPL documentation and shell script files' + description: "Lint REPL documentation and shell script files" default: true r: type: boolean - description: 'Lint R' + description: "Lint R" default: true c: type: boolean - description: 'Lint C' + description: "Lint C" default: true python: type: boolean - description: 'Lint Python' + description: "Lint Python" default: true fix: type: boolean - description: 'Fix lint errors and submit a PR (if possible)' + description: "Fix lint errors and submit a PR (if possible)" default: false # Trigger the workflow every 24 hours: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" # Global permissions: permissions: @@ -75,12 +75,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for linting committed code... lint: - # Define a display name: - name: 'Lint Random Files' + name: "Lint Random Files" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -91,7 +89,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -106,27 +104,27 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Pick random files from the `lib/node_modules/@stdlib` directory: - - name: 'Pick random files from the `lib/node_modules/@stdlib` directory' + - name: "Pick random files from the `lib/node_modules/@stdlib` directory" id: random-files run: | name="" @@ -184,7 +182,7 @@ jobs: echo "files=$files" >> $GITHUB_OUTPUT # Lint file names: - - name: 'Lint file names' + - name: "Lint file names" run: | # Determine root directory: root=$(git rev-parse --show-toplevel) @@ -196,7 +194,7 @@ jobs: echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | "${lint_filenames}" # Lint files against EditorConfig: - - name: 'Lint against EditorConfig' + - name: "Lint against EditorConfig" id: lint-editorconfig run: | set -o pipefail @@ -204,7 +202,7 @@ jobs: make lint-editorconfig-files FILES="${files}" 2>&1 | tee lint_editorconfig_errors.txt # Create sub-issue for EditorConfig lint failures: - - name: 'Create sub-issue for EditorConfig lint failures' + - name: "Create sub-issue for EditorConfig lint failures" if: failure() && contains(steps.lint-editorconfig.outcome, 'failure') env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -241,7 +239,7 @@ jobs: rm "$BODY_FILE" # Lint Markdown files: - - name: 'Lint Markdown files' + - name: "Lint Markdown files" if: ( github.event.inputs.markdown != 'false' ) && ( success() || failure() ) run: | files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep -E '\.md$' | tr '\n' ' ') @@ -250,7 +248,7 @@ jobs: fi # Lint package.json files: - - name: 'Lint package.json files' + - name: "Lint package.json files" if: ( github.event.inputs.json != 'false' ) && ( success() || failure() ) run: | # Determine root directory: @@ -265,7 +263,7 @@ jobs: fi # Lint REPL help files... - - name: 'Lint REPL help files' + - name: "Lint REPL help files" if: ( github.event.inputs.repl != 'false' ) && ( success() || failure() ) run: | # Determine root directory: @@ -280,7 +278,7 @@ jobs: fi # Lint shell script files: - - name: 'Lint shell script files' + - name: "Lint shell script files" if: ( github.event.inputs.repl != 'false' ) && ( success() || failure() ) run: | files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep -vE '\.(js|md|json|ts|c|h)$' | while read -r file; do head -n1 "$file" | grep -q '^\#\!/usr/bin/env bash' && echo "$file"; done | tr '\n' ' ') @@ -293,7 +291,7 @@ jobs: fi # Lint JavaScript files: - - name: 'Lint JavaScript files' + - name: "Lint JavaScript files" id: lint-javascript if: ( github.event.inputs.javascript != 'false' ) && ( success() || failure() ) run: | @@ -363,7 +361,7 @@ jobs: fi # Create sub-issue for JavaScript lint failures: - - name: 'Create sub-issue for JavaScript lint failures' + - name: "Create sub-issue for JavaScript lint failures" if: failure() && contains(steps.lint-javascript.outcome, 'failure') env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -395,7 +393,7 @@ jobs: rm "$BODY_FILE" # Lint Python files: - - name: 'Lint Python files' + - name: "Lint Python files" if: ( github.event.inputs.python != 'false' ) && ( success() || failure() ) run: | files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep -E '\.py$' | tr '\n' ' ') @@ -408,15 +406,15 @@ jobs: fi # Setup R: - - name: 'Setup R' + - name: "Setup R" if: ( github.event.inputs.r != 'false' ) && ( success() || failure() ) # Pin action to full length commit SHA uses: r-lib/actions/setup-r@473c68190595b311a74f208fba61a8d8c0d4c247 # v2.11.1 with: - r-version: '4.3.3' + r-version: "4.3.3" # Lint R files: - - name: 'Lint R files' + - name: "Lint R files" if: ( github.event.inputs.r != 'false' ) && ( success() || failure() ) run: | files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep -E '\.R$' | tr '\n' ' ') @@ -429,7 +427,7 @@ jobs: fi # Lint C files: - - name: 'Lint C files' + - name: "Lint C files" id: lint-c if: ( github.event.inputs.c != 'false' ) && ( success() || failure() ) run: | @@ -501,7 +499,7 @@ jobs: fi # Create sub-issue for C linting failures: - - name: 'Create sub-issue for C lint failures' + - name: "Create sub-issue for C lint failures" if: ( github.event.inputs.c != 'false' ) && failure() && contains(steps.*.outcome, 'failure') && contains(steps.lint-c.outcome, 'failure') env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -534,7 +532,7 @@ jobs: rm "$BODY_FILE" # Lint TypeScript declarations files: - - name: 'Lint TypeScript declarations files' + - name: "Lint TypeScript declarations files" if: ( github.event.inputs.javascript != 'false' ) && ( success() || failure() ) run: | files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep -E '\.d\.ts$' | tr '\n' ' ') @@ -543,7 +541,7 @@ jobs: fi # Lint license headers: - - name: 'Lint license headers' + - name: "Lint license headers" if: success() || failure() run: | files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' ' ') @@ -552,13 +550,13 @@ jobs: fi # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" if: ${{ github.event.inputs.fix == 'true' }} && ( success() || failure() ) run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" if: ${{ github.event.inputs.fix == 'true' }} && ( success() || failure() ) # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 @@ -569,26 +567,26 @@ jobs: git_commit_gpgsign: true # Create a pull request with the fixes (if applicable): - - name: 'Create pull request' + - name: "Create pull request" if: ${{ github.event.inputs.fix == 'true' }} && ( success() || failure() ) id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'style: fix lint errors' + title: "style: fix lint errors" add-paths: ${{ steps.random-files.outputs.files }} body: | This PR - fixes lint errors - commit-message: 'style: resolve lint errors' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "style: resolve lint errors" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | automated-pr team-reviewers: | reviewers - branch: 'fix-lint-errors' + branch: "fix-lint-errors" delete-branch: true diff --git a/.github/workflows/linux_benchmark.yml b/.github/workflows/linux_benchmark.yml index 1009e17d51e3..1ebb729829fc 100644 --- a/.github/workflows/linux_benchmark.yml +++ b/.github/workflows/linux_benchmark.yml @@ -32,7 +32,6 @@ on: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -46,10 +45,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for running benchmarks on Linux... benchmark: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -61,15 +58,15 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' - DISPLAY: ':99' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" + DISPLAY: ":99" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_INSTALL: "${{ github.workspace }}/tmp/var/log/install.log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -77,35 +74,33 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['benchmark'] + BUILD_TASK: ["benchmark"] # Define the list of Node.js versions on which to run this job: - NODE_VERSION: ['16', '14', '12'] + NODE_VERSION: ["16", "14", "12"] # Define the list of operating systems on which to run this job: - OS: ['ubuntu-latest'] + OS: ["ubuntu-latest"] # Define configuration options for each Node.js version: include: - - OS: 'ubuntu-latest' - PLATFORM: 'linux' + - OS: "ubuntu-latest" + PLATFORM: "linux" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0" # - NODE_VERSION: '10' # NPM_VERSION: '>2.7.0 <6.0.0' @@ -133,9 +128,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -150,7 +144,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_INSTALL }}" @@ -158,7 +152,7 @@ jobs: timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" sudo -E apt-get update -q @@ -171,14 +165,14 @@ jobs: timeout-minutes: 10 # Configure a virtual display server (needed for electron): - - name: 'Configure virtual display server' + - name: "Configure virtual display server" run: | sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 sudo /usr/bin/Xvfb "${{ env.DISPLAY }}" -screen 0 1280x768x24 > /dev/null 2>&1 & timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -186,7 +180,7 @@ jobs: timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -214,20 +208,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Perform install sequence: - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" install "${{ env.LOG_FILE_INSTALL }}" timeout-minutes: 30 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -235,13 +229,13 @@ jobs: timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -249,7 +243,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -266,12 +260,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: benchmark @@ -287,9 +280,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.benchmark.result}}' >> $GITHUB_ENV if [[ "${{ needs.benchmark.result }}" = "success" ]]; then @@ -307,7 +299,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/linux_examples.yml b/.github/workflows/linux_examples.yml index 43246c05129c..0ad7fe7bb5e8 100644 --- a/.github/workflows/linux_examples.yml +++ b/.github/workflows/linux_examples.yml @@ -32,7 +32,6 @@ on: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -46,10 +45,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for running examples on Linux... examples: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -61,15 +58,15 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' - DISPLAY: ':99' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" + DISPLAY: ":99" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_INSTALL: "${{ github.workspace }}/tmp/var/log/install.log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -77,35 +74,33 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['examples'] + BUILD_TASK: ["examples"] # Define the list of Node.js versions: - NODE_VERSION: ['16', '14', '12'] + NODE_VERSION: ["16", "14", "12"] # Define the list of operating systems: - OS: ['ubuntu-latest'] + OS: ["ubuntu-latest"] # Define configuration options for each Node.js version: include: - - OS: 'ubuntu-latest' - PLATFORM: 'linux' + - OS: "ubuntu-latest" + PLATFORM: "linux" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0" # - NODE_VERSION: '10' # NPM_VERSION: '>2.7.0 <7.0.0' @@ -133,9 +128,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -150,7 +144,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_INSTALL }}" @@ -158,7 +152,7 @@ jobs: timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" sudo -E apt-get update -q @@ -171,14 +165,14 @@ jobs: timeout-minutes: 10 # Configure a virtual display server (needed for electron): - - name: 'Configure virtual display server' + - name: "Configure virtual display server" run: | sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 sudo /usr/bin/Xvfb "${{ env.DISPLAY }}" -screen 0 1280x768x24 > /dev/null 2>&1 & timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -186,7 +180,7 @@ jobs: timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -214,20 +208,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Perform install sequence: - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" install "${{ env.LOG_FILE_INSTALL }}" timeout-minutes: 30 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -235,13 +229,13 @@ jobs: timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -249,7 +243,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -266,12 +260,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: examples @@ -287,9 +280,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.examples.result}}' >> $GITHUB_ENV if [[ "${{ needs.examples.result }}" = "success" ]]; then @@ -307,7 +299,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() @@ -319,4 +311,3 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.REPO_SLACK_WEBHOOK_URL }} timeout-minutes: 5 - diff --git a/.github/workflows/linux_test.yml b/.github/workflows/linux_test.yml index 2716dd136fff..4238937913e2 100644 --- a/.github/workflows/linux_test.yml +++ b/.github/workflows/linux_test.yml @@ -23,14 +23,13 @@ name: linux_test on: # Run nightly: schedule: - - cron: '0 9 * * *' + - cron: "0 9 * * *" # Allow the workflow to be manually run: workflow_dispatch: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -44,10 +43,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for running unit tests on Linux... test: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -59,15 +56,15 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' - DISPLAY: ':99' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" + DISPLAY: ":99" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_INSTALL: "${{ github.workspace }}/tmp/var/log/install.log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -75,36 +72,34 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['test'] + BUILD_TASK: ["test"] # Define the list of Node.js versions on which to run this job: # NODE_VERSION: ['16', '14', '12', '10', '8', '6', '4', '0.12', '0.10'] - NODE_VERSION: ['16', '14', '12'] + NODE_VERSION: ["16", "14", "12"] # Define the list of operating systems on which to run this job: - OS: ['ubuntu-latest'] + OS: ["ubuntu-latest"] # Define configuration options for each Node.js version: include: - - OS: 'ubuntu-latest' - PLATFORM: 'linux' + - OS: "ubuntu-latest" + PLATFORM: "linux" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0" # - NODE_VERSION: '10' # NPM_VERSION: '>2.7.0 <7.0.0' @@ -132,9 +127,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -149,7 +143,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_INSTALL }}" @@ -157,7 +151,7 @@ jobs: timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" sudo -E apt-get update -q @@ -170,14 +164,14 @@ jobs: timeout-minutes: 10 # Configure a virtual display server (needed for electron): - - name: 'Configure virtual display server' + - name: "Configure virtual display server" run: | sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 sudo /usr/bin/Xvfb "${{ env.DISPLAY }}" -screen 0 1280x768x24 > /dev/null 2>&1 & timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -185,7 +179,7 @@ jobs: timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -213,20 +207,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Perform install sequence: - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" install "${{ env.LOG_FILE_INSTALL }}" timeout-minutes: 30 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -234,13 +228,13 @@ jobs: timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -248,7 +242,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -265,12 +259,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: test @@ -286,9 +279,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.test.result}}' >> $GITHUB_ENV if [[ "${{ needs.test.result }}" = "success" ]]; then @@ -306,7 +298,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/linux_test_cov.yml b/.github/workflows/linux_test_cov.yml index 513d2d4b1012..1ca94cf586e9 100644 --- a/.github/workflows/linux_test_cov.yml +++ b/.github/workflows/linux_test_cov.yml @@ -32,7 +32,6 @@ on: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -46,10 +45,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for determining test coverage on Linux... test_cov: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -61,15 +58,15 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' - DISPLAY: ':99' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" + DISPLAY: ":99" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_INSTALL: "${{ github.workspace }}/tmp/var/log/install.log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -77,35 +74,33 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['test-coverage'] + BUILD_TASK: ["test-coverage"] # Define the list of Node.js versions on which to run this job: - NODE_VERSION: ['16', '14', '12'] + NODE_VERSION: ["16", "14", "12"] # Define the list of operating systems on which to run this job: - OS: ['ubuntu-latest'] + OS: ["ubuntu-latest"] # Define configuration options for each Node.js version: include: - - OS: 'ubuntu-latest' - PLATFORM: 'linux' + - OS: "ubuntu-latest" + PLATFORM: "linux" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0" # - NODE_VERSION: '10' # NPM_VERSION: '>2.7.0 <7.0.0' @@ -133,9 +128,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -150,7 +144,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_INSTALL }}" @@ -158,7 +152,7 @@ jobs: timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" sudo -E apt-get update -q @@ -171,14 +165,14 @@ jobs: timeout-minutes: 10 # Configure a virtual display server (needed for electron): - - name: 'Configure virtual display server' + - name: "Configure virtual display server" run: | sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 sudo /usr/bin/Xvfb "${{ env.DISPLAY }}" -screen 0 1280x768x24 > /dev/null 2>&1 & timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -186,7 +180,7 @@ jobs: timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -214,20 +208,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Perform install sequence: - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" install "${{ env.LOG_FILE_INSTALL }}" timeout-minutes: 30 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -235,13 +229,13 @@ jobs: timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -249,7 +243,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -266,12 +260,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: test_cov @@ -287,9 +280,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.test_cov.result}}' >> $GITHUB_ENV if [[ "${{ needs.test_cov.result }}" = "success" ]]; then @@ -307,7 +299,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() @@ -319,4 +311,3 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.REPO_SLACK_WEBHOOK_URL }} timeout-minutes: 5 - diff --git a/.github/workflows/linux_test_install.yml b/.github/workflows/linux_test_install.yml index 2b7937cbd58c..b346769402c2 100644 --- a/.github/workflows/linux_test_install.yml +++ b/.github/workflows/linux_test_install.yml @@ -23,14 +23,13 @@ name: linux_test_install on: # Run nightly: schedule: - - cron: '0 9 * * *' + - cron: "0 9 * * *" # Allow the workflow to be manually run: workflow_dispatch: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -44,10 +43,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for testing project installation on Linux... test_install: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }} - ${{ matrix.PACKAGE_MANAGER }}" @@ -59,15 +56,15 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' - DISPLAY: ':99' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" + DISPLAY: ":99" INSTALL_DIR: "${{ github.workspace }}/test-install" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -75,85 +72,83 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['test-install'] + BUILD_TASK: ["test-install"] # Define the list of Node.js versions on which to run this job: - NODE_VERSION: ['20', '18', '16'] # ['20', '18', '16', '14', '12', '10', '8', '6', '4', '0.12', '0.10'] + NODE_VERSION: ["20", "18", "16"] # ['20', '18', '16', '14', '12', '10', '8', '6', '4', '0.12', '0.10'] # Define the list of package managers to test: - PACKAGE_MANAGER: ['npm'] + PACKAGE_MANAGER: ["npm"] # Define the list of operating systems on which to run this job: - OS: ['ubuntu-latest'] + OS: ["ubuntu-latest"] # Define configuration options for each Node.js version: include: - - OS: 'ubuntu-latest' - PLATFORM: 'linux' + - OS: "ubuntu-latest" + PLATFORM: "linux" - - NODE_VERSION: '20' - NPM_VERSION: '>10.0.0' - PNPM_VERSION: '6' + - NODE_VERSION: "20" + NPM_VERSION: ">10.0.0" + PNPM_VERSION: "6" - - NODE_VERSION: '18' - NPM_VERSION: '>10.0.0' - PNPM_VERSION: '6' + - NODE_VERSION: "18" + NPM_VERSION: ">10.0.0" + PNPM_VERSION: "6" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0 <10.0.0' - PNPM_VERSION: '6' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0 <10.0.0" + PNPM_VERSION: "6" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0 <10.0.0' - PNPM_VERSION: '6' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0 <10.0.0" + PNPM_VERSION: "6" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0 <9.0.0' - PNPM_VERSION: '6' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0 <9.0.0" + PNPM_VERSION: "6" - - NODE_VERSION: '10' - NPM_VERSION: '>2.7.0 <7.0.0' - PNPM_VERSION: '5' + - NODE_VERSION: "10" + NPM_VERSION: ">2.7.0 <7.0.0" + PNPM_VERSION: "5" - - NODE_VERSION: '8' - NPM_VERSION: '>2.7.0 <6.0.0' - PNPM_VERSION: '3' + - NODE_VERSION: "8" + NPM_VERSION: ">2.7.0 <6.0.0" + PNPM_VERSION: "3" - - NODE_VERSION: '6' - NPM_VERSION: '>2.7.0 <6.0.0' - PNPM_VERSION: '2' + - NODE_VERSION: "6" + NPM_VERSION: ">2.7.0 <6.0.0" + PNPM_VERSION: "2" - - NODE_VERSION: '4' - NPM_VERSION: '>2.7.0 <6.0.0' - PNPM_VERSION: '1' + - NODE_VERSION: "4" + NPM_VERSION: ">2.7.0 <6.0.0" + PNPM_VERSION: "1" - - NODE_VERSION: '0.12' - NPM_VERSION: '>2.7.0 <4.0.0' + - NODE_VERSION: "0.12" + NPM_VERSION: ">2.7.0 <4.0.0" - - NODE_VERSION: '0.10' - NPM_VERSION: '>2.7.0 <4.0.0' + - NODE_VERSION: "0.10" + NPM_VERSION: ">2.7.0 <4.0.0" # Exclude certain matrix combinations: exclude: - - NODE_VERSION: '0.12' - PACKAGE_MANAGER: 'pnpm' + - NODE_VERSION: "0.12" + PACKAGE_MANAGER: "pnpm" - - NODE_VERSION: '0.12' - PACKAGE_MANAGER: 'yarn' + - NODE_VERSION: "0.12" + PACKAGE_MANAGER: "yarn" - - NODE_VERSION: '0.10' - PACKAGE_MANAGER: 'pnpm' + - NODE_VERSION: "0.10" + PACKAGE_MANAGER: "pnpm" - - NODE_VERSION: '0.10' - PACKAGE_MANAGER: 'yarn' + - NODE_VERSION: "0.10" + PACKAGE_MANAGER: "yarn" # Set defaults: defaults: @@ -163,9 +158,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -180,14 +174,14 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" sudo -E apt-get update -q @@ -200,14 +194,14 @@ jobs: timeout-minutes: 10 # Configure a virtual display server (needed for electron): - - name: 'Configure virtual display server' + - name: "Configure virtual display server" run: | sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 sudo /usr/bin/Xvfb "${{ env.DISPLAY }}" -screen 0 1280x768x24 > /dev/null 2>&1 & timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -215,7 +209,7 @@ jobs: timeout-minutes: 5 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" # Force Git to use HTTPS rather than SSH: run: | @@ -223,7 +217,7 @@ jobs: git config --global url."https://".insteadOf git:// # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -251,20 +245,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/test_install" "${{ matrix.PACKAGE_MANAGER }}" "${{ env.INSTALL_DIR }}" "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -272,7 +266,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -289,12 +283,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: test_install @@ -310,9 +303,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.test_install.result}}' >> $GITHUB_ENV if [[ "${{ needs.test_install.result }}" = "success" ]]; then @@ -330,7 +322,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/macos_benchmark.yml b/.github/workflows/macos_benchmark.yml index 13fd5b82386d..56b85de0d634 100644 --- a/.github/workflows/macos_benchmark.yml +++ b/.github/workflows/macos_benchmark.yml @@ -32,7 +32,6 @@ on: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -46,10 +45,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for running benchmarks on macOS... benchmark: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -61,14 +58,14 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_INSTALL: "${{ github.workspace }}/tmp/var/log/install.log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -76,35 +73,33 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['benchmark'] + BUILD_TASK: ["benchmark"] # Define the list of Node.js versions: - NODE_VERSION: ['16', '14', '12'] + NODE_VERSION: ["16", "14", "12"] # Define the list of operating systems: - OS: ['macOS-latest'] + OS: ["macOS-latest"] # Define configuration options for each Node.js version: include: - - OS: 'macOS-latest' - PLATFORM: 'macos' + - OS: "macOS-latest" + PLATFORM: "macos" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0" # - NODE_VERSION: '10' # NPM_VERSION: '>2.7.0 <7.0.0' @@ -132,9 +127,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -149,7 +143,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_INSTALL }}" @@ -157,14 +151,14 @@ jobs: timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | brew update brew reinstall gcc timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -172,7 +166,7 @@ jobs: timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -200,20 +194,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Perform install sequence: - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" install "${{ env.LOG_FILE_INSTALL }}" timeout-minutes: 30 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -221,13 +215,13 @@ jobs: timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -235,7 +229,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -252,12 +246,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: benchmark @@ -273,9 +266,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.benchmark.result}}' >> $GITHUB_ENV if [[ "${{ needs.benchmark.result }}" = "success" ]]; then @@ -293,7 +285,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/macos_test.yml b/.github/workflows/macos_test.yml index c4e8d898a33e..e3be03c2b7f7 100644 --- a/.github/workflows/macos_test.yml +++ b/.github/workflows/macos_test.yml @@ -23,14 +23,13 @@ name: macos_test on: # Run nightly: schedule: - - cron: '0 9 * * *' + - cron: "0 9 * * *" # Allow the workflow to be manually run: workflow_dispatch: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -44,10 +43,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for running unit tests on macOS... test: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -59,14 +56,14 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_INSTALL: "${{ github.workspace }}/tmp/var/log/install.log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -74,36 +71,34 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['test'] + BUILD_TASK: ["test"] # Define the list of Node.js versions: # NODE_VERSION: ['16', '14', '12', '10', '8', '6', '4', '0.12', '0.10'] - NODE_VERSION: ['16', '14', '12'] + NODE_VERSION: ["16", "14", "12"] # Define the list of operating systems: - OS: ['macOS-latest'] + OS: ["macOS-latest"] # Define configuration options for each Node.js version: include: - - OS: 'macOS-latest' - PLATFORM: 'macos' + - OS: "macOS-latest" + PLATFORM: "macos" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0" # - NODE_VERSION: '10' # NPM_VERSION: '>2.7.0 <7.0.0' @@ -131,9 +126,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -148,7 +142,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_INSTALL }}" @@ -156,14 +150,14 @@ jobs: timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | brew update brew reinstall gcc timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -171,7 +165,7 @@ jobs: timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -199,20 +193,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Perform install sequence: - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" install "${{ env.LOG_FILE_INSTALL }}" timeout-minutes: 30 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -220,13 +214,13 @@ jobs: timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -234,7 +228,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -251,12 +245,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: test @@ -272,9 +265,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.test.result}}' >> $GITHUB_ENV if [[ "${{ needs.test.result }}" = "success" ]]; then @@ -292,7 +284,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/macos_test_cov.yml b/.github/workflows/macos_test_cov.yml index 0104d22afafa..5726ddfa5188 100644 --- a/.github/workflows/macos_test_cov.yml +++ b/.github/workflows/macos_test_cov.yml @@ -32,7 +32,6 @@ on: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -46,10 +45,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for determining test coverage on macOS... test_cov: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -61,14 +58,14 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_INSTALL: "${{ github.workspace }}/tmp/var/log/install.log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" @@ -76,35 +73,33 @@ jobs: # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['test-coverage'] + BUILD_TASK: ["test-coverage"] # Define the list of Node.js versions: - NODE_VERSION: ['16', '14', '12'] + NODE_VERSION: ["16", "14", "12"] # Define the list of operating systems: - OS: ['macOS-latest'] + OS: ["macOS-latest"] # Define configuration options for each Node.js version: include: - - OS: 'macOS-latest' - PLATFORM: 'macos' + - OS: "macOS-latest" + PLATFORM: "macos" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0" # - NODE_VERSION: '10' # NPM_VERSION: '>2.7.0 <7.0.0' @@ -132,9 +127,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -149,7 +143,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_INSTALL }}" @@ -157,14 +151,14 @@ jobs: timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | brew update brew reinstall gcc timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -172,7 +166,7 @@ jobs: timeout-minutes: 5 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -200,20 +194,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Perform install sequence: - - name: 'Perform install sequence' + - name: "Perform install sequence" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" install "${{ env.LOG_FILE_INSTALL }}" timeout-minutes: 30 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -221,13 +215,13 @@ jobs: timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -235,7 +229,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -252,12 +246,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: test_cov @@ -273,9 +266,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.test_cov.result}}' >> $GITHUB_ENV if [[ "${{ needs.test_cov.result }}" = "success" ]]; then @@ -293,7 +285,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/macos_test_npm_install.yml b/.github/workflows/macos_test_npm_install.yml index 2fa732ae3fad..4a4b8ff45b2b 100644 --- a/.github/workflows/macos_test_npm_install.yml +++ b/.github/workflows/macos_test_npm_install.yml @@ -23,14 +23,13 @@ name: macos_test_npm_install on: # Run nightly: schedule: - - cron: '0 9 * * *' + - cron: "0 9 * * *" # Allow the workflow to be manually run: workflow_dispatch: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -44,10 +43,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for testing project installation on macOS... test_npm_install: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -59,73 +56,71 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" LOG_DIR: "${{ github.workspace }}/tmp/var/log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}/tmp/var/log/${{ matrix.BUILD_TASK }}.log" LOG_NUM_LINES: 5000 # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['test-npm-install'] + BUILD_TASK: ["test-npm-install"] # Define the list of Node.js versions: - NODE_VERSION: ['20', '18', '16'] + NODE_VERSION: ["20", "18", "16"] # Define the list of operating systems: - OS: ['macOS-latest'] + OS: ["macOS-latest"] # Define configuration options for each Node.js version: include: - - OS: 'macOS-latest' - PLATFORM: 'macos' + - OS: "macOS-latest" + PLATFORM: "macos" - - NODE_VERSION: '20' - NPM_VERSION: '>10.0.0' + - NODE_VERSION: "20" + NPM_VERSION: ">10.0.0" - - NODE_VERSION: '18' - NPM_VERSION: '>10.0.0' + - NODE_VERSION: "18" + NPM_VERSION: ">10.0.0" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0 <10.0.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0 <10.0.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0 <10.0.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0 <10.0.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0 <9.0.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0 <9.0.0" - - NODE_VERSION: '10' - NPM_VERSION: '>2.7.0 <7.0.0' + - NODE_VERSION: "10" + NPM_VERSION: ">2.7.0 <7.0.0" - - NODE_VERSION: '8' - NPM_VERSION: '>2.7.0 <6.0.0' + - NODE_VERSION: "8" + NPM_VERSION: ">2.7.0 <6.0.0" - - NODE_VERSION: '6' - NPM_VERSION: '>2.7.0 <6.0.0' + - NODE_VERSION: "6" + NPM_VERSION: ">2.7.0 <6.0.0" - - NODE_VERSION: '4' - NPM_VERSION: '>2.7.0 <6.0.0' + - NODE_VERSION: "4" + NPM_VERSION: ">2.7.0 <6.0.0" - - NODE_VERSION: '0.12' - NPM_VERSION: '>2.7.0 <4.0.0' + - NODE_VERSION: "0.12" + NPM_VERSION: ">2.7.0 <4.0.0" - - NODE_VERSION: '0.10' - NPM_VERSION: '>2.7.0 <4.0.0' + - NODE_VERSION: "0.10" + NPM_VERSION: ">2.7.0 <4.0.0" # Set defaults: defaults: @@ -135,9 +130,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -152,21 +146,21 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 2 # Install compilers: - - name: 'Install compilers' + - name: "Install compilers" run: | brew update brew reinstall gcc timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -174,7 +168,7 @@ jobs: timeout-minutes: 5 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" # Force Git to use HTTPS rather than SSH: run: | @@ -182,7 +176,7 @@ jobs: git config --global url."https://".insteadOf git:// # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | echo 'PATH:' echo $PATH @@ -210,20 +204,20 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | npm install -g npm@"${{ matrix.NPM_VERSION }}" npm --version timeout-minutes: 5 # Run the build task: - - name: 'Run build task' + - name: "Run build task" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -231,7 +225,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -248,12 +242,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: test_npm_install @@ -269,9 +262,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.test_npm_install.result}}' >> $GITHUB_ENV if [[ "${{ needs.test_npm_install.result }}" = "success" ]]; then @@ -289,7 +281,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index f6a6c9b8bbb3..c1f8459c692d 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -38,21 +38,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for running make commands... run-make: - # Define a display name: - name: 'Run make command' + name: "Run make command" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,27 +67,27 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Run the make command: - - name: 'Run make command' + - name: "Run make command" run: | ${{ github.event.inputs.env }} make ${{ github.event.inputs.command }} timeout-minutes: 5 diff --git a/.github/workflows/markdown_equations.yml b/.github/workflows/markdown_equations.yml index 9b119e9f1268..bdb94a52a872 100644 --- a/.github/workflows/markdown_equations.yml +++ b/.github/workflows/markdown_equations.yml @@ -23,7 +23,7 @@ name: markdown_equations on: schedule: # Run the workflow once a day at 2:00 AM UTC: - - cron: '0 2 * * *' + - cron: "0 2 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating equations in Markdown files... update: - # Define a display name: - name: 'Update equations' + name: "Update equations" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,34 +67,34 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "stdlib-bot" timeout-minutes: 5 # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -107,13 +104,13 @@ jobs: git_commit_gpgsign: true # Generate list of changed Markdown files: - - name: 'Find changed Markdown files' + - name: "Find changed Markdown files" run: | echo "files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -G '> $GITHUB_OUTPUT id: changed # Generate SVG equations: - - name: 'Generate SVG equations' + - name: "Generate SVG equations" id: svg-equations run: | make markdown-svg-equations-files FILES="${{ steps.changed.outputs.files }}" @@ -130,7 +127,7 @@ jobs: timeout-minutes: 15 # Update Markdown equation elements: - - name: 'Update equation elements' + - name: "Update equation elements" id: equation-elements run: | make markdown-img-equations-files FILES="${{ steps.changed.outputs.files }}" @@ -148,20 +145,20 @@ jobs: timeout-minutes: 15 # Create a pull request with the updated equations: - - name: 'Create pull request' + - name: "Create pull request" id: cpr if: steps.svg-equations.outputs.changed == 'true' || steps.equation-elements.outputs.changed == 'true' # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'docs: update Markdown equation elements' + title: "docs: update Markdown equation elements" body: | This PR - updates equation elements found in Markdown files - commit-message: 'docs: update Markdown equation elements' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "docs: update Markdown equation elements" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | @@ -173,7 +170,7 @@ jobs: delete-branch: true # Create Markdown summary of the pull request: - - name: 'Create summary' + - name: "Create summary" if: steps.svg-equations.outputs.changed == 'true' || steps.equation-elements.outputs.changed == 'true' run: | echo "# :tada: Pull Request created! :tada:" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/markdown_links.yml b/.github/workflows/markdown_links.yml index 2b3b1b097f8b..b0b9cb5fb13f 100644 --- a/.github/workflows/markdown_links.yml +++ b/.github/workflows/markdown_links.yml @@ -23,7 +23,7 @@ name: markdown_links on: schedule: # Run the workflow once a month on the 1st day of every month: - - cron: '0 0 1 * *' + - cron: "0 0 1 * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for detecting broken links in Markdown files... markdown_links: - # Define a display name: - name: 'Check links' + name: "Check links" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -62,9 +60,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -82,7 +79,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_FAILURES }}" @@ -90,7 +87,7 @@ jobs: timeout-minutes: 2 # Check for broken links: - - name: 'Check links' + - name: "Check links" uses: stdlib-js/check-markdown-link-definitions-action@main id: results with: @@ -98,27 +95,27 @@ jobs: timeout-minutes: 240 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Check whether links are included in `docs/links/database.json` and use the correct identifier: - - name: 'Check links against database' + - name: "Check links against database" run: | # Determine root directory: root=$(git rev-parse --show-toplevel) @@ -141,20 +138,20 @@ jobs: fi # Log the results: - - name: 'Log results' + - name: "Log results" run: | echo ${{ steps.results.outputs.failures }} >> "${{ env.LOG_FILE_FAILURES }}" echo ${{ steps.results.outputs.warnings }} >> "${{ env.LOG_FILE_WARNINGS }}" timeout-minutes: 2 # Fail the workflow if the status is not "success": - - name: 'Check status' + - name: "Check status" if: ${{ steps.results.outputs.status }} != 'success' run: | exit 1 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the list of failures..." @@ -162,7 +159,7 @@ jobs: timeout-minutes: 5 # Upload the log files: - - name: 'Upload log files' + - name: "Upload log files" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -181,12 +178,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: markdown_links @@ -202,9 +198,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.markdown_links.result}}' >> $GITHUB_ENV if [[ "${{ needs.markdown_links.result }}" = "success" ]]; then @@ -222,7 +217,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/markdown_pkg_urls.yml b/.github/workflows/markdown_pkg_urls.yml index b9064a5004c3..c00b1e064446 100644 --- a/.github/workflows/markdown_pkg_urls.yml +++ b/.github/workflows/markdown_pkg_urls.yml @@ -23,7 +23,7 @@ name: markdown_pkg_urls on: schedule: # Run the workflow once a day at 2:00 AM UTC: - - cron: '0 2 * * *' + - cron: "0 2 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating Markdown stdlib package URLs... markdown_pkg_urls: - # Define a display name: - name: 'Update Markdown stdlib package URLs' + name: "Update Markdown stdlib package URLs" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -56,9 +54,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -77,39 +74,39 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "stdlib-bot" timeout-minutes: 5 # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -119,7 +116,7 @@ jobs: git_commit_gpgsign: true # Update Markdown stdlib package URLs: - - name: 'Update Markdown stdlib package URLs' + - name: "Update Markdown stdlib package URLs" id: update-markdown-pkg-urls run: | make markdown-pkg-urls MARKDOWN_FILTER='.*/lib/node_modules/@stdlib/.*' @@ -136,20 +133,20 @@ jobs: timeout-minutes: 10 # Create a pull request with the changes: - - name: 'Create pull request' + - name: "Create pull request" id: cpr if: steps.update-markdown-pkg-urls.outputs.changed == 'true' # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'docs: update Markdown stdlib package URLs' + title: "docs: update Markdown stdlib package URLs" body: | This PR - updates Markdown files by resolving stdlib package identifiers to GitHub repository URLs. - commit-message: 'docs: update Markdown stdlib package URLs' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "docs: update Markdown stdlib package URLs" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | diff --git a/.github/workflows/markdown_related_packages.yml b/.github/workflows/markdown_related_packages.yml index 0e83b751a9c9..0982bc8884f4 100644 --- a/.github/workflows/markdown_related_packages.yml +++ b/.github/workflows/markdown_related_packages.yml @@ -26,12 +26,12 @@ on: inputs: num: type: string - description: 'Number of READMEs to process' - default: '250' + description: "Number of READMEs to process" + default: "250" schedule: # Run the workflow once a day at 2:00 AM UTC: - - cron: '0 2 * * *' + - cron: "0 2 * * *" # Global permissions: permissions: @@ -40,12 +40,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating the related packages section of READMEs: update: - # Define a display name: - name: 'Update related packages section of READMEs' + name: "Update related packages section of READMEs" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -56,7 +54,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -74,39 +72,39 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "stdlib-bot" timeout-minutes: 5 # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -116,7 +114,7 @@ jobs: git_commit_gpgsign: true # Pick random READMEs from the `lib/node_modules/@stdlib` directory: - - name: 'Pick random READMEs from the `lib/node_modules/@stdlib` directory' + - name: "Pick random READMEs from the `lib/node_modules/@stdlib` directory" id: random-readmes run: | command="find lib/node_modules/@stdlib -type f -name 'README.md' | @@ -128,7 +126,7 @@ jobs: echo "readmes=$readmes" >> $GITHUB_OUTPUT # Update READMEs: - - name: 'Update READMEs' + - name: "Update READMEs" id: update-related-packages run: | files=$(echo "${{ steps.random-readmes.outputs.readmes }}" | tr ',' ' ') @@ -147,20 +145,20 @@ jobs: timeout-minutes: 10 # Create a pull request with the changes: - - name: 'Create pull request' + - name: "Create pull request" id: cpr if: steps.update-related-packages.outputs.changed == 'true' # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'docs: update related packages sections' + title: "docs: update related packages sections" body: | This PR - updates the related packages section of READMEs to include links to related packages. - commit-message: 'docs: update related packages sections' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "docs: update related packages sections" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | diff --git a/.github/workflows/markdown_src_attributes.yml b/.github/workflows/markdown_src_attributes.yml index 133898b95c61..1483e138e60e 100644 --- a/.github/workflows/markdown_src_attributes.yml +++ b/.github/workflows/markdown_src_attributes.yml @@ -23,7 +23,7 @@ name: markdown_src_attributes on: schedule: # Run the workflow once a month on the 1st day of every month: - - cron: '0 0 1 * *' + - cron: "0 0 1 * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for detecting broken `src` in Markdown files... markdown_src_attributes: - # Define a display name: - name: 'Check `src` attribute URLs' + name: "Check `src` attribute URLs" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -59,9 +57,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -79,7 +76,7 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_FAILURES }}" @@ -87,7 +84,7 @@ jobs: timeout-minutes: 2 # Check for broken `src` attribute URLs: - - name: 'Check `src` attribute URLs' + - name: "Check `src` attribute URLs" # Pin action to full length commit SHA uses: stdlib-js/check-markdown-src-action@9d9c0883b8c06a04576a146e480ef7937c51cdbf # v2.0.1 id: results @@ -96,20 +93,20 @@ jobs: timeout-minutes: 120 # Log the results: - - name: 'Log results' + - name: "Log results" run: | echo ${{ steps.results.outputs.failures }} >> "${{ env.LOG_FILE_FAILURES }}" echo ${{ steps.results.outputs.warnings }} >> "${{ env.LOG_FILE_WARNINGS }}" timeout-minutes: 2 # Fail the workflow if the status is not "success": - - name: 'Check status' + - name: "Check status" if: ${{ steps.results.outputs.status }} != 'success' run: | exit 1 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the list of failures..." @@ -117,7 +114,7 @@ jobs: timeout-minutes: 5 # Upload the log files: - - name: 'Upload log files' + - name: "Upload log files" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -136,12 +133,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: markdown_src_attributes @@ -157,9 +153,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.markdown_src_attributes.result}}' >> $GITHUB_ENV if [[ "${{ needs.markdown_src_attributes.result }}" = "success" ]]; then @@ -177,7 +172,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/markdown_tocs.yml b/.github/workflows/markdown_tocs.yml index 951c5d52aa8f..c03b7e068e46 100644 --- a/.github/workflows/markdown_tocs.yml +++ b/.github/workflows/markdown_tocs.yml @@ -23,7 +23,7 @@ name: markdown_tocs on: schedule: # Run the workflow once a day at 2:00 AM UTC: - - cron: '0 2 * * *' + - cron: "0 2 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating namespace table of contents... update: - # Define a display name: - name: 'Update namespace ToCs' + name: "Update namespace ToCs" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,45 +67,45 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Generate list of namespace READMEs: - - name: 'Generate list of namespace READMEs' + - name: "Generate list of namespace READMEs" run: | echo "files=$( make list-pkgs-namespace-readmes | tr '\n' ' ' )" >> $GITHUB_OUTPUT id: namespace_files # Update namespace table of contents: - - name: 'Update tables of contents' + - name: "Update tables of contents" run: | make markdown-namespace-tocs-files FILES="${{ steps.namespace_files.outputs.files }}" make markdown-pkg-urls-files FILES="${{ steps.namespace_files.outputs.files }}" timeout-minutes: 60 # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -118,20 +115,20 @@ jobs: git_commit_gpgsign: true # Create a pull request with the updated tables of contents: - - name: 'Create pull request' + - name: "Create pull request" id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'docs: update namespace table of contents' + title: "docs: update namespace table of contents" body: | This PR - updates namespace table of contents - commit-message: 'docs: update namespace table of contents' + commit-message: "docs: update namespace table of contents" signoff: true - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | documentation @@ -142,7 +139,7 @@ jobs: delete-branch: true # Create Markdown summary of the pull request: - - name: 'Create summary' + - name: "Create summary" run: | echo "# :tada: Pull Request created! :tada:" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/namespace_declarations.yml b/.github/workflows/namespace_declarations.yml index 246c16bc5b09..21db733a6882 100644 --- a/.github/workflows/namespace_declarations.yml +++ b/.github/workflows/namespace_declarations.yml @@ -23,7 +23,7 @@ name: namespace_declarations on: schedule: # Run the workflow once a day at 2:00 AM UTC: - - cron: '0 2 * * *' + - cron: "0 2 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating namespace TypeScript declarations... update: - # Define a display name: - name: 'Update TypeScript Declarations' + name: "Update TypeScript Declarations" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,31 +67,31 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Update namespace Typescript declarations: - - name: 'Update declarations' + - name: "Update declarations" run: | make list-pkgs-namespaces | node lib/node_modules/@stdlib/_tools/scripts/create_namespace_types.js # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -104,12 +101,12 @@ jobs: git_commit_gpgsign: true # Create a pull request with the updated declarations: - - name: 'Create pull request' + - name: "Create pull request" id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'feat: update namespace TypeScript declarations' + title: "feat: update namespace TypeScript declarations" body: | This PR @@ -124,8 +121,8 @@ jobs: - [ ] Update the PR title to align with the change type (`feat`, `feat!`, or `docs`). - [ ] Approve the PR once you are confident about the classification and changes made. - commit-message: 'feat: update namespace TypeScript declarations' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "feat: update namespace TypeScript declarations" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | @@ -137,7 +134,7 @@ jobs: delete-branch: true # Create Markdown summary of the pull request: - - name: 'Create summary' + - name: "Create summary" run: | echo "# :tada: Pull Request created! :tada:" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/namespace_exports.yml b/.github/workflows/namespace_exports.yml index 80507a2b4b0f..7b966e6a208f 100644 --- a/.github/workflows/namespace_exports.yml +++ b/.github/workflows/namespace_exports.yml @@ -31,12 +31,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating namespace exports... update: - # Define a display name: - name: 'Update Namespace Exports' + name: "Update Namespace Exports" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -46,9 +44,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -66,27 +63,27 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Update namespace exports: - - name: 'Update namespace exports' + - name: "Update namespace exports" run: | # Determine root directory: root=$(git rev-parse --show-toplevel) @@ -110,12 +107,12 @@ jobs: make FILES="${namespaces}" FIX=1 FIX_TYPE="suggestion" lint-javascript-files # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -125,19 +122,19 @@ jobs: git_commit_gpgsign: true # Create a pull request with the updated namespace exports: - - name: 'Create pull request' + - name: "Create pull request" id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'feat: update namespace exports' + title: "feat: update namespace exports" body: | This PR - updates namespace exports - commit-message: 'feat: update namespace exports' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "feat: update namespace exports" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml index 7864aec56504..c20e9d521f0d 100644 --- a/.github/workflows/npm_downloads.yml +++ b/.github/workflows/npm_downloads.yml @@ -24,7 +24,7 @@ on: # Run this workflow weekly: schedule: # cron: ' ' - - cron: '0 8 * * 6' + - cron: "0 8 * * 6" # Allow the workflow to be manually run: workflow_dispatch: @@ -36,12 +36,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for retrieving npm download counts... npm_downloads: - # Define a display name: - name: 'Retrieve npm Download Counts' + name: "Retrieve npm Download Counts" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -52,13 +50,13 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -66,7 +64,7 @@ jobs: timeout-minutes: 5 # Resolve package name: - - name: 'Resolve package name' + - name: "Resolve package name" id: package_name run: | name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` @@ -74,7 +72,7 @@ jobs: timeout-minutes: 5 # Fetch download data: - - name: 'Fetch data' + - name: "Fetch data" id: download_data run: | url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" @@ -86,7 +84,7 @@ jobs: timeout-minutes: 5 # Upload the download data: - - name: 'Upload data' + - name: "Upload data" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: @@ -102,7 +100,7 @@ jobs: if: success() # Send data to events server: - - name: 'Post data' + - name: "Post data" # Pin action to full length commit SHA uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 env: diff --git a/.github/workflows/ossf_scorecard.yml b/.github/workflows/ossf_scorecard.yml index 5850535ff52d..909411763832 100644 --- a/.github/workflows/ossf_scorecard.yml +++ b/.github/workflows/ossf_scorecard.yml @@ -27,7 +27,7 @@ on: # To guarantee Maintained check is occasionally updated. See # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained schedule: - - cron: '24 9 * * 0' + - cron: "24 9 * * 0" # Allow the workflow to be manually run: workflow_dispatch: @@ -37,10 +37,8 @@ permissions: read-all # Workflow jobs: jobs: - # Define a job for running the scorecard analysis: analysis: - # Define a display name: name: Scorecard analysis @@ -60,7 +58,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 timeout-minutes: 10 diff --git a/.github/workflows/pr_merge_develop.yml b/.github/workflows/pr_merge_develop.yml index 16258674316d..ce4b8d762136 100644 --- a/.github/workflows/pr_merge_develop.yml +++ b/.github/workflows/pr_merge_develop.yml @@ -26,27 +26,27 @@ on: # Define the input parameters for the workflow: inputs: pull_request_number: - description: 'PR number' + description: "PR number" required: true type: number # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'GitHub token for stdlib-bot' + description: "GitHub token for stdlib-bot" required: true STDLIB_BOT_GPG_PRIVATE_KEY: - description: 'GPG private key for stdlib-bot' + description: "GPG private key for stdlib-bot" required: true STDLIB_BOT_GPG_PASSPHRASE: - description: 'GPG passphrase for stdlib-bot' + description: "GPG passphrase for stdlib-bot" required: true # Workflow jobs: jobs: merge: # Define a display name: - name: 'Merge Develop into PR Branch' + name: "Merge Develop into PR Branch" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -54,7 +54,7 @@ jobs: # Define the job's steps: steps: # Get PR details: - - name: 'Get PR details' + - name: "Get PR details" id: pr-details run: | pr_response=$(curl -s \ @@ -73,7 +73,7 @@ jobs: echo "repository=$pr_repo_full_name" >> $GITHUB_OUTPUT # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.pr-details.outputs.branch }} @@ -82,12 +82,12 @@ jobs: fetch-depth: 0 # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -97,7 +97,7 @@ jobs: git_commit_gpgsign: true # Merge the develop branch into the PR branch: - - name: 'Merge develop branch' + - name: "Merge develop branch" env: REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} USER_NAME: stdlib-bot diff --git a/.github/workflows/pr_rebase_develop.yml b/.github/workflows/pr_rebase_develop.yml index 053632d8755c..aaebd53398ef 100644 --- a/.github/workflows/pr_rebase_develop.yml +++ b/.github/workflows/pr_rebase_develop.yml @@ -21,33 +21,32 @@ name: pr_rebase_develop # Workflow triggers: on: - # Allow the workflow to be triggered by other workflows workflow_call: # Define the input parameters for the workflow: inputs: pull_request_number: - description: 'PR number' + description: "PR number" required: true type: number # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'GitHub token for stdlib-bot' + description: "GitHub token for stdlib-bot" required: true STDLIB_BOT_GPG_PRIVATE_KEY: - description: 'GPG private key for stdlib-bot' + description: "GPG private key for stdlib-bot" required: true STDLIB_BOT_GPG_PASSPHRASE: - description: 'GPG passphrase for stdlib-bot' + description: "GPG passphrase for stdlib-bot" required: true # Workflow jobs: jobs: rebase: # Define a display name: - name: 'Rebase PR Branch onto Develop' + name: "Rebase PR Branch onto Develop" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -55,7 +54,7 @@ jobs: # Define the job's steps: steps: # Get PR details: - - name: 'Get PR details' + - name: "Get PR details" id: pr-details run: | pr_response=$(curl -s \ @@ -74,7 +73,7 @@ jobs: echo "repository=$pr_repo_full_name" >> $GITHUB_OUTPUT # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.pr-details.outputs.branch }} @@ -83,12 +82,12 @@ jobs: fetch-depth: 0 # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -98,7 +97,7 @@ jobs: git_commit_gpgsign: true # Rebase on develop branch: - - name: 'Rebase on develop branch' + - name: "Rebase on develop branch" env: REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} USER_NAME: stdlib-bot diff --git a/.github/workflows/process_metadata.yml b/.github/workflows/process_metadata.yml index d7578e308742..249fb5e692c1 100644 --- a/.github/workflows/process_metadata.yml +++ b/.github/workflows/process_metadata.yml @@ -25,7 +25,7 @@ on: branches: - develop issue_comment: - types: [ created, edited ] + types: [created, edited] # Global permissions: permissions: @@ -34,12 +34,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for processing commit message and issue comment metadata... process: - # Define a display name: - name: 'Process Metadata' + name: "Process Metadata" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -47,13 +45,13 @@ jobs: # Define the sequence of job steps... steps: # Exit if the user does not have write access to the repository: - - name: 'Exit if user does not have write access' + - name: "Exit if user does not have write access" id: assert-write-access # Pin action to full length commit SHA uses: lannonbr/repo-permission-check-action@2bb8c89ba8bf115c4bfab344d6a6f442b24c9a1f # v2.0.2 with: - permission: 'write' + permission: "write" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -61,7 +59,7 @@ jobs: continue-on-error: true # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Only run this step if a user has write access: if: steps.assert-write-access.outcome == 'success' @@ -80,7 +78,7 @@ jobs: timeout-minutes: 10 # Extract commit message and issue comment metadata: - - name: 'Extract metadata' + - name: "Extract metadata" id: extract-metadata # Only run this step if a user has write access: @@ -90,7 +88,7 @@ jobs: uses: stdlib-js/metadata-action@3ccf68f24c51ae23470319e8e5619d539df8212b # v3.0.0 # Check the metadata for directives to send tweets: - - name: 'Send tweets' + - name: "Send tweets" # Only run this step if a user has write access: if: steps.assert-write-access.outcome == 'success' @@ -105,7 +103,7 @@ jobs: TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} # Check the metadata for directives to dispatch workflows: - - name: 'Check metadata for workflow dispatch directives' + - name: "Check metadata for workflow dispatch directives" id: check-workflow-dispatch # Only run this step if a user has write access: @@ -124,7 +122,7 @@ jobs: fi # Dispatch first found workflow (if applicable): - - name: 'Dispatch workflow with inputs' + - name: "Dispatch workflow with inputs" # Pin action to full length commit SHA uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 diff --git a/.github/workflows/random_examples.yml b/.github/workflows/random_examples.yml index c8eabd665a68..225cc02da9ad 100644 --- a/.github/workflows/random_examples.yml +++ b/.github/workflows/random_examples.yml @@ -23,7 +23,7 @@ name: random_examples on: # Trigger the workflow every 24 hours: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for running random examples... process: - # Define a display name: - name: 'Run random examples' + name: "Run random examples" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -51,7 +49,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -69,21 +67,21 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '18' # 'lts/*' + node-version: "18" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Run JavaScript examples: - - name: 'Run JavaScript examples' + - name: "Run JavaScript examples" run: | make examples-random-javascript RANDOM_SELECTION_SIZE=50 timeout-minutes: 60 diff --git a/.github/workflows/run_affected_benchmarks.yml b/.github/workflows/run_affected_benchmarks.yml index 52253d7a55c5..a22df87092d4 100644 --- a/.github/workflows/run_affected_benchmarks.yml +++ b/.github/workflows/run_affected_benchmarks.yml @@ -24,7 +24,7 @@ on: push: paths: # List paths for which changes should trigger this workflow: - - 'lib/**/benchmark/**' + - "lib/**/benchmark/**" pull_request: types: @@ -33,12 +33,12 @@ on: - reopened paths: # List paths for which changes should trigger this workflow: - - 'lib/**/benchmark/**' + - "lib/**/benchmark/**" workflow_dispatch: inputs: directories: - description: 'List of changed directories for which to run affected benchmarks (space-separated)' + description: "List of changed directories for which to run affected benchmarks (space-separated)" # Global permissions: permissions: @@ -47,12 +47,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for running changed benchmarks... process: - # Define a display name: - name: 'Run affected benchmarks' + name: "Run affected benchmarks" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -60,11 +58,10 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - # Specify whether to remove untracked files before checking out the repository: clean: true @@ -79,15 +76,15 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Cache dependencies: - - name: 'Cache dependencies' + - name: "Cache dependencies" # Pin action to full length commit SHA uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 id: cache @@ -99,20 +96,20 @@ jobs: ${{ runner.os }}-node- # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" if: steps.cache.outputs.cache-hit != 'true' run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Get list of changed directories from PR and push events: - - name: 'Get list of changed directories' + - name: "Get list of changed directories" if: github.event_name != 'workflow_dispatch' id: changed-directories continue-on-error: true @@ -133,7 +130,7 @@ jobs: echo "directories=${directories}" >> $GITHUB_OUTPUT # Get list of changed directories from workflow dispatch event: - - name: 'Get list of changed directories (from user input)' + - name: "Get list of changed directories (from user input)" if: github.event_name == 'workflow_dispatch' id: changed-directories-user-input run: | @@ -141,7 +138,7 @@ jobs: timeout-minutes: 5 # Run affected benchmarks: - - name: 'Run affected benchmarks' + - name: "Run affected benchmarks" run: | if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then directories="${{ steps.changed-directories-user-input.outputs.directories }}" diff --git a/.github/workflows/run_affected_examples.yml b/.github/workflows/run_affected_examples.yml index 93e20ae705d9..64f11fd2b39e 100644 --- a/.github/workflows/run_affected_examples.yml +++ b/.github/workflows/run_affected_examples.yml @@ -24,8 +24,8 @@ on: push: paths: # List paths for which changes should trigger this workflow: - - 'lib/**/examples/**' - - 'lib/**/README.md' + - "lib/**/examples/**" + - "lib/**/README.md" pull_request: types: @@ -34,8 +34,8 @@ on: - reopened paths: # List paths for which changes should trigger this workflow: - - 'lib/**/examples/**' - - 'lib/**/README.md' + - "lib/**/examples/**" + - "lib/**/README.md" # Global permissions: permissions: @@ -44,12 +44,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for running changed examples... process: - # Define a display name: - name: 'Run changed examples' + name: "Run changed examples" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -57,7 +55,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -75,15 +73,15 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Cache dependencies: - - name: 'Cache dependencies' + - name: "Cache dependencies" # Pin action to full length commit SHA uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 id: cache @@ -95,20 +93,20 @@ jobs: ${{ runner.os }}-node- # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" if: steps.cache.outputs.cache-hit != 'true' run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Get list of changed files: - - name: 'Get list of changed files' + - name: "Get list of changed files" id: changed-files continue-on-error: true run: | @@ -129,7 +127,7 @@ jobs: echo "files=${files}" >> $GITHUB_OUTPUT # Run JavaScript examples: - - name: 'Run JavaScript examples' + - name: "Run JavaScript examples" run: | files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.js$' | tr '\n' ' ' | sed 's/ $//') if [ -n "$files" ]; then @@ -138,7 +136,7 @@ jobs: timeout-minutes: 15 # Run C examples: - - name: 'Run C examples' + - name: "Run C examples" run: | files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.c$' | sed "s|^|${GITHUB_WORKSPACE}/|" | tr '\n' ' ' | sed 's/ $//') if [ -n "$files" ]; then @@ -147,7 +145,7 @@ jobs: timeout-minutes: 15 # Run examples in Markdown files: - - name: 'Run examples in Markdown files' + - name: "Run examples in Markdown files" run: | files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.md$' | tr '\n' ' ' | sed 's/ $//') if [ -n "$files" ]; then diff --git a/.github/workflows/run_affected_tests.yml b/.github/workflows/run_affected_tests.yml index b13f9a65e29b..dfdf38cbb152 100644 --- a/.github/workflows/run_affected_tests.yml +++ b/.github/workflows/run_affected_tests.yml @@ -24,23 +24,23 @@ on: push: paths: # List paths for which changes should trigger this workflow: - - 'lib/**/bin/**' - - 'lib/**/data/**' - - 'lib/**/etc/**' - - 'lib/**/include/**' - - 'lib/**/lib/**' - - 'lib/**/src/**' - - 'lib/**/test/**' + - "lib/**/bin/**" + - "lib/**/data/**" + - "lib/**/etc/**" + - "lib/**/include/**" + - "lib/**/lib/**" + - "lib/**/src/**" + - "lib/**/test/**" - - 'lib/**/*.gyp' - - 'lib/**/*.gypi' - - 'lib/**/manifest.json' + - "lib/**/*.gyp" + - "lib/**/*.gypi" + - "lib/**/manifest.json" - - 'package.json' + - "package.json" # List paths for which changes should *not* trigger this workflow: - - '!lib/**/_tools/**' - - '!lib/**/*.md' + - "!lib/**/_tools/**" + - "!lib/**/*.md" pull_request: types: @@ -49,28 +49,28 @@ on: - reopened paths: # List paths for which changes should trigger this workflow: - - 'lib/**/bin/**' - - 'lib/**/data/**' - - 'lib/**/etc/**' - - 'lib/**/include/**' - - 'lib/**/lib/**' - - 'lib/**/src/**' - - 'lib/**/test/**' + - "lib/**/bin/**" + - "lib/**/data/**" + - "lib/**/etc/**" + - "lib/**/include/**" + - "lib/**/lib/**" + - "lib/**/src/**" + - "lib/**/test/**" - - 'lib/**/*.gyp' - - 'lib/**/*.gypi' - - 'lib/**/manifest.json' + - "lib/**/*.gyp" + - "lib/**/*.gypi" + - "lib/**/manifest.json" - - 'package.json' + - "package.json" # List paths for which changes should *not* trigger this workflow: - - '!lib/**/_tools/**' - - '!lib/**/*.md' + - "!lib/**/_tools/**" + - "!lib/**/*.md" workflow_dispatch: inputs: directories: - description: 'List of changed directories for which to run affected tests (space separated):' + description: "List of changed directories for which to run affected tests (space separated):" # Global permissions: permissions: @@ -79,12 +79,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for running tests affected by changes to the repository... process: - # Define a display name: - name: 'Run affected tests' + name: "Run affected tests" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -92,7 +90,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -110,15 +108,15 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Cache dependencies: - - name: 'Cache dependencies' + - name: "Cache dependencies" # Pin action to full length commit SHA uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 id: cache @@ -130,20 +128,20 @@ jobs: ${{ runner.os }}-node- # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" if: steps.cache.outputs.cache-hit != 'true' run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Get list of changed directories from PR and push events: - - name: 'Get list of changed directories' + - name: "Get list of changed directories" if: github.event_name != 'workflow_dispatch' id: changed-directories continue-on-error: true @@ -164,7 +162,7 @@ jobs: echo "directories=${directories}" >> $GITHUB_OUTPUT # Get list of changed directories from workflow dispatch event: - - name: 'Get list of changed directories (from user input)' + - name: "Get list of changed directories (from user input)" if: github.event_name == 'workflow_dispatch' id: changed-directories-user-input run: | @@ -172,7 +170,7 @@ jobs: timeout-minutes: 5 # Run JavaScript tests: - - name: 'Run JavaScript tests' + - name: "Run JavaScript tests" run: | if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then directories="${{ steps.changed-directories-user-input.outputs.directories }}" diff --git a/.github/workflows/run_tests_coverage.yml b/.github/workflows/run_tests_coverage.yml index 7b67178c753f..28844831a34a 100644 --- a/.github/workflows/run_tests_coverage.yml +++ b/.github/workflows/run_tests_coverage.yml @@ -26,22 +26,22 @@ on: - develop paths: # List paths for which changes should trigger this workflow: - - 'lib/**/bin/**' - - 'lib/**/data/**' - - 'lib/**/etc/**' - - 'lib/**/include/**' - - 'lib/**/lib/**' - - 'lib/**/src/**' - - 'lib/**/test/**' + - "lib/**/bin/**" + - "lib/**/data/**" + - "lib/**/etc/**" + - "lib/**/include/**" + - "lib/**/lib/**" + - "lib/**/src/**" + - "lib/**/test/**" - - 'lib/**/*.gyp' - - 'lib/**/*.gypi' - - 'lib/**/manifest.json' + - "lib/**/*.gyp" + - "lib/**/*.gypi" + - "lib/**/manifest.json" - - 'package.json' + - "package.json" # List paths for which changes should *not* trigger this workflow: - - '!lib/**/_tools/**' + - "!lib/**/_tools/**" pull_request_target: types: @@ -50,27 +50,27 @@ on: - reopened paths: # List paths for which changes should trigger this workflow: - - 'lib/**/bin/**' - - 'lib/**/data/**' - - 'lib/**/etc/**' - - 'lib/**/include/**' - - 'lib/**/lib/**' - - 'lib/**/src/**' - - 'lib/**/test/**' + - "lib/**/bin/**" + - "lib/**/data/**" + - "lib/**/etc/**" + - "lib/**/include/**" + - "lib/**/lib/**" + - "lib/**/src/**" + - "lib/**/test/**" - - 'lib/**/*.gyp' - - 'lib/**/*.gypi' - - 'lib/**/manifest.json' + - "lib/**/*.gyp" + - "lib/**/*.gypi" + - "lib/**/manifest.json" - - 'package.json' + - "package.json" # List paths for which changes should *not* trigger this workflow: - - '!lib/**/_tools/**' + - "!lib/**/_tools/**" workflow_dispatch: inputs: directories: - description: 'List of changed directories for which to run tests (space separated):' + description: "List of changed directories for which to run tests (space separated):" # Global permissions: permissions: @@ -79,12 +79,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for calculating test coverage for changed files... coverage: - # Define a display name: - name: 'Calculate test coverage for packages' + name: "Calculate test coverage for packages" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -92,7 +90,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -113,7 +111,7 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: @@ -121,7 +119,7 @@ jobs: timeout-minutes: 5 # Cache dependencies: - - name: 'Cache dependencies' + - name: "Cache dependencies" # Pin action to full length commit SHA uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 id: cache @@ -133,20 +131,20 @@ jobs: ${{ runner.os }}-node- # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" if: steps.cache.outputs.cache-hit != 'true' run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Get list of changed directories from PR and push events: - - name: 'Get list of changed directories' + - name: "Get list of changed directories" if: github.event_name != 'workflow_dispatch' id: changed-directories continue-on-error: true @@ -178,7 +176,7 @@ jobs: echo "directories=${directories}" >> $GITHUB_OUTPUT # Get list of changed directories from workflow dispatch event: - - name: 'Get list of changed directories (from user input)' + - name: "Get list of changed directories (from user input)" if: github.event_name == 'workflow_dispatch' id: changed-directories-user-input run: | @@ -186,7 +184,7 @@ jobs: timeout-minutes: 5 # Exit early if non-package directories are changed: - - name: 'Exit early if non-package directories are changed' + - name: "Exit early if non-package directories are changed" id: check-changed if: github.event_name != 'workflow_dispatch' run: | @@ -202,7 +200,7 @@ jobs: echo "skip=${skip}" >> $GITHUB_OUTPUT # Run JavaScript tests: - - name: 'Run JavaScript tests' + - name: "Run JavaScript tests" id: extract-coverage if: steps.check-changed.outputs.skip == 'false' env: @@ -227,7 +225,7 @@ jobs: timeout-minutes: 30 # Create final coverage report: - - name: 'Create final coverage report' + - name: "Create final coverage report" id: create-report if: steps.check-changed.outputs.skip == 'false' run: | @@ -249,7 +247,7 @@ jobs: echo "report=$report" >> $GITHUB_OUTPUT # Post report as comment to PR: - - name: 'Post report as comment to PR' + - name: "Post report as comment to PR" if: github.event_name == 'pull_request_target' && steps.check-changed.outputs.skip == 'false' # Pin action to full length commit SHA uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 @@ -280,7 +278,7 @@ jobs: } # Post report as comment to commit: - - name: 'Post report as comment to commit' + - name: "Post report as comment to commit" if: github.event_name == 'push' && steps.check-changed.outputs.skip == 'false' # Pin action to full length commit SHA uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 @@ -295,16 +293,16 @@ jobs: }) # Checkout coverage repository: - - name: 'Checkout coverage repository' + - name: "Checkout coverage repository" if: steps.check-changed.outputs.skip == 'false' # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: # Code coverage repository: - repository: 'stdlib-js/www-test-code-coverage' + repository: "stdlib-js/www-test-code-coverage" # File path to checkout to: - path: './www-test-code-coverage' + path: "./www-test-code-coverage" # Specify whether to remove untracked files before checking out the repository: clean: false @@ -319,7 +317,7 @@ jobs: persist-credentials: false # Checkout coverage repository branch: - - name: 'Checkout coverage repository branch' + - name: "Checkout coverage repository branch" if: steps.check-changed.outputs.skip == 'false' run: | cd ./www-test-code-coverage @@ -336,7 +334,7 @@ jobs: fi # Copy artifacts to the repository: - - name: 'Copy artifacts to the repository' + - name: "Copy artifacts to the repository" if: steps.check-changed.outputs.skip == 'false' run: | if [ -d "./artifacts" ]; then @@ -358,7 +356,7 @@ jobs: fi # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" if: steps.check-changed.outputs.skip == 'false' # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 @@ -369,7 +367,7 @@ jobs: git_commit_gpgsign: true # Commit and push changes: - - name: 'Commit and push changes' + - name: "Commit and push changes" if: steps.check-changed.outputs.skip == 'false' env: REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} diff --git a/.github/workflows/slash_commands.yml b/.github/workflows/slash_commands.yml index 7fbac945941c..7b6cae692a85 100644 --- a/.github/workflows/slash_commands.yml +++ b/.github/workflows/slash_commands.yml @@ -28,12 +28,10 @@ on: # Workflow jobs: jobs: - # Define a job for adding an initial reaction: add_initial_reaction: - # Define a display name: - name: 'Add initial reaction' + name: "Add initial reaction" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -44,7 +42,7 @@ jobs: # Define the job's steps: steps: # Add "bot: In progress" label to the issue / PR: - - name: 'Add in-progress label' + - name: "Add in-progress label" # Pin action to full length commit SHA uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: @@ -58,7 +56,7 @@ jobs: }) # Add initial reaction to comment with slash command: - - name: 'Add initial reaction' + - name: "Add initial reaction" uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -89,12 +87,11 @@ jobs: # Define a job for checking for required files: check_files: - # Define a display name: - name: 'Check for required files' + name: "Check for required files" # Ensure initial reaction job has completed before running this job: - needs: [ add_initial_reaction ] + needs: [add_initial_reaction] # Define the conditions under which the job should run: if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/stdlib check-files') @@ -109,9 +106,8 @@ jobs: # Define a job for updating copyright header years: update_copyright_years: - # Define a display name: - name: 'Update copyright header years' + name: "Update copyright header years" # Define the conditions under which the job should run: if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/stdlib update-copyright-years') @@ -127,12 +123,11 @@ jobs: # Define a job for auto-fixing lint errors: fix_lint_errors: - # Define a display name: - name: 'Auto-fix lint errors' + name: "Auto-fix lint errors" # Ensure initial reaction job has completed before running this job: - needs: [ add_initial_reaction ] + needs: [add_initial_reaction] # Define the conditions under which the job should run: if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/stdlib lint-autofix') @@ -148,12 +143,11 @@ jobs: # Define a job for merging develop branch: merge_develop: - # Define a display name: - name: 'Merge changes from develop branch into this PR' + name: "Merge changes from develop branch into this PR" # Ensure initial reaction job has completed before running this job: - needs: [ add_initial_reaction ] + needs: [add_initial_reaction] # Define the conditions under which the job should run: if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/stdlib merge') @@ -169,12 +163,11 @@ jobs: # Define a job for rebasing on develop branch: rebase_develop: - # Define a display name: - name: 'Rebase this PR on top of develop branch' + name: "Rebase this PR on top of develop branch" # Ensure initial reaction job has completed before running this job: - needs: [ add_initial_reaction ] + needs: [add_initial_reaction] # Define the conditions under which the job should run: if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/stdlib rebase') @@ -190,15 +183,14 @@ jobs: # Define a job for printing a list of available slash commands: help: - # Define a display name: - name: 'Print a list of available slash commands' + name: "Print a list of available slash commands" # Define the type of virtual host machine: runs-on: ubuntu-latest # Ensure initial reaction job has completed before running this job: - needs: [ add_initial_reaction ] + needs: [add_initial_reaction] # Define the conditions under which the job should run: if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/stdlib help') @@ -206,7 +198,7 @@ jobs: # Define the job's steps: steps: # Create a comment on the pull request informing the user of available slash commands: - - name: 'Create a comment on the pull request informing the user of available slash commands' + - name: "Create a comment on the pull request informing the user of available slash commands" # Pin action to full length commit SHA uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 with: @@ -228,15 +220,23 @@ jobs: # Define a job for removing the in-progress label: remove_progress_label: - # Define a display name: - name: 'Remove in-progress label' + name: "Remove in-progress label" # Define the type of virtual host machine: runs-on: ubuntu-latest # Ensure all previous jobs have completed before running this job: - needs: [ add_initial_reaction, check_files, update_copyright_years, fix_lint_errors, merge_develop, rebase_develop, help ] + needs: + [ + add_initial_reaction, + check_files, + update_copyright_years, + fix_lint_errors, + merge_develop, + rebase_develop, + help, + ] # Define the conditions under which the job should run: if: | diff --git a/.github/workflows/standalone_keepalive.yml b/.github/workflows/standalone_keepalive.yml index 92b13489547c..a5b7036acb40 100644 --- a/.github/workflows/standalone_keepalive.yml +++ b/.github/workflows/standalone_keepalive.yml @@ -23,14 +23,13 @@ name: standalone_keepalive on: # Run the workflow on the first day of each week: schedule: - - cron: '0 0 * * 1' + - cron: "0 0 * * 1" # Allow the workflow to be manually run: workflow_dispatch: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -44,12 +43,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for scheduled updates to standalone packages... keepalive: - # Define a display name: - name: 'Keep alive' + name: "Keep alive" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -59,9 +56,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -76,33 +72,33 @@ jobs: timeout-minutes: 10 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "stdlib-bot" # Apply Git notes: - - name: 'Apply Git notes' + - name: "Apply Git notes" run: | make apply-git-notes timeout-minutes: 5 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Update standalone packages: - - name: 'Update standalone packages' + - name: "Update standalone packages" env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} run: | diff --git a/.github/workflows/standalone_publish.yml b/.github/workflows/standalone_publish.yml index 9e26f098c273..170da34552b7 100644 --- a/.github/workflows/standalone_publish.yml +++ b/.github/workflows/standalone_publish.yml @@ -26,30 +26,29 @@ on: inputs: release-type: type: choice - description: 'Type of release to create' - default: 'none' + description: "Type of release to create" + default: "none" options: - - none - - patch - - minor - - major - - auto + - none + - patch + - minor + - major + - auto dry-run: type: boolean - description: 'Skip uploading packages (dry run):' + description: "Skip uploading packages (dry run):" default: false start-index: type: number - description: 'Index of first package to publish' + description: "Index of first package to publish" default: 0 end-index: type: number - description: 'Index of last package to publish' + description: "Index of last package to publish" default: 9999 # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -63,21 +62,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for publishing standalone packages... publish: - # Define a display name: - name: 'Publish' + name: "Publish" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -92,32 +88,32 @@ jobs: timeout-minutes: 10 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "stdlib-bot" # Apply Git notes: - - name: 'Apply Git notes' + - name: "Apply Git notes" run: | make apply-git-notes # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Publish standalone packages: - - name: 'Publish packages' + - name: "Publish packages" env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -128,7 +124,7 @@ jobs: node lib/node_modules/@stdlib/_tools/scripts/publish_packages.js --skip-toplevel --release-type=${{ github.event.inputs.release-type }} --start-index=${{ github.event.inputs.start-index }} --end-index=${{ github.event.inputs.end-index }} ${{ github.event.inputs.dry-run == 'true' && '--skip-upload ' || '' }} # Archive list of to be published packages: - - name: 'Archive package list' + - name: "Archive package list" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: @@ -139,12 +135,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: publish @@ -160,9 +155,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.publish.result}}' >> $GITHUB_ENV if [[ "${{ needs.publish.result }}" = "success" ]]; then @@ -180,7 +174,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/standalone_publish_custom.yml b/.github/workflows/standalone_publish_custom.yml index b39b29081193..c82b0e4df5b0 100644 --- a/.github/workflows/standalone_publish_custom.yml +++ b/.github/workflows/standalone_publish_custom.yml @@ -26,37 +26,36 @@ on: inputs: skip: type: choice - description: 'Skip individual or toplevel package publishing?' + description: "Skip individual or toplevel package publishing?" options: - - none - - skip-toplevel - - skip-individual + - none + - skip-toplevel + - skip-individual packages: - description: 'List of packages to publish (space separated):' + description: "List of packages to publish (space separated):" pattern: - description: 'Regular expression for packages to include:' + description: "Regular expression for packages to include:" dry-run: type: boolean - description: 'Skip uploading packages (dry run):' + description: "Skip uploading packages (dry run):" default: false release-type: type: choice - description: 'Type of release to create' - default: 'none' + description: "Type of release to create" + default: "none" options: - - none - - patch - - minor - - major - - auto + - none + - patch + - minor + - major + - auto only-unpublished: type: boolean - description: 'Only publish packages that have not yet been published' + description: "Only publish packages that have not yet been published" default: false # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -70,21 +69,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for publishing standalone packages... publish: - # Define a display name: - name: 'Publish' + name: "Publish" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -99,33 +95,33 @@ jobs: timeout-minutes: 10 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "stdlib-bot" # Apply Git notes: - - name: 'Apply Git notes' + - name: "Apply Git notes" run: | make apply-git-notes timeout-minutes: 5 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Publish standalone packages: - - name: 'Publish packages' + - name: "Publish packages" env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} DEBUG: ${{ env.ACTIONS_STEP_DEBUG && 'scripts:publish-packages' || '' }} diff --git a/.github/workflows/standalone_push_changes.yml b/.github/workflows/standalone_push_changes.yml index 7f35b5b6f9a4..67b3c057679e 100644 --- a/.github/workflows/standalone_push_changes.yml +++ b/.github/workflows/standalone_push_changes.yml @@ -26,10 +26,10 @@ on: - develop paths: # List paths for which changes should trigger this workflow: - - 'lib/node_modules/@stdlib/**' + - "lib/node_modules/@stdlib/**" # List paths for which changes should *not* trigger this workflow: - - '!lib/node_modules/@stdlib/_tools/**' + - "!lib/node_modules/@stdlib/_tools/**" # Global permissions: permissions: @@ -38,21 +38,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for pushing changes to standalone packages... push: - # Define a display name: - name: 'Push changes' + name: "Push changes" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -67,40 +64,40 @@ jobs: timeout-minutes: 10 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "stdlib-bot" # Apply Git notes: - - name: 'Apply Git notes' + - name: "Apply Git notes" run: | make apply-git-notes # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Retrieve list of changed packages: - - name: 'Find changed packages' - id: 'changed_packages' + - name: "Find changed packages" + id: "changed_packages" # Pin action to full length commit SHA uses: stdlib-js/changed-packages-action@e489c6b4eff164c5912a0b2d17d7462f38c11712 # v2.0.0 with: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_FGPAT_REPO_READ }} # Push changes to the package repositories: - - name: 'Push changes' + - name: "Push changes" if: ${{ steps.changed_packages.outputs.packages != '[]' }} env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -110,12 +107,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: push @@ -131,9 +127,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.push.result}}' >> $GITHUB_ENV if [[ "${{ needs.push.result }}" = "success" ]]; then @@ -151,7 +146,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/standalone_test.yml b/.github/workflows/standalone_test.yml index 3aa1b442ecab..b5998e4e6d38 100644 --- a/.github/workflows/standalone_test.yml +++ b/.github/workflows/standalone_test.yml @@ -26,7 +26,6 @@ on: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -40,21 +39,18 @@ permissions: # Workflow jobs: jobs: - # Define a job for triggering test workflows for standalone packages... trigger: - # Define a display name: - name: 'Trigger tests' + name: "Trigger tests" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -69,21 +65,21 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Trigger standalone package tests: - - name: 'Trigger tests' + - name: "Trigger tests" env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} run: | @@ -91,12 +87,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: trigger @@ -112,9 +107,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.trigger.result}}' >> $GITHUB_ENV if [[ "${{ needs.trigger.result }}" = "success" ]]; then @@ -132,7 +126,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.github/workflows/terminal.yml b/.github/workflows/terminal.yml index 91548319ac0d..e3aa3f0d626a 100644 --- a/.github/workflows/terminal.yml +++ b/.github/workflows/terminal.yml @@ -30,12 +30,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for running tests affected by changes to the repository... process: - # Define a display name: - name: 'Open Terminal' + name: "Open Terminal" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -43,7 +41,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -58,27 +56,27 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -88,6 +86,6 @@ jobs: git_commit_gpgsign: true # Setup a terminal session: - - name: 'Setup upterm session' + - name: "Setup upterm session" # Pin action to full length commit SHA uses: lhotari/action-upterm@b0357f23233f5ea6d58947c0c402e0631bab7334 # v1.0.0 diff --git a/.github/workflows/test_published_package.yml b/.github/workflows/test_published_package.yml index 4d6ef003e012..fba991fe0da2 100644 --- a/.github/workflows/test_published_package.yml +++ b/.github/workflows/test_published_package.yml @@ -23,7 +23,7 @@ name: test_published_package on: # Run workflow on a weekly schedule: schedule: - - cron: '0 0 * * 0' + - cron: "0 0 * * 0" # Allow workflow to be manually run: workflow_dispatch: @@ -37,7 +37,7 @@ permissions: jobs: test-published: # Define a display name: - name: 'Test running examples of published package' + name: "Test running examples of published package" # Define the type of virtual host machine: runs-on: ubuntu-latest @@ -49,21 +49,21 @@ jobs: # Define the job's steps: steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: # Do not persist GitHub token in local Git configuration since no continued authentication is needed: persist-credentials: false # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: node-version: 20 timeout-minutes: 5 # Create test directory and run examples: - - name: 'Create test directory and run examples' + - name: "Create test directory and run examples" run: | cd .. mkdir test-published @@ -96,9 +96,9 @@ jobs: node index.js # Send Slack notification if job fails: - - name: 'Send notification to Slack in case of failure' + - name: "Send notification to Slack in case of failure" uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - channel: '#npm-ci' + channel: "#npm-ci" if: failure() diff --git a/.github/workflows/track_todos.yml b/.github/workflows/track_todos.yml index 233828a41f2b..a57950540fe9 100644 --- a/.github/workflows/track_todos.yml +++ b/.github/workflows/track_todos.yml @@ -23,7 +23,7 @@ name: track_todos on: schedule: # Run the workflow once a month on the 1st day of every month: - - cron: '0 0 1 * *' + - cron: "0 0 1 * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for running tests affected by changes to the repository... process: - # Define a display name: - name: 'Track TODO and FIXME comments' + name: "Track TODO and FIXME comments" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -51,7 +49,7 @@ jobs: # Define the sequence of job steps... steps: # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -66,23 +64,23 @@ jobs: timeout-minutes: 10 # Create content of tracking issue for TODO comments: - - name: 'Create content of tracking issue for TODO comments' + - name: "Create content of tracking issue for TODO comments" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/track_todos" > tracking_issue_todos.md cat tracking_issue_todos.md >> $GITHUB_STEP_SUMMARY # Create content of tracking issue for FIXME comments: - - name: 'Create content of tracking issue for FIXME comments' + - name: "Create content of tracking issue for FIXME comments" run: | . "$GITHUB_WORKSPACE/.github/workflows/scripts/track_fixmes" > tracking_issue_fixmes.md cat tracking_issue_fixmes.md >> $GITHUB_STEP_SUMMARY # Create or update issue for TODO comments: - - name: 'Create or update issue for TODO comments' + - name: "Create or update issue for TODO comments" # Pin action to full length commit SHA uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1 with: - title: 'TODO comments' + title: "TODO comments" content-filepath: ./tracking_issue_todos.md issue-number: 803 token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} @@ -91,11 +89,11 @@ jobs: automated-issue # Create or update issue for FIXME comments: - - name: 'Create or update issue for FIXME comments' + - name: "Create or update issue for FIXME comments" # Pin action to full length commit SHA uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1 with: - title: 'FIXME comments' + title: "FIXME comments" content-filepath: ./tracking_issue_fixmes.md issue-number: 804 token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} diff --git a/.github/workflows/update_cli_permissions.yml b/.github/workflows/update_cli_permissions.yml index 34f017b3974a..5c6a8643b1fa 100644 --- a/.github/workflows/update_cli_permissions.yml +++ b/.github/workflows/update_cli_permissions.yml @@ -23,7 +23,7 @@ name: update_cli_permissions on: schedule: # Run the workflow once a week (Sunday at midnight): - - cron: '0 0 * * 0' + - cron: "0 0 * * 0" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for making CLI scripts executable: update: - # Define a display name: - name: 'Update CLI Permissions' + name: "Update CLI Permissions" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,7 +67,7 @@ jobs: timeout-minutes: 10 # Make CLI scripts executable: - - name: 'Make CLI scripts executable' + - name: "Make CLI scripts executable" run: | files=$(find lib/node_modules/@stdlib -type d -name 'bin' -exec find {} -type f -name 'cli' \;) @@ -79,12 +76,12 @@ jobs: done # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -94,14 +91,14 @@ jobs: git_commit_gpgsign: true # Create a pull request with the updated files: - - name: 'Create pull request' + - name: "Create pull request" id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'fix: make CLI scripts executable' - commit-message: 'fix: make CLI scripts executable' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + title: "fix: make CLI scripts executable" + commit-message: "fix: make CLI scripts executable" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true body: | This PR changes the permissions of project `cli` scripts to be executable. diff --git a/.github/workflows/update_contributors.yml b/.github/workflows/update_contributors.yml index 7a2d58a4d687..68faaeb7d88f 100644 --- a/.github/workflows/update_contributors.yml +++ b/.github/workflows/update_contributors.yml @@ -23,7 +23,7 @@ name: update_contributors on: schedule: # Run the workflow once a day at 2:00 AM UTC: - - cron: '0 2 * * *' + - cron: "0 2 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating the contributors list... update-contributors: - # Define a display name: - name: 'Update contributors' + name: "Update contributors" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -60,7 +57,7 @@ jobs: clean: true # Refers to the development branch: - ref: 'develop' + ref: "develop" # Fetch entire history: fetch-depth: 0 @@ -73,7 +70,7 @@ jobs: timeout-minutes: 10 # Update the contributors list: - - name: 'Update contributors' + - name: "Update contributors" id: update-contributors run: | make update-contributors @@ -86,7 +83,7 @@ jobs: fi # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -96,13 +93,13 @@ jobs: git_commit_gpgsign: true # Create a pull request: - - name: 'Create pull request' + - name: "Create pull request" if: steps.update-contributors.outputs.changed == 'true' # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 id: cpr with: - title: 'docs: update list of contributors' + title: "docs: update list of contributors" body: | This PR @@ -115,8 +112,8 @@ jobs: - [ ] If updating `.mailmap`, **regenerate** the contributors file by running `make update-contributors` on the PR branch afterward. - [ ] Approve the PR after verifying the changes. - commit-message: 'docs: update list of contributors' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "docs: update list of contributors" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | @@ -128,7 +125,7 @@ jobs: delete-branch: true # Create a pull request summary: - - name: 'Create summary' + - name: "Create summary" run: | echo "# :tada: Pull Request created! :tada:" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/update_error_databases.yml b/.github/workflows/update_error_databases.yml index d26034f13683..054591a2a714 100644 --- a/.github/workflows/update_error_databases.yml +++ b/.github/workflows/update_error_databases.yml @@ -23,7 +23,7 @@ name: update_error_databases on: schedule: # Run the workflow once a week (Sunday at midnight): - - cron: '0 0 * * 0' + - cron: "0 0 * * 0" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating the error databases: update: - # Define a display name: - name: 'Update Error Databases' + name: "Update Error Databases" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,28 +67,28 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Update the error databases: - - name: 'Update error databases' + - name: "Update error databases" run: | node lib/node_modules/@stdlib/error/tools/database/scripts/build.js node lib/node_modules/@stdlib/error/tools/pkg2id/scripts/build.js node lib/node_modules/@stdlib/error/tools/id2pkg/scripts/build.js # Check if there are any changes to the error databases: - - name: 'Check for changes' + - name: "Check for changes" id: check_changes run: | if [ -z "$(git diff lib/node_modules/@stdlib/error/tools/database/data/data.csv | grep '^+')" ]; then @@ -103,7 +100,7 @@ jobs: fi # Generate comment with Markdown table of added error codes: - - name: 'Generate comment body with Markdown table of added error codes' + - name: "Generate comment body with Markdown table of added error codes" if: steps.check_changes.outputs.has_changes == 'true' run: | # Save the added lines from the diff to a temporary file: @@ -138,13 +135,13 @@ jobs: shell: bash # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" if: steps.check_changes.outputs.has_changes == 'true' run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" if: steps.check_changes.outputs.has_changes == 'true' # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 @@ -155,16 +152,16 @@ jobs: git_commit_gpgsign: true # Create a pull request with the updated declarations: - - name: 'Create pull request' + - name: "Create pull request" if: steps.check_changes.outputs.has_changes == 'true' id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'feat: update error databases' + title: "feat: update error databases" body-path: /tmp/body.md - commit-message: 'feat: update error databases' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "feat: update error databases" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | diff --git a/.github/workflows/update_package_meta_data.yml b/.github/workflows/update_package_meta_data.yml index 71704ec3f77b..fea0c0d4c803 100644 --- a/.github/workflows/update_package_meta_data.yml +++ b/.github/workflows/update_package_meta_data.yml @@ -27,7 +27,7 @@ on: # Run the workflow on a schedule: schedule: # Run the workflow every week on Sunday at 00:00 UTC: - - cron: '0 0 * * 0' + - cron: "0 0 * * 0" # Global permissions: permissions: @@ -36,12 +36,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating `package.json` files... update: - # Define a display name: - name: 'Update meta data' + name: "Update meta data" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -51,9 +49,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -71,31 +68,31 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Update directories: - - name: 'Update directories' + - name: "Update directories" run: | node lib/node_modules/@stdlib/_tools/package-json/scripts/update_directories lib/node_modules/@stdlib # Update gypfile field: - - name: 'Update gypfile field' + - name: "Update gypfile field" run: | node lib/node_modules/@stdlib/_tools/package-json/scripts/update_gypfile lib/node_modules/@stdlib # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -105,19 +102,19 @@ jobs: git_commit_gpgsign: true # Create a pull request with the updated `package.json` files: - - name: 'Create pull request' + - name: "Create pull request" id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'chore: update package meta data' + title: "chore: update package meta data" body: | This PR - updates package meta data - commit-message: 'chore: update package meta data' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "chore: update package meta data" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | @@ -128,7 +125,7 @@ jobs: delete-branch: true # Create a pull request summary: - - name: 'Create summary' + - name: "Create summary" run: | echo "# :tada: Pull Request created! :tada:" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/update_pr_copyright_years.yml b/.github/workflows/update_pr_copyright_years.yml index 74275f738236..12c47ad47b27 100644 --- a/.github/workflows/update_pr_copyright_years.yml +++ b/.github/workflows/update_pr_copyright_years.yml @@ -21,45 +21,41 @@ name: update_pr_copyright_years # Workflow triggers: on: - # Allow the workflow to be triggered by other workflows workflow_call: # Define the input parameters for the workflow: inputs: pull_request_number: - description: 'PR number' + description: "PR number" required: true type: number # Define the secrets accessible by the workflow: secrets: STDLIB_BOT_GITHUB_TOKEN: - description: 'GitHub token for stdlib-bot' + description: "GitHub token for stdlib-bot" required: true STDLIB_BOT_GPG_PRIVATE_KEY: - description: 'GPG private key for stdlib-bot' + description: "GPG private key for stdlib-bot" required: true STDLIB_BOT_GPG_PASSPHRASE: - description: 'GPG passphrase for stdlib-bot' + description: "GPG passphrase for stdlib-bot" required: true # Workflow jobs: jobs: - # Define a job for updating the copyright years: update: - # Define a display name: - name: 'Update Copyright Years' + name: "Update Copyright Years" # Define the type of virtual host machine: runs-on: ubuntu-latest # Define the sequence of job steps... steps: - # Get PR details: - - name: 'Get PR details' + - name: "Get PR details" id: pr-details run: | pr_response=$(curl -s \ @@ -79,7 +75,7 @@ jobs: echo "repository=$pr_repo_full_name" >> $GITHUB_OUTPUT # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -93,10 +89,10 @@ jobs: token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} # File path to checkout to: - path: './' + path: "./" # Get list of added files: - - name: 'Get list of added files' + - name: "Get list of added files" id: added-files run: | page=1 @@ -114,19 +110,19 @@ jobs: echo "files=${files}" >> $GITHUB_OUTPUT # Update the copyright years: - - name: 'Update copyright years' + - name: "Update copyright years" id: update-years run: | files="${{ steps.added-files.outputs.files }}" . "$GITHUB_WORKSPACE/.github/workflows/scripts/update_copyright_years" "$files" # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -136,12 +132,12 @@ jobs: git_commit_gpgsign: true # Commit and push changes: - - name: 'Commit and push changes' + - name: "Commit and push changes" env: - REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} - USER_NAME: stdlib-bot - BRANCH_NAME: ${{ steps.pr-details.outputs.branch }} - REPO_NAME: ${{ steps.pr-details.outputs.repository }} + REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }} + USER_NAME: stdlib-bot + BRANCH_NAME: ${{ steps.pr-details.outputs.branch }} + REPO_NAME: ${{ steps.pr-details.outputs.repository }} run: | git config --local user.email "82920195+stdlib-bot@users.noreply.github.com" git config --local user.name "$USER_NAME" diff --git a/.github/workflows/update_repl_docs.yml b/.github/workflows/update_repl_docs.yml index 3a17f8511410..f737035bc9b1 100644 --- a/.github/workflows/update_repl_docs.yml +++ b/.github/workflows/update_repl_docs.yml @@ -23,7 +23,7 @@ name: update_repl_docs on: schedule: # Run the workflow once a day at 2:00 AM UTC: - - cron: '0 2 * * *' + - cron: "0 2 * * *" # Allow the workflow to be manually run: workflow_dispatch: @@ -35,12 +35,10 @@ permissions: # Workflow jobs: jobs: - # Define a job for updating REPL documentation... update: - # Define a display name: - name: 'Update REPL docs' + name: "Update REPL docs" # Ensure the job does not run on forks: if: github.repository == 'stdlib-js/stdlib' @@ -50,9 +48,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,37 +67,37 @@ jobs: timeout-minutes: 10 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" # Pin action to full length commit SHA uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: - node-version: '20' # 'lts/*' + node-version: "20" # 'lts/*' timeout-minutes: 5 # Install dependencies (accounting for possible network failures, etc, when installing node module dependencies): - - name: 'Install dependencies' + - name: "Install dependencies" run: | make install-node-modules || make install-node-modules || make install-node-modules timeout-minutes: 15 # Initialize development environment: - - name: 'Initialize development environment' + - name: "Initialize development environment" run: | make init timeout-minutes: 5 # Update REPL documentation: - - name: 'Update documentation' + - name: "Update documentation" run: | make repl-docs # Disable Git hooks: - - name: 'Disable Git hooks' + - name: "Disable Git hooks" run: | rm -rf .git/hooks # Import GPG key to sign commits: - - name: 'Import GPG key to sign commits' + - name: "Import GPG key to sign commits" # Pin action to full length commit SHA uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 with: @@ -110,19 +107,19 @@ jobs: git_commit_gpgsign: true # Create a pull request: - - name: 'Create pull request' + - name: "Create pull request" id: cpr # Pin action to full length commit SHA uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - title: 'docs: update REPL namespace documentation' + title: "docs: update REPL namespace documentation" body: | This PR - updates the REPL namespace documentation - commit-message: 'docs: update REPL namespace documentation' - committer: 'stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>' + commit-message: "docs: update REPL namespace documentation" + committer: "stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>" signoff: true token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} labels: | @@ -134,7 +131,7 @@ jobs: delete-branch: true # Create a pull request summary: - - name: 'Create summary' + - name: "Create summary" run: | echo "# :tada: Pull Request created! :tada:" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/windows_test_npm_install.yml b/.github/workflows/windows_test_npm_install.yml index 5e852577378f..67f44ccaff4e 100644 --- a/.github/workflows/windows_test_npm_install.yml +++ b/.github/workflows/windows_test_npm_install.yml @@ -23,14 +23,13 @@ name: windows_test_npm_install on: # Run nightly: schedule: - - cron: '0 9 * * *' + - cron: "0 9 * * *" # Allow the workflow to be manually run: workflow_dispatch: # Workflow concurrency group: concurrency: - # Specify a group name: group: ${{ github.workflow }} @@ -44,10 +43,8 @@ permissions: # Workflow jobs: jobs: - # Define a job for testing project installation on Windows... test_npm_install: - # Define a display name: name: "Node.js v${{ matrix.NODE_VERSION }}" @@ -59,35 +56,33 @@ jobs: # Define environment variables: env: - FC: 'gfortran' - FORTRAN_COMPILER: 'gfortran' - CC: 'gcc' - C_COMPILER: 'gcc' - CXX: 'g++' - CXX_COMPILER: 'g++' - LINKER: 'g++' - GITHUB: 'true' + FC: "gfortran" + FORTRAN_COMPILER: "gfortran" + CC: "gcc" + C_COMPILER: "gcc" + CXX: "g++" + CXX_COMPILER: "g++" + LINKER: "g++" + GITHUB: "true" LOG_DIR: "${{ github.workspace }}\\tmp\\var\\log" LOG_FILE_BUILD_TASK: "${{ github.workspace }}\\\\tmp\\\\var\\\\log\\\\${{ matrix.BUILD_TASK }}.log" LOG_NUM_LINES: 5000 # Define the build matrix strategy... strategy: - # Specify whether to cancel all in-progress jobs if any matrix job fails: fail-fast: false # Define the build matrix: matrix: - # Define the list of build tasks: - BUILD_TASK: ['test-npm-install'] + BUILD_TASK: ["test-npm-install"] # Define the list of Node.js versions: - NODE_VERSION: ['20', '18', '16', '14', '12', '10', '8', '6', '4'] + NODE_VERSION: ["20", "18", "16", "14", "12", "10", "8", "6", "4"] # Define the list of operating systems: - OS: ['windows-latest'] + OS: ["windows-latest"] # Define the list of host architectures: ARCHITECTURE: @@ -95,35 +90,35 @@ jobs: # Define configuration options for each Node.js version: include: - - OS: 'windows-latest' - PLATFORM: 'windows' + - OS: "windows-latest" + PLATFORM: "windows" - - NODE_VERSION: '20' - NPM_VERSION: '>10.0.0' + - NODE_VERSION: "20" + NPM_VERSION: ">10.0.0" - - NODE_VERSION: '18' - NPM_VERSION: '>10.0.0' + - NODE_VERSION: "18" + NPM_VERSION: ">10.0.0" - - NODE_VERSION: '16' - NPM_VERSION: '>2.7.0 <10.0.0' + - NODE_VERSION: "16" + NPM_VERSION: ">2.7.0 <10.0.0" - - NODE_VERSION: '14' - NPM_VERSION: '>2.7.0 <10.0.0' + - NODE_VERSION: "14" + NPM_VERSION: ">2.7.0 <10.0.0" - - NODE_VERSION: '12' - NPM_VERSION: '>2.7.0 <9.0.0' + - NODE_VERSION: "12" + NPM_VERSION: ">2.7.0 <9.0.0" - - NODE_VERSION: '10' - NPM_VERSION: '>2.7.0 <7.0.0' + - NODE_VERSION: "10" + NPM_VERSION: ">2.7.0 <7.0.0" - - NODE_VERSION: '8' - NPM_VERSION: '>2.7.0 <6.0.0' + - NODE_VERSION: "8" + NPM_VERSION: ">2.7.0 <6.0.0" - - NODE_VERSION: '6' - NPM_VERSION: '>2.7.0 <6.0.0' + - NODE_VERSION: "6" + NPM_VERSION: ">2.7.0 <6.0.0" - - NODE_VERSION: '4' - NPM_VERSION: '>2.7.0 <6.0.0' + - NODE_VERSION: "4" + NPM_VERSION: ">2.7.0 <6.0.0" # Set defaults: defaults: @@ -133,9 +128,8 @@ jobs: # Define the sequence of job steps... steps: - # Checkout the repository: - - name: 'Checkout repository' + - name: "Checkout repository" # Pin action to full length commit SHA uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -153,7 +147,7 @@ jobs: timeout-minutes: 10 # Install MSYS2: - - name: 'Install MSYS2' + - name: "Install MSYS2" # Pin action to full length commit SHA uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # v2.26.0 with: @@ -168,14 +162,14 @@ jobs: timeout-minutes: 10 # Initialize log files: - - name: 'Initialize log files' + - name: "Initialize log files" run: | mkdir -p "${{ env.LOG_DIR }}" touch "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 2 # Configure Git: - - name: 'Configure Git' + - name: "Configure Git" # Instruct Git to convert CRLF line endings (Windows) to LF on commit and force Git to use HTTPS rather than SSH. # @@ -187,14 +181,14 @@ jobs: timeout-minutes: 2 # Configure NVS: - - name: 'Configure NVS' + - name: "Configure NVS" run: | echo "NVS_HOME=$HOME/.nvs" >> $GITHUB_ENV echo "NVS_LINK_TO_SYSTEM=1" >> $GITHUB_ENV timeout-minutes: 2 # Install Node.js: - - name: 'Install Node.js' + - name: "Install Node.js" run: | echo 'Cloning NVS...' git clone https://github.com/jasongin/nvs "${{ env.NVS_HOME }}" @@ -210,7 +204,7 @@ jobs: timeout-minutes: 15 # Print debug info: - - name: 'Print debug info' + - name: "Print debug info" run: | . "${{ env.NVS_HOME }}/nvs.sh" && nvs use ${{ matrix.NODE_VERSION }} echo 'PATH:' @@ -235,7 +229,7 @@ jobs: timeout-minutes: 2 # Update the npm client (older clients cannot handle scoped modules): - - name: 'Update npm' + - name: "Update npm" run: | . "${{ env.NVS_HOME }}/nvs.sh" && nvs use ${{ matrix.NODE_VERSION }} npm install -g npm@"${{ matrix.NPM_VERSION }}" @@ -243,7 +237,7 @@ jobs: timeout-minutes: 5 # Install Windows build tools for compiling Node.js native add-ons. - - name: 'Install Windows build tools' + - name: "Install Windows build tools" # Pin action to full length commit SHA uses: crazy-max/ghaction-chocolatey@2ae99523e93879734d432250f87e2c45c379cd60 # v3.2.0 with: @@ -251,7 +245,7 @@ jobs: timeout-minutes: 10 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -259,25 +253,25 @@ jobs: timeout-minutes: 5 # Configure npm: - - name: 'Configure npm' + - name: "Configure npm" run: | . "${{ env.NVS_HOME }}/nvs.sh" && nvs use ${{ matrix.NODE_VERSION }} npm config set msvs_version 2019 timeout-minutes: 2 # Run the build task: - - name: 'Run build task' + - name: "Run build task" env: # Explicitly set computed environment variables: - TEST_NPM_INSTALL_PKG: '@stdlib/stdlib' - TEST_NPM_INSTALL_GITHUB_URL: 'https://github.com/stdlib-js/stdlib' + TEST_NPM_INSTALL_PKG: "@stdlib/stdlib" + TEST_NPM_INSTALL_GITHUB_URL: "https://github.com/stdlib-js/stdlib" run: | . "${{ env.NVS_HOME }}/nvs.sh" && nvs use ${{ matrix.NODE_VERSION }} . "$GITHUB_WORKSPACE/.github/workflows/scripts/task_runner" ${{ matrix.BUILD_TASK }} "${{ env.LOG_FILE_BUILD_TASK }}" timeout-minutes: 360 # View the log file if the previous step fails: - - name: 'View log file' + - name: "View log file" if: failure() run: | echo "Printing the last ${{ env.LOG_NUM_LINES }} lines of log output..." @@ -285,7 +279,7 @@ jobs: timeout-minutes: 5 # Upload the log file: - - name: 'Upload log file' + - name: "Upload log file" # Pin action to full length commit SHA uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 if: always() @@ -302,12 +296,11 @@ jobs: # Define a job for sending notifications to Slack... slack: - # Define a display name: - name: 'Slack notification' + name: "Slack notification" # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" # Indicate that this job depends on the prior job finishing: needs: test_npm_install @@ -323,9 +316,8 @@ jobs: # Define the sequence of job steps... steps: - # Resolve notification data: - - name: 'Resolve notification data' + - name: "Resolve notification data" run: | echo 'NOTIFICATION_STATUS=${{ needs.test_npm_install.result}}' >> $GITHUB_ENV if [[ "${{ needs.test_npm_install.result }}" = "success" ]]; then @@ -343,7 +335,7 @@ jobs: timeout-minutes: 5 # Send notification to Slack: - - name: 'Send notification' + - name: "Send notification" # Pin action to full length commit SHA uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 if: success() diff --git a/.travis.yml b/.travis.yml index bac61723e462..34ef39497696 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ dist: xenial # Specify the list of Node.js versions on which we want to build: node_js: # Node.js - - '16' + - "16" # Specify which branches should trigger builds: branches: diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 5cf845c15be6..dd1b2fa4bd3f 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -32,43 +32,43 @@ We ask that you respect that people have differences of opinion regarding techni The following behaviors are **expected** of **all** community members: -- Be careful in the words you choose. -- Use welcoming and inclusive language. -- Refrain from demeaning, discriminatory, or harassing behavior and speech. -- Avoid sarcasm in **any** form. What is considered benign by you is seen as caustic by others. -- Be respectful of differing viewpoints and experiences. -- Resist the urge to be defensive if someone takes issue with something you said or did. Even if you feel misinterpreted or unfairly accused, in all likelihood, you probably could have communicated better. **Remember**: it is **your** responsibility to make fellow community members comfortable and feel respected. -- Keep unstructured critique to a minimum. If you have solid contribution ideas, make a fork, experiment, and evaluate accordingly. -- Gracefully accept constructive criticism. -- Attempt collaboration before conflict. -- Always be professional. -- Show empathy toward other community members. -- Focus on what is best for the community. +- Be careful in the words you choose. +- Use welcoming and inclusive language. +- Refrain from demeaning, discriminatory, or harassing behavior and speech. +- Avoid sarcasm in **any** form. What is considered benign by you is seen as caustic by others. +- Be respectful of differing viewpoints and experiences. +- Resist the urge to be defensive if someone takes issue with something you said or did. Even if you feel misinterpreted or unfairly accused, in all likelihood, you probably could have communicated better. **Remember**: it is **your** responsibility to make fellow community members comfortable and feel respected. +- Keep unstructured critique to a minimum. If you have solid contribution ideas, make a fork, experiment, and evaluate accordingly. +- Gracefully accept constructive criticism. +- Attempt collaboration before conflict. +- Always be professional. +- Show empathy toward other community members. +- Focus on what is best for the community. ## Unacceptable Behavior The following behaviors are considered harassment, are unacceptable within our community, and will **not** be tolerated: -- Personal insults. -- Deliberate intimidation. -- Harmful or prejudicial verbal or written comments related to gender identity, sexual orientation, ability, ethnicity, religion, age, physical appearance, body size, race, or other personal characteristics. -- Deliberate "outing" of any aspect of a person's identity without their consent, except as necessary to protect others from intentional abuse. -- Unwelcome comments regarding a person's lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment. -- Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person's gender identity. -- Posting or displaying sexually explicit or violent material. -- Posting or threatening to post personally identifying information ("doxing"). -- Stalking or following (online or in person). -- Any spamming, trolling, flaming, baiting, or other attention-stealing behavior. -- Harassing photography or recording, including logging online activity for harassment purposes. -- Violence, threats of violence (physical or psychological), or violent language. -- Public or private harassment. -- Unwelcome sexual attention, including gratuitous or off-topic sexual images or behavior. -- Physical or simulated contact without consent or after a request to stop. -- Continued one-on-one communication after requests to cease. -- Publication of non-harassing private communication. -- Sustained disruption of discussion. -- Any other conduct which could reasonably be considered inappropriate in a professional setting. -- Advocating for, or encouraging, any of the above behavior, including but not limited to "liking", "starring", "retweeting", or any other form of promotion. +- Personal insults. +- Deliberate intimidation. +- Harmful or prejudicial verbal or written comments related to gender identity, sexual orientation, ability, ethnicity, religion, age, physical appearance, body size, race, or other personal characteristics. +- Deliberate "outing" of any aspect of a person's identity without their consent, except as necessary to protect others from intentional abuse. +- Unwelcome comments regarding a person's lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment. +- Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person's gender identity. +- Posting or displaying sexually explicit or violent material. +- Posting or threatening to post personally identifying information ("doxing"). +- Stalking or following (online or in person). +- Any spamming, trolling, flaming, baiting, or other attention-stealing behavior. +- Harassing photography or recording, including logging online activity for harassment purposes. +- Violence, threats of violence (physical or psychological), or violent language. +- Public or private harassment. +- Unwelcome sexual attention, including gratuitous or off-topic sexual images or behavior. +- Physical or simulated contact without consent or after a request to stop. +- Continued one-on-one communication after requests to cease. +- Publication of non-harassing private communication. +- Sustained disruption of discussion. +- Any other conduct which could reasonably be considered inappropriate in a professional setting. +- Advocating for, or encouraging, any of the above behavior, including but not limited to "liking", "starring", "retweeting", or any other form of promotion. Note that your free speech is not **our** problem. That this policy is a restrictive political stance is intentional. If you want different rules, go create a separate project. @@ -89,14 +89,14 @@ Project owners are held to a higher standard than other community members. If an Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the [reporting team][reporting]. In your report, please include -- Your contact information. -- Names (real, nicknames, or pseudonyms) of any individuals involved. If available, any additional witnesses. -- An account of what occurred, and if you believe the incident is ongoing. -- If available, a public record (e.g., a link to a mailing list archive, public IRC logger, Tweet, or issue thread). -- Any prior records of behavior either inside or outside the community which can be used to establish prior precedent. -- Any additional information that may be helpful. +- Your contact information. +- Names (real, nicknames, or pseudonyms) of any individuals involved. If available, any additional witnesses. +- An account of what occurred, and if you believe the incident is ongoing. +- If available, a public record (e.g., a link to a mailing list archive, public IRC logger, Tweet, or issue thread). +- Any prior records of behavior either inside or outside the community which can be used to establish prior precedent. +- Any additional information that may be helpful. -All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate. Complaint recipients are obligated to maintain confidentiality with regard to the reporter of an incident. +All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate. Complaint recipients are obligated to maintain confidentiality with regard to the reporter of an incident. If an accused person is part of the reporting team, they will recuse themselves from handling your incident. If the reporter is a reporting team member, the complaint will be handled by a different member of the reporting team. @@ -112,11 +112,11 @@ If you feel you have been falsely or unfairly accused of violating this Code of Note that we prioritize marginalized people's safety over privileged people's comfort. We will **not** act on complaints regarding: -- "Reverse"-isms, including "reverse racism," "reverse sexism," and "cisphobia" -- Reasonable communication of boundaries, such as "leave me alone," "go away," or "I'm not discussing this with you." -- Refusal to explain or debate social justice concepts. -- Communicating in a "tone" you do not find congenial. -- Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions. +- "Reverse"-isms, including "reverse racism," "reverse sexism," and "cisphobia" +- Reasonable communication of boundaries, such as "leave me alone," "go away," or "I'm not discussing this with you." +- Refusal to explain or debate social justice concepts. +- Communicating in a "tone" you do not find congenial. +- Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions. ## Changes @@ -124,15 +124,15 @@ This is a living document and may be updated over time. Refer to the [git histor ## Attribution -This Code of Conduct borrows heavily from +This Code of Conduct borrows heavily from -- [npm Code of Conduct][npm-code-of-conduct] -- [#node.js IRC policy on trolling][nodejs-irc] -- Stumptown Syndicate [Citizen Code of Conduct][citizen-code-of-conduct] -- Geek Feminism [Code of Conduct][geek-feminism-code-of-conduct] -- [Contributor Covenant][contributor-covenant] -- [Open Code of Conduct][open-code-of-conduct] -- [The Rust Code of Conduct][rust-code-of-conduct] +- [npm Code of Conduct][npm-code-of-conduct] +- [#node.js IRC policy on trolling][nodejs-irc] +- Stumptown Syndicate [Citizen Code of Conduct][citizen-code-of-conduct] +- Geek Feminism [Code of Conduct][geek-feminism-code-of-conduct] +- [Contributor Covenant][contributor-covenant] +- [Open Code of Conduct][open-code-of-conduct] +- [The Rust Code of Conduct][rust-code-of-conduct] ## License @@ -141,23 +141,14 @@ This document may be reused under a [Creative Commons Attribution-ShareAlike 4.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fdef9e2906f1..f439f82f893b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,8 +38,8 @@ When filing new [issues][stdlib-issues] and commenting on existing [issues][stdl **Before** filing a potential bug report, -- Search for existing [issues][stdlib-issues] and [pull requests][stdlib-pull-requests]. -- Try some debugging techniques to help isolate the problem, including logging inputs and outputs. +- Search for existing [issues][stdlib-issues] and [pull requests][stdlib-pull-requests]. +- Try some debugging techniques to help isolate the problem, including logging inputs and outputs. If the source of the problem is a third party package, file a bug report with the relevant package author, rather than on this repository. @@ -53,13 +53,13 @@ Unfortunately, we are not able to investigate or fix bugs without a minimal repr When filing an [issue][stdlib-issues], provide the following, where possible: -- A description of the issue. -- Links to any related issues. -- The full error message, including the stacktrace. -- The sequence of steps required to reproduce the issue. -- A minimal working example (i.e., the smallest chunk of code that triggers the error.) Ideally, the code can be pasted into a REPL or run from a source file. If the code is larger than `100` lines, consider creating a [gist][github-gist]. -- The expected results. -- List of affected environments (e.g., browser, browser version, `npm` version, Node.js version, operating system, and stdlib version). +- A description of the issue. +- Links to any related issues. +- The full error message, including the stacktrace. +- The sequence of steps required to reproduce the issue. +- A minimal working example (i.e., the smallest chunk of code that triggers the error.) Ideally, the code can be pasted into a REPL or run from a source file. If the code is larger than `100` lines, consider creating a [gist][github-gist]. +- The expected results. +- List of affected environments (e.g., browser, browser version, `npm` version, Node.js version, operating system, and stdlib version). When pasting code blocks or output, use triple backticks to enable proper formatting. Surround inline code with single backticks. For other Markdown formatting tips and trips, see GitHub's [Markdown guide][github-markdown-guide]. @@ -71,36 +71,36 @@ Be aware that the `@` symbol tags users on GitHub, so **always** surround packag **Before** contributing code, be sure to -- read and understand the [licensing terms][stdlib-license]. -- read and understand the [style guides][stdlib-style-guides]. -- read and understand the [doctest guide][stdlib-doctest]. +- read and understand the [licensing terms][stdlib-license]. +- read and understand the [style guides][stdlib-style-guides]. +- read and understand the [doctest guide][stdlib-doctest]. For instructions on how to setup and configure your environment, be sure to -- read and follow the [development guide][stdlib-development]. +- read and follow the [development guide][stdlib-development]. If you have found a bug that you would like to fix, -- file an [issue][stdlib-issues] on the project GitHub issue [tracker][stdlib-issues] describing the bug as instructed [above](#issues). -- wait for feedback. -- submit a [pull request][stdlib-pull-requests] with your proposed changes. +- file an [issue][stdlib-issues] on the project GitHub issue [tracker][stdlib-issues] describing the bug as instructed [above](#issues). +- wait for feedback. +- submit a [pull request][stdlib-pull-requests] with your proposed changes. If you want to contribute a new feature or a breaking change to stdlib, be sure to -- consult the [Gitter][stdlib-gitter] channel to discuss ideas and to gather feedback as to whether a feature would be better developed as an external package. Discussing the design upfront helps ensure that we're ready to accept to your work. -- write an RFC (request for comments) detailing the proposed change and submit as an issue on the project GitHub issue tracker. -- wait for RFC approval. -- submit a [pull request][stdlib-pull-requests], making sure to adhere to the guidance set forth in the RFC. +- consult the [Gitter][stdlib-gitter] channel to discuss ideas and to gather feedback as to whether a feature would be better developed as an external package. Discussing the design upfront helps ensure that we're ready to accept to your work. +- write an RFC (request for comments) detailing the proposed change and submit as an issue on the project GitHub issue tracker. +- wait for RFC approval. +- submit a [pull request][stdlib-pull-requests], making sure to adhere to the guidance set forth in the RFC. If you want to contribute a new package, be sure to -- read and follow the [package development guide][stdlib-packages]. -- read and follow the [REPL text guide][stdlib-repl-text]. +- read and follow the [package development guide][stdlib-packages]. +- read and follow the [REPL text guide][stdlib-repl-text]. If you are unfamiliar with [Git][git], the version control system used by GitHub and this project, -- see the [Git][git] docs. -- try a tutorial, such as the [tutorial][github-git-tutorial] provided by GitHub. +- see the [Git][git] docs. +- try a tutorial, such as the [tutorial][github-git-tutorial] provided by GitHub. Next, take a look around the project, noting the style and organization of documentation, tests, examples, benchmarks, and source implementations. Consistency is highly **prioritized** within stdlib. Thus, the more you are able to match and adhere to project conventions and style, the more likely your contribution will be accepted. While we have done our best to automate linting and style guidelines, project automation is not perfect and cannot adequately capture the inevitable exceptions and nuance to many rules. In short, the more you study existing practice, the better prepared you will be to contribute to stdlib. @@ -332,8 +332,8 @@ Note that, in most cases during the merge process, multiple commits will be [squ ### GitHub -- When linking to specific lines of code in an issue or a pull request, hit the `y` key while viewing a file on GitHub. Doing so reloads the page with a URL that includes the specific version of the file you are viewing. This ensures that, when you refer to specific lines, these same lines can be easily viewed in the future, even if the content of the file changes. -- GitHub does not send notifications to project maintainers when you push a commit and update a [pull request][github-pull-request], so be sure to comment on the pull request thread to inform reviewers that you have made changes and request another review using the GitHub UI. +- When linking to specific lines of code in an issue or a pull request, hit the `y` key while viewing a file on GitHub. Doing so reloads the page with a URL that includes the specific version of the file you are viewing. This ensures that, when you refer to specific lines, these same lines can be easily viewed in the future, even if the content of the file changes. +- GitHub does not send notifications to project maintainers when you push a commit and update a [pull request][github-pull-request], so be sure to comment on the pull request thread to inform reviewers that you have made changes and request another review using the GitHub UI. ### Writing Tests @@ -414,10 +414,10 @@ Only a project administrator can manually trigger a build. By making a contribution to this project, I certify that: -- (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or -- (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or -- (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. -- (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. +- (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or +- (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or +- (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. +- (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ## Conclusion @@ -426,63 +426,34 @@ Phew. While the above may be a lot to remember, even for what seem like minor ch diff --git a/CORE_CONTRIBUTORS.md b/CORE_CONTRIBUTORS.md index cbf298d32d18..116b733b51f7 100644 --- a/CORE_CONTRIBUTORS.md +++ b/CORE_CONTRIBUTORS.md @@ -26,50 +26,36 @@ For information about the governance of the stdlib project, see [GOVERNANCE.md][ ## Core Contributors -- [kgryte][athan-reines-github] - **Athan Reines** <[kgryte@gmail.com][athan-reines-email]> (he/him) -- [Planeshifter][philipp-burckhardt-github] - **Philipp Burckhardt** <[pburckhardt@outlook.com][philipp-burckhardt-email]> (he/him) -- [gunjjoshi][gunj-joshi-github] - **Gunj Joshi** <[gunjjoshi8372@gmail.com][gunj-joshi-email]> (he/him) -- [headlessNode][muhammad-haris-github] - **Muhammad Haris** <[harriskhan047@outlook.com][muhammad-haris-email]> (he/him) -- [aman-095][aman-bhansali-github] - **Aman Bhansali** <[amanbhansali65@gmail.com][aman-bhansali-email]> (he/him) -- [aayush0325][aayush-khanna-github] - **Aayush Khanna** <[aayushiitbhu23@gmail.com][aayush-khanna-email]> (he/him) +- [kgryte][athan-reines-github] - **Athan Reines** <[kgryte@gmail.com][athan-reines-email]> (he/him) +- [Planeshifter][philipp-burckhardt-github] - **Philipp Burckhardt** <[pburckhardt@outlook.com][philipp-burckhardt-email]> (he/him) +- [gunjjoshi][gunj-joshi-github] - **Gunj Joshi** <[gunjjoshi8372@gmail.com][gunj-joshi-email]> (he/him) +- [headlessNode][muhammad-haris-github] - **Muhammad Haris** <[harriskhan047@outlook.com][muhammad-haris-email]> (he/him) +- [aman-095][aman-bhansali-github] - **Aman Bhansali** <[amanbhansali65@gmail.com][aman-bhansali-email]> (he/him) +- [aayush0325][aayush-khanna-github] - **Aayush Khanna** <[aayushiitbhu23@gmail.com][aayush-khanna-email]> (he/him)
Emeriti -- [rreusser][ricky-reusser-github] - **Ricky Reusser** <[rsreusser@gmail.com][ricky-reusser-email]> (he/him) +- [rreusser][ricky-reusser-github] - **Ricky Reusser** <[rsreusser@gmail.com][ricky-reusser-email]> (he/him)
diff --git a/FAQ.md b/FAQ.md index 4338a4ef11cb..94250d2f5a46 100644 --- a/FAQ.md +++ b/FAQ.md @@ -24,37 +24,37 @@ limitations under the License. > Common answers to common questions. -- [Why use this project?](#why-use) -- [What are the project's core values?](#core-values) -- [Why numerical computing in JavaScript?](#numerical-computing-in-javascript) -- [What are the use cases for numerical computing in JavaScript?](#use-cases) -- [Why not use R, Python, or Julia?](#other-languages) -- [Why not exclusively use native add-ons?](#native-add-ons) -- [What about WebAssembly?](#web-assembly) -- [Why reimplement and provide custom Math implementations?](#custom-math-implementations) -- [Why not change the ECMAScript specification to use better Math algorithms?](#ecmascript-math-specification) -- [What can be done at the standards level to better support numerical computing?](#ecmascript-recommendations) -- [Why reimplement module functionality already available on npm?](#reimplementing-existing-packages) -- [Why not submit improvements to existing libraries?](#contributing-to-existing-libraries) -- [Why not aggregate (curate) packages published to npm?](#why-not-curate) -- [Why are built-in JavaScript globals wrapped and imported as packages?](#globals-as-packages) -- [Backward compatibility?](#backward-compatibility) -- [Why use semicolons?](#semicolons) -- [Import support?](#import-support) -- [Promise support?](#promise-support) -- [ES2015 and beyond?](#es2015) -- [Why a monorepo?](#monorepo) -- [Why are library packages in a node_modules directory?](#lib-node-modules) -- [What is meant by saying the project is "decomposable"?](#decomposable-software) -- [How can I support the project?](#supporting) -- [Why contribute?](#why-contribute) -- [How can I contribute?](#contributing) +- [Why use this project?](#why-use) +- [What are the project's core values?](#core-values) +- [Why numerical computing in JavaScript?](#numerical-computing-in-javascript) +- [What are the use cases for numerical computing in JavaScript?](#use-cases) +- [Why not use R, Python, or Julia?](#other-languages) +- [Why not exclusively use native add-ons?](#native-add-ons) +- [What about WebAssembly?](#web-assembly) +- [Why reimplement and provide custom Math implementations?](#custom-math-implementations) +- [Why not change the ECMAScript specification to use better Math algorithms?](#ecmascript-math-specification) +- [What can be done at the standards level to better support numerical computing?](#ecmascript-recommendations) +- [Why reimplement module functionality already available on npm?](#reimplementing-existing-packages) +- [Why not submit improvements to existing libraries?](#contributing-to-existing-libraries) +- [Why not aggregate (curate) packages published to npm?](#why-not-curate) +- [Why are built-in JavaScript globals wrapped and imported as packages?](#globals-as-packages) +- [Backward compatibility?](#backward-compatibility) +- [Why use semicolons?](#semicolons) +- [Import support?](#import-support) +- [Promise support?](#promise-support) +- [ES2015 and beyond?](#es2015) +- [Why a monorepo?](#monorepo) +- [Why are library packages in a node_modules directory?](#lib-node-modules) +- [What is meant by saying the project is "decomposable"?](#decomposable-software) +- [How can I support the project?](#supporting) +- [Why contribute?](#why-contribute) +- [How can I contribute?](#contributing) -* * * +--- @@ -74,11 +74,11 @@ This project 6. increases productivity by: - - deterring reinvention - - accelerating initial development - - reducing bugs - - reducing long-term maintenance costs - - reducing search, evaluation, and quality-control requirements + - deterring reinvention + - accelerating initial development + - reducing bugs + - reducing long-term maintenance costs + - reducing search, evaluation, and quality-control requirements 7. provides standard reference implementations. @@ -88,17 +88,17 @@ This project -* * * +--- ### What are the project's core values? -- **Thoroughness**: implementations should be thorough, including testing, benchmarking, and documentation. Algorithms should be researched, studied, and measured. Taking shortcuts is not acceptable. Attention to detail is highly prized. Code should be written well the first time. -- **Rigor**: development should be rigorous. High-quality code is expected, and authors are expected to strive for excellence. -- **Robustness**: implementations should demonstrate an exhaustive understanding of how they can fail. -- **Approachability**: user-facing APIs and underlying implementations should be approachable. Interfaces should embrace simplicity. Source code should use the simplest primitives. Documentation should be abundant. -- **Integrity**: all aspects of the project—documentation, testing, benchmarking, implementations, tooling—should form a consistent and coherent whole. Code should be of one voice and reflect a single purpose: to write high-quality software. +- **Thoroughness**: implementations should be thorough, including testing, benchmarking, and documentation. Algorithms should be researched, studied, and measured. Taking shortcuts is not acceptable. Attention to detail is highly prized. Code should be written well the first time. +- **Rigor**: development should be rigorous. High-quality code is expected, and authors are expected to strive for excellence. +- **Robustness**: implementations should demonstrate an exhaustive understanding of how they can fail. +- **Approachability**: user-facing APIs and underlying implementations should be approachable. Interfaces should embrace simplicity. Source code should use the simplest primitives. Documentation should be abundant. +- **Integrity**: all aspects of the project—documentation, testing, benchmarking, implementations, tooling—should form a consistent and coherent whole. Code should be of one voice and reflect a single purpose: to write high-quality software. @@ -106,7 +106,7 @@ This project -* * * +--- @@ -123,7 +123,7 @@ This project -* * * +--- @@ -131,42 +131,42 @@ This project Fundamentally, the use cases for numerical and scientific computing in JavaScript are the same as for any other commonly used language for numerical and scientific computation, such as MATLAB, R, Python, and Julia. For example, -- perform some sort of statistical analysis, such as computing summary statistics or hypothesis testing. -- train and apply a statistical model (e.g., assign a probability as to whether `A` has characteristic `B` given an observation `Q`). -- cluster observations into a set of `N` distinct groups. -- determine the similarity of two or more datasets (i.e., can we reasonably distinguish `X` from `Y`?). -- assign a likelihood to unexpected events (i.e., all things being equal, how often should we expect to see a particular outcome were we to repeat our experiment hundreds, thousands or millions of times?). -- perform simulations involving alternative models (e.g., what would the data look like if we change model parameters `a` and `b`?). -- extract key "features" accounting for the most variation in observed values. -- translate text from one language to another. -- generate synthetic speech. -- rank documents according to their relevance (e.g., to build a search engine). -- recognize and classify objects in images (e.g., does image `I` contain a cat or a dog?). -- predict growth and financial returns. -- compute the trajectory of spacecraft and flying objects. -- determine optimal ticket prices and staffing requirements to maximize revenue. -- parse, transform, filter, and aggregate data. -- add, subtract, multiply, and divide numbers. +- perform some sort of statistical analysis, such as computing summary statistics or hypothesis testing. +- train and apply a statistical model (e.g., assign a probability as to whether `A` has characteristic `B` given an observation `Q`). +- cluster observations into a set of `N` distinct groups. +- determine the similarity of two or more datasets (i.e., can we reasonably distinguish `X` from `Y`?). +- assign a likelihood to unexpected events (i.e., all things being equal, how often should we expect to see a particular outcome were we to repeat our experiment hundreds, thousands or millions of times?). +- perform simulations involving alternative models (e.g., what would the data look like if we change model parameters `a` and `b`?). +- extract key "features" accounting for the most variation in observed values. +- translate text from one language to another. +- generate synthetic speech. +- rank documents according to their relevance (e.g., to build a search engine). +- recognize and classify objects in images (e.g., does image `I` contain a cat or a dog?). +- predict growth and financial returns. +- compute the trajectory of spacecraft and flying objects. +- determine optimal ticket prices and staffing requirements to maximize revenue. +- parse, transform, filter, and aggregate data. +- add, subtract, multiply, and divide numbers. In addition to the above, JavaScript has additional use cases by virtue of its being the _lingua franca_ of the web. -- offline computation in web applications (i.e., an entirely client-side machine learning library does not require a network connection in order to execute commands as is the case, e.g., in the [Jupyter][jupyter] notebook computation model). -- rapid prototyping and visualization. -- interactive explanations. +- offline computation in web applications (i.e., an entirely client-side machine learning library does not require a network connection in order to execute commands as is the case, e.g., in the [Jupyter][jupyter] notebook computation model). +- rapid prototyping and visualization. +- interactive explanations. The popularity of Node.js due to its ease-of-use and growing ubiquity in the HTTP networking stack affords Node.js additional use cases such as -- a rapidly prototyped and demo-able Node.js server endpoint which performs natural language processing (NLP) and uses the Amazon Alexa API for a chat bot. -- a serverless application which performs a machine learning computation without needing to install and bundle all of, e.g., Python, [NumPy][numpy], and [SciPy][scipy], thus saving time, money, and resources (all by virtue of Node.js' dominance in serverless cloud offerings, such as AWS Lambda, Google Cloud, and Microsoft Azure). -- browserless model computation done entirely in JavaScript. +- a rapidly prototyped and demo-able Node.js server endpoint which performs natural language processing (NLP) and uses the Amazon Alexa API for a chat bot. +- a serverless application which performs a machine learning computation without needing to install and bundle all of, e.g., Python, [NumPy][numpy], and [SciPy][scipy], thus saving time, money, and resources (all by virtue of Node.js' dominance in serverless cloud offerings, such as AWS Lambda, Google Cloud, and Microsoft Azure). +- browserless model computation done entirely in JavaScript. -While other languages and platforms exist which _may_ be better suited for specific use cases, particularly those requiring bare metal performance or involving massive data sets, when considered in totality, the opinion of this project is that JavaScript (and Node.js) provides a comparable, if not better, environment for numerical and scientific computation than other competitor environments. +While other languages and platforms exist which _may_ be better suited for specific use cases, particularly those requiring bare metal performance or involving massive data sets, when considered in totality, the opinion of this project is that JavaScript (and Node.js) provides a comparable, if not better, environment for numerical and scientific computation than other competitor environments. -* * * +--- @@ -185,13 +185,13 @@ You should use JavaScript because 9. **Community**: you want to leverage the continually growing JavaScript and Node.js community. JavaScript has one of the [largest][stackoverflow-developer-survey] and most diverse developer [ecosystems][stackoverflow-developer-survey]. Using JavaScript means greater access to help, expertise, and resources, including tutorials, workshops, and education materials. 10. **Visualization**: you want tighter integration between computation and data visualization. Other languages require intermediary layers to translate computational results into visual artifacts. These layers often involve network requests, longer latency, and increased complexity. Using JavaScript for numerical computation removes the need for intermediaries, allowing immediate and more transparent integration between computation and visualization. 11. **Mad science**: you are interested in mad science applications. Certain applications are only possible in JavaScript due to tight integration between the language and web APIs (e.g., client-based peer-to-peer distributed computing). -12. **Future**: you want to be part of the future: a future where numerical and scientific computation in JavaScript is not only possible, but also inevitable. +12. **Future**: you want to be part of the future: a future where numerical and scientific computation in JavaScript is not only possible, but also inevitable. -* * * +--- @@ -200,7 +200,7 @@ You should use JavaScript because Native [add-ons][node-add-ons] have several disadvantages: 1. **Maintenance**: historically, native [add-ons][node-add-ons] have entailed considerable maintenance costs. Due to a rapidly changing V8 API and a V8 development approach which does not prioritize backward compatibility, each successive Node.js version required rewriting native [add-ons][node-add-ons] to accommodate breaking changes. To address initially this problem, the Native Abstractions for Node.js project ([NAN][node-nan]) provided a V8 API abstraction layer which [add-ons][node-add-ons] could target, thus allowing an [add-on][node-add-ons] to maintain compatibility between Node.js versions. While [NAN][node-nan] did reduce maintenance costs, costs were not entirely eliminated. [NAN][node-nan] has been superseded by an [ABI stable API][node-napi] (N-API), which provides a similar abstraction layer but also across VMs (e.g., V8 and Chakra). While N-API significantly reduces native add-on maintenance burden, that burden is not zero. -2. **Portability**: the primary means for building native [add-ons][node-add-ons] is [node-gyp][node-gyp], a tool which wraps [GYP][gyp] (a deprecated build tool formerly used by the Chromium team) and aims to provide a cross-platform approach for compiling Node.js native [add-ons][node-add-ons]. While [GYP][gyp] is suitable for many native [add-on][node-add-ons] use cases, the tool is less well-suited for building numerical and scientific computing libraries. In particular, [GYP][gyp] is primarily oriented toward compiling C/C++ libraries and applications. This orientation is problematic because numerical computing libraries often require the ability to not only compile C/C++, but also Fortran, CUDA, and other compiled languages. On Linux systems, [GYP][gyp] can leverage the GNU compiler toolchain, including [gfortran][gfortran]; however, [node-gyp][node-gyp]'s reliance on Microsoft Visual Studio (MSVS) [prevents][msvs-fortran-issue] compiling [add-ons][node-add-ons] containing Fortran code on Windows. Furthermore, building [add-ons][node-add-ons] on Windows requires installing Windows [build tools][node-windows-build-tools], and, currently, the [recommended][node-windows-build-tools] means of installation is not backward compatible with Node.js environments prior to version `4`. Lastly, while pre-building binaries is one way to circumvent compilation and portability issues, cross-compilation is neither straightforward nor foolproof and does not obviate the need for portable compilation (see debugging below). +2. **Portability**: the primary means for building native [add-ons][node-add-ons] is [node-gyp][node-gyp], a tool which wraps [GYP][gyp] (a deprecated build tool formerly used by the Chromium team) and aims to provide a cross-platform approach for compiling Node.js native [add-ons][node-add-ons]. While [GYP][gyp] is suitable for many native [add-on][node-add-ons] use cases, the tool is less well-suited for building numerical and scientific computing libraries. In particular, [GYP][gyp] is primarily oriented toward compiling C/C++ libraries and applications. This orientation is problematic because numerical computing libraries often require the ability to not only compile C/C++, but also Fortran, CUDA, and other compiled languages. On Linux systems, [GYP][gyp] can leverage the GNU compiler toolchain, including [gfortran][gfortran]; however, [node-gyp][node-gyp]'s reliance on Microsoft Visual Studio (MSVS) [prevents][msvs-fortran-issue] compiling [add-ons][node-add-ons] containing Fortran code on Windows. Furthermore, building [add-ons][node-add-ons] on Windows requires installing Windows [build tools][node-windows-build-tools], and, currently, the [recommended][node-windows-build-tools] means of installation is not backward compatible with Node.js environments prior to version `4`. Lastly, while pre-building binaries is one way to circumvent compilation and portability issues, cross-compilation is neither straightforward nor foolproof and does not obviate the need for portable compilation (see debugging below). 3. **Web browsers**: native [add-ons][node-add-ons] are not compatible with or portable to web browsers. ([WebAssembly][wasm] will not change this fact.) 4. **Complexity**: compilation presupposes the existence of compilers (e.g., [gfortran][gfortran]) and other tooling in order to successfully compile, thus often requiring out-of-band installation, setup, and configuration. In short, compilation increases complexity and increases the risk that something can and will go wrong. 5. **Development**: native Node.js [add-ons][node-add-ons] require significant upfront development costs compared to porting implementations to JavaScript. Creating a native [add-on][node-add-ons] entails more than writing a simple wrapper around an existing C/C++ library; the process involves additional tooling, testing, and development procedures, all requiring time and effort. These costs are acutely apparent during iteration cycles targeting multiple platforms. In comparison, as a higher-level language, JavaScript facilitates faster development, has built-in portability, and has minimized performance costs. @@ -213,7 +213,7 @@ Despite the disadvantages articulated above, this project **does** include Node. -* * * +--- @@ -234,7 +234,7 @@ Despite the disadvantages articulated above, this project **does** include Node. -* * * +--- @@ -250,7 +250,7 @@ Despite the disadvantages articulated above, this project **does** include Node. -* * * +--- @@ -258,9 +258,9 @@ Despite the disadvantages articulated above, this project **does** include Node. Common arguments in support of changing the official ECMAScript specification: -- **standards**: everyone benefits from using common implementations. -- **network**: more and better built-ins translates to smaller bundles and thus decreased network costs. -- **evergreen**: improving built-ins means existing codebases using built-ins get "upgraded" (and patched) for free. +- **standards**: everyone benefits from using common implementations. +- **network**: more and better built-ins translates to smaller bundles and thus decreased network costs. +- **evergreen**: improving built-ins means existing codebases using built-ins get "upgraded" (and patched) for free. On the surface, the above arguments seem compelling. They fail, however, to recognize the rather messy reality of JavaScript applications and originate from a misunderstanding as to how JavaScript is implemented and practiced today. @@ -272,13 +272,13 @@ The reasons are as follows: -1. **underspecified standard**: the ECMAScript specification for the standard Math library is underspecified, but not without merit. Namely, underspecification allows those implementing the specification to make trade-offs between speed and accuracy. Were the specification to mandate a particular algorithm, e.g., for `Math.sin`, implementers would be locked into **always** using a particular implementation. Especially for special functions, different algorithms will yield different results under varying conditions. Thus, to change an underlying algorithm would mean to break backward compatibility. By not committing themselves to any hard backward compatibility constraints, implementors maintain a degree of flexibility, including the ability to use algorithms which cater to a particular user base (gaming versus numerical computing). In which case, underspecification has advantages. +1. **underspecified standard**: the ECMAScript specification for the standard Math library is underspecified, but not without merit. Namely, underspecification allows those implementing the specification to make trade-offs between speed and accuracy. Were the specification to mandate a particular algorithm, e.g., for `Math.sin`, implementers would be locked into **always** using a particular implementation. Especially for special functions, different algorithms will yield different results under varying conditions. Thus, to change an underlying algorithm would mean to break backward compatibility. By not committing themselves to any hard backward compatibility constraints, implementors maintain a degree of flexibility, including the ability to use algorithms which cater to a particular user base (gaming versus numerical computing). In which case, underspecification has advantages. 2. **cross-browser variability**: an underspecified standard, however, has disadvantages. Because implementors are free to choose underlying algorithms, relying exclusively on built-in Math functionality renders portability across more than one environment impossible. Even if all implementors happened to use the same underlying algorithm, a developer cannot, _a priori_, **guarantee** or assume that only one algorithm is implemented. The default assumption must be: _if more than one algorithm can exist, more than one algorithm will exist_. 3. **no single codebase**: unlike other standard libraries (e.g., Golang, Python, Julia, etc), JavaScript does not have a single shared codebase. Each browser manufacturer has their own implementation and independent codebase with varying architecture and organization. More fundamentally, a common _implementation_ does **not** exist; only common _interfaces_ exist. Thus, a developer wanting to write a numerical application must navigate and understand multiple sources of truth. Such expenditures incur significant overhead, especially when wanting to file issues, submit patches, or standardize a particular algorithm. For example, a patch in Chrome does not translate to a patch in all other web browsers. Because each implementor is free to erect a protected castle, those writing numerical algorithms are resigned to treating the standard Math library as a black box and must always cater to the lowest common denominator (which is often the empirically determined slowest and/or least precise algorithm). -4. **versioning**: a developer does not have the freedom to choose which version of a particular algorithm she is given. In an "evergreen" environment, her application is only guaranteed a consistent interface, not an underlying implementation. Each background update may influence results in subtle ways and introduce bugs and unforeseen variability. A developer relying exclusively on standard library built-ins cannot assume reproducibility upon relaunching a browser. Thus, not only is cross-browser portability problematic, but same-browser-different-version portability is problematic. +4. **versioning**: a developer does not have the freedom to choose which version of a particular algorithm she is given. In an "evergreen" environment, her application is only guaranteed a consistent interface, not an underlying implementation. Each background update may influence results in subtle ways and introduce bugs and unforeseen variability. A developer relying exclusively on standard library built-ins cannot assume reproducibility upon relaunching a browser. Thus, not only is cross-browser portability problematic, but same-browser-different-version portability is problematic. 5. **required shims**: because no common codebase exists and implementors make mistakes, application developers are dependent on shims (i.e., libraries which ensure consistent implementations across browsers, provide missing built-in functionality, and patch bugs). The issue here, of course, is that, if an application developer must supply a shim, reduced network cost due to the presence of built-ins is non-existent: an implementation is sent over the network regardless in order to patch a possibly buggy environment. While a developer could use browser sniffing and HTTP2 to lazily load patches, such practices incur a performance cost. Accordingly, if an implementation is sent irrespective of whether an environment provides an implementation natively, why does an environment need to guarantee the existence of an implementation in the first place? @@ -304,7 +304,7 @@ Based on the reasons above, Math is fundamentally broken at the standards and im -* * * +--- @@ -340,9 +340,9 @@ NOTE: addressed by BigInt 1. **Typed objects**: add support for [typed objects][typed-objects-proposal]. Typed objects would facilitate efficient memory storage of data, which is critical for [performant][five-things-that-make-go-fast] numerical computations. In short, - - typed objects allow compact data structures and avoid unnecessary indirection - - typed objects enable better cache utilization - - better cache utilization leads to better performance + - typed objects allow compact data structures and avoid unnecessary indirection + - typed objects enable better cache utilization + - better cache utilization leads to better performance Complex numbers are a prime example where typed objects would be immensely valuable. Particularly for complex vector arrays, the ability to access adjacent memory locations would result in significant performance benefits. @@ -372,36 +372,36 @@ NOTE: see https://nodejs.org/api/worker_threads.html -* * * +--- ### Why reimplement module functionality already available on npm? -- **Consistency**: package structure, documentation, testing, and code style vary widely, often as artifacts of author taste and eccentricities. By adhering to a single style, library consumers can focus on implementation details, rather than continual and arbitrary style distractions. -- **Quality**: packages range from extremely high quality to extremely poor quality, with the distribution of packages skewed toward the latter end of the spectrum. Any reimplementation of existing package functionality is done to ensure the same high standard and quality across all project modules. -- **Control**: bringing functionality "in-house" enables control of release cycles, testing, distribution, interface design, and API changes. +- **Consistency**: package structure, documentation, testing, and code style vary widely, often as artifacts of author taste and eccentricities. By adhering to a single style, library consumers can focus on implementation details, rather than continual and arbitrary style distractions. +- **Quality**: packages range from extremely high quality to extremely poor quality, with the distribution of packages skewed toward the latter end of the spectrum. Any reimplementation of existing package functionality is done to ensure the same high standard and quality across all project modules. +- **Control**: bringing functionality "in-house" enables control of release cycles, testing, distribution, interface design, and API changes. -* * * +--- ### Why not submit improvements to existing libraries? -- **Rewrites**: often, the project's approach and implementation improvements would require a drastic shift in how existing libraries are written. In some cases, incorporating changes would require completely rewriting one or more libraries. And if a rewrite is necessary, a rewritten library differs from a separate implementation in name only. -- **Bandwidth**: the demands of the project mean that core project authors do not have the time or resources to both develop the project and actively contribute to any and all existing libraries which might benefit from this project's implementation improvements. In an ideal world, any insights, bug fixes, and improved algorithms included in this project would be pushed to external community libraries; however, the project lacks the bandwidth to do so. As this project is open source, authors of community libraries are encouraged to track project development. If someone wants to take this project's implementation improvements and incorporate them elsewhere, she is free to do so (_subject to the project license_), but this is **not** something the project can actively pursue. -- **Opportunity cost**: while the project may benefit from engaging with authors of existing libraries in terms of knowledge transfer and insight, such efforts entail risk (no guarantee efforts will lead to library inclusion or achieve intended aim) and real costs (allocated time), and, as such, the opportunity cost (along with maintenance burden) of _pushing_ changes to external community libraries is too great. -- **Priorities**: given the project's rather strong opinions, there exists a strong possibility of endless developer debate (and bikeshedding) when pushing changes to external community libraries. The more time spent in debate, the less time allocated to project development. In general, this project is biased toward focusing attention on those aspects over which project authors have most control and which can best facilitate development efficiency. +- **Rewrites**: often, the project's approach and implementation improvements would require a drastic shift in how existing libraries are written. In some cases, incorporating changes would require completely rewriting one or more libraries. And if a rewrite is necessary, a rewritten library differs from a separate implementation in name only. +- **Bandwidth**: the demands of the project mean that core project authors do not have the time or resources to both develop the project and actively contribute to any and all existing libraries which might benefit from this project's implementation improvements. In an ideal world, any insights, bug fixes, and improved algorithms included in this project would be pushed to external community libraries; however, the project lacks the bandwidth to do so. As this project is open source, authors of community libraries are encouraged to track project development. If someone wants to take this project's implementation improvements and incorporate them elsewhere, she is free to do so (_subject to the project license_), but this is **not** something the project can actively pursue. +- **Opportunity cost**: while the project may benefit from engaging with authors of existing libraries in terms of knowledge transfer and insight, such efforts entail risk (no guarantee efforts will lead to library inclusion or achieve intended aim) and real costs (allocated time), and, as such, the opportunity cost (along with maintenance burden) of _pushing_ changes to external community libraries is too great. +- **Priorities**: given the project's rather strong opinions, there exists a strong possibility of endless developer debate (and bikeshedding) when pushing changes to external community libraries. The more time spent in debate, the less time allocated to project development. In general, this project is biased toward focusing attention on those aspects over which project authors have most control and which can best facilitate development efficiency. -* * * +--- @@ -409,19 +409,19 @@ NOTE: see https://nodejs.org/api/worker_threads.html This project chose to centralize project development and to forgo aggregation/curation for the following reasons: -- **Security**: centralized development facilitates security patches and updates. In a distributed aggregation development model, patching security vulnerabilities is subject to increased lag and errors, both in terms of communication and resolution. -- **Control**: an aggregation model depends on a pull request development cycle, and the model's success depends on developer responsiveness. The latter is by no means guaranteed and resides outside the project's control. -- **Immediacy**: no additional tooling is needed for notification of source changes. As all development happens on a single source repository, changes are persisted in the commit history, facilitating code archeology and providing an embedded mechanism for both pushing and pulling change notifications. -- **History**: no additional tooling is needed to aggregate and compile a centralized history (changelog) for communicating changes included in a particular release. The ability to even generate a changelog in an aggregation model assumes codification and adoption of, e.g., a particular commit style, which, given significant variation in developer attitude, tastes, and willingness to adopt any one style, is unrealistic. -- **Search**: performing a code search is significantly more difficult in an aggregation model, especially given inevitable variation in style and naming conventions. -- **Continuous integration**: a centralized development model greatly facilitates testing whether changes in one part of the project affect other parts of the project. Feedback for external effects is more immediate and does not require propagation through a disperse network of curated libraries, each with independently managed build environments and configurations. -- **Testing**: a centralized development model better facilitates test coverage metrics, making a clearer delineation between project and external code. -- **Tooling**: an aggregation model cannot as readily leverage project tooling for testing, benchmarking, and documentation generation. Furthermore, requiring aggregated libraries to use project tooling would mean a significant amount of code redundancy, as each library would need to independently install and manage project tooling. Centralized development thus minimizes disk usage and redundancy. -- **Development efficiency**: centralized development enables efficiencies for refactoring and propagating changes which are not possible (without significant time and resources) in an aggregation model. While, in theory, a decentralized aggregation model distributes **initial** development work/costs across multiple developers, the model is not particularly efficient in distributing maintenance costs across those same (or even different) developers. While a centralized development model _may_ incur a greater **initial** development cost, maintenance costs (e.g., communication overhead, propagation of changes, et cetera) are considerably less. In short, centralized development helps unlock efficiencies of scale. -- **Operational efficiency**: from a practical standpoint, an aggregation model, by definition, means significantly longer installation times due to the need for the many HTTP requests which would be required to build an aggregated library. -- **Reproducibility**: in a centralized development model, project development always happens on (more or less) the "latest" code. In an aggregation model, which by definition involves dependencies, local development versions can vary significantly due to old/stale node modules and other dependencies. Accordingly, in a centralized model, reproducibility is streamlined (e.g., a `git pull` is faster than `npm clean && npm install`). -- **Source of truth**: a centralized development model allows operating on a single source of truth, while an aggregation model requires a search path involving two or more dispersed resources, thus incurring increased search and communication costs. -- **Integrity**: a centralized development model helps ensure project integrity. An aggregation model cannot guarantee that aggregated packages will not "drift" in terms of style, organization, tooling, and, most importantly, **quality**. +- **Security**: centralized development facilitates security patches and updates. In a distributed aggregation development model, patching security vulnerabilities is subject to increased lag and errors, both in terms of communication and resolution. +- **Control**: an aggregation model depends on a pull request development cycle, and the model's success depends on developer responsiveness. The latter is by no means guaranteed and resides outside the project's control. +- **Immediacy**: no additional tooling is needed for notification of source changes. As all development happens on a single source repository, changes are persisted in the commit history, facilitating code archeology and providing an embedded mechanism for both pushing and pulling change notifications. +- **History**: no additional tooling is needed to aggregate and compile a centralized history (changelog) for communicating changes included in a particular release. The ability to even generate a changelog in an aggregation model assumes codification and adoption of, e.g., a particular commit style, which, given significant variation in developer attitude, tastes, and willingness to adopt any one style, is unrealistic. +- **Search**: performing a code search is significantly more difficult in an aggregation model, especially given inevitable variation in style and naming conventions. +- **Continuous integration**: a centralized development model greatly facilitates testing whether changes in one part of the project affect other parts of the project. Feedback for external effects is more immediate and does not require propagation through a disperse network of curated libraries, each with independently managed build environments and configurations. +- **Testing**: a centralized development model better facilitates test coverage metrics, making a clearer delineation between project and external code. +- **Tooling**: an aggregation model cannot as readily leverage project tooling for testing, benchmarking, and documentation generation. Furthermore, requiring aggregated libraries to use project tooling would mean a significant amount of code redundancy, as each library would need to independently install and manage project tooling. Centralized development thus minimizes disk usage and redundancy. +- **Development efficiency**: centralized development enables efficiencies for refactoring and propagating changes which are not possible (without significant time and resources) in an aggregation model. While, in theory, a decentralized aggregation model distributes **initial** development work/costs across multiple developers, the model is not particularly efficient in distributing maintenance costs across those same (or even different) developers. While a centralized development model _may_ incur a greater **initial** development cost, maintenance costs (e.g., communication overhead, propagation of changes, et cetera) are considerably less. In short, centralized development helps unlock efficiencies of scale. +- **Operational efficiency**: from a practical standpoint, an aggregation model, by definition, means significantly longer installation times due to the need for the many HTTP requests which would be required to build an aggregated library. +- **Reproducibility**: in a centralized development model, project development always happens on (more or less) the "latest" code. In an aggregation model, which by definition involves dependencies, local development versions can vary significantly due to old/stale node modules and other dependencies. Accordingly, in a centralized model, reproducibility is streamlined (e.g., a `git pull` is faster than `npm clean && npm install`). +- **Source of truth**: a centralized development model allows operating on a single source of truth, while an aggregation model requires a search path involving two or more dispersed resources, thus incurring increased search and communication costs. +- **Integrity**: a centralized development model helps ensure project integrity. An aggregation model cannot guarantee that aggregated packages will not "drift" in terms of style, organization, tooling, and, most importantly, **quality**. **Aside**: in the long arc of history for this project, prior to the current project iteration, an aggregation model was both explored and even pursued. The reasons outlined above find their origin in that (often painful) experience. @@ -429,7 +429,7 @@ This project chose to centralize project development and to forgo aggregation/cu -* * * +--- @@ -451,7 +451,7 @@ This project has every intent on maintaining backward compatibility with older N -* * * +--- @@ -471,7 +471,7 @@ In general, a core belief of this project is that **all** functionality **should -* * * +--- @@ -489,7 +489,7 @@ For the following reasons: -* * * +--- @@ -513,7 +513,7 @@ Tree shaking (i.e., removing unused symbols) treats the symptom, not the disease -* * * +--- @@ -525,7 +525,7 @@ Promise support is planned. Help providing promise support, including implementi -* * * +--- @@ -539,34 +539,34 @@ Only **if** three conditions are met: The reasons are as follows: -- **Abstraction**: in general, the lower the abstraction, the less magic. Less magic means increased comprehensibility, a smaller surface area, and more control over performance and optimization. Many ES2015+ features are higher-order abstractions for things already possible in ES5. The preference of this project is to eschew higher-order abstractions for the simplest primitives and the greatest clarity. -- **Control**: unless a transpiler is developed in-house, transpilation requires third party tooling. Transpilers range from the good to the bad, with many generating unoptimized transpiled code. (And why would they? They are designed to be general tools.) Accordingly, efficiency and performance would reside outside the control of this project, which is not an acceptable cost. -- **Backward Compatibility**: the ability to probe the past is equally as valuable as the ability to build for the future. -- **Transparency**: source code matches distributed code. This one-to-one correspondence means a) easier debugging without maintenance overhead (e.g., source-maps) and b) individuals reading the source code can better form expectations as to how that code will execute in a deployed environment. -- **Simplicity**: any additional interface, syntax, or build step adds complexity. +- **Abstraction**: in general, the lower the abstraction, the less magic. Less magic means increased comprehensibility, a smaller surface area, and more control over performance and optimization. Many ES2015+ features are higher-order abstractions for things already possible in ES5. The preference of this project is to eschew higher-order abstractions for the simplest primitives and the greatest clarity. +- **Control**: unless a transpiler is developed in-house, transpilation requires third party tooling. Transpilers range from the good to the bad, with many generating unoptimized transpiled code. (And why would they? They are designed to be general tools.) Accordingly, efficiency and performance would reside outside the control of this project, which is not an acceptable cost. +- **Backward Compatibility**: the ability to probe the past is equally as valuable as the ability to build for the future. +- **Transparency**: source code matches distributed code. This one-to-one correspondence means a) easier debugging without maintenance overhead (e.g., source-maps) and b) individuals reading the source code can better form expectations as to how that code will execute in a deployed environment. +- **Simplicity**: any additional interface, syntax, or build step adds complexity. -* * * +--- ### Why a monorepo? -- **Tooling**: a monorepo facilitates better and more extensive tooling related to actual development. A polyrepo approach requires more tooling orthogonal to development, such as tooling for aggregation and maintaining repository consistency. -- **Dependencies**: a monorepo enables easier management of project dependencies, particularly development dependencies related to testing and automation. -- **Coordination**: a monorepo facilitates coordination of changes across multiple modules and/or an entire project. -- **Issues**: a monorepo centralizes issues and bug reporting. Managing and tracking issues and bug reports across many repositories is time consuming and error prone. -- **Testing**: a monorepo drastically simplifies continuous, automated testing. Integration testing across multiple repositories requires extensive tooling, which distracts from core library development. Further, individual repositories are frequently tested only when a change happens to code within **that** repository, which means that bugs caused by changes to other project repositories are caught after-the-fact, rather than pro-actively via continuous testing. -- **Context**: a monorepo provides a single entry point and context by which new and existing users can access the project. In a polyrepo approach, new and existing users often lack the required context to understand how an individual repository fits within a larger project. +- **Tooling**: a monorepo facilitates better and more extensive tooling related to actual development. A polyrepo approach requires more tooling orthogonal to development, such as tooling for aggregation and maintaining repository consistency. +- **Dependencies**: a monorepo enables easier management of project dependencies, particularly development dependencies related to testing and automation. +- **Coordination**: a monorepo facilitates coordination of changes across multiple modules and/or an entire project. +- **Issues**: a monorepo centralizes issues and bug reporting. Managing and tracking issues and bug reports across many repositories is time consuming and error prone. +- **Testing**: a monorepo drastically simplifies continuous, automated testing. Integration testing across multiple repositories requires extensive tooling, which distracts from core library development. Further, individual repositories are frequently tested only when a change happens to code within **that** repository, which means that bugs caused by changes to other project repositories are caught after-the-fact, rather than pro-actively via continuous testing. +- **Context**: a monorepo provides a single entry point and context by which new and existing users can access the project. In a polyrepo approach, new and existing users often lack the required context to understand how an individual repository fits within a larger project. -* * * +--- @@ -577,7 +577,7 @@ This project leverages the Node.js module resolution [algorithm][node-require] t ```javascript -var foo = require( './../../../../../@stdlib/foo' ); +var foo = require("./../../../../../@stdlib/foo"); ``` becomes @@ -585,7 +585,7 @@ becomes ```javascript -var foo = require( '@stdlib/foo' ); +var foo = require("@stdlib/foo"); ``` In general, far too many developers are oblivious to the module resolution [algorithm][node-require], often resorting to various unnecessary hacks, such as setting environment variables (e.g., `NODE_PATH`), using globals, creating symbolic links (symlink), using `require` wrappers, running startup scripts, or actually hacking `require` itself (see [here][modifying-node-path-hack] and [here][list-of-require-hacks] as representative references). A superior approach is to leverage the module resolution [algorithm][node-require] to scope internal packages to their relevant context. For example, consider the following application directory structure @@ -667,11 +667,11 @@ where `g.js` ```javascript -var beep = require( 'beep' ); -var debug = require( 'debug' ); -var get = require( 'db-get' ); -var transform = require( 'transform' ); -var h = require( './h.js' ); +var beep = require("beep"); +var debug = require("debug"); +var get = require("db-get"); +var transform = require("transform"); +var h = require("./h.js"); // ... ``` @@ -691,7 +691,7 @@ In short, the module resolution [algorithm][node-require] provides a simple and -* * * +--- @@ -715,7 +715,7 @@ While development happens on a single repository (i.e., a monorepo), the larger -* * * +--- @@ -723,15 +723,15 @@ While development happens on a single repository (i.e., a monorepo), the larger You can support the project by -- contributing algorithms and implementations -- adding tests and benchmarks -- helping improve documentation and examples -- using the project and offering feedback -- filing bug reports and flagging performance regressions -- advocating for standards committees to add features at the specification level to better enable numerical computing in JavaScript -- helping promote the project on social media, at your company, and within your networks -- providing build and infrastructure support -- providing financial support ([Open Collective][open-collective-stdlib]) +- contributing algorithms and implementations +- adding tests and benchmarks +- helping improve documentation and examples +- using the project and offering feedback +- filing bug reports and flagging performance regressions +- advocating for standards committees to add features at the specification level to better enable numerical computing in JavaScript +- helping promote the project on social media, at your company, and within your networks +- providing build and infrastructure support +- providing financial support ([Open Collective][open-collective-stdlib]) If you have additional ideas, get in touch, and we'll do our best to help! @@ -739,7 +739,7 @@ If you have additional ideas, get in touch, and we'll do our best to help! -* * * +--- @@ -747,12 +747,12 @@ If you have additional ideas, get in touch, and we'll do our best to help! You should contribute -- if you want to write high-quality software -- if you want to learn underlying algorithms -- if you want to learn how to write rigorous and robust implementations -- if you want to bring numerical and scientific computing to JavaScript and the Web -- if you want to be part of a dedicated, supportive, and inclusive community -- if you believe in what we are doing and want to be a part of it :) +- if you want to write high-quality software +- if you want to learn underlying algorithms +- if you want to learn how to write rigorous and robust implementations +- if you want to bring numerical and scientific computing to JavaScript and the Web +- if you want to be part of a dedicated, supportive, and inclusive community +- if you believe in what we are doing and want to be a part of it :) Reach out, get in touch, and we'll be happy to get you started! @@ -760,7 +760,7 @@ Reach out, get in touch, and we'll be happy to get you started! -* * * +--- @@ -775,43 +775,24 @@ See the [contributing guide][contributing-guide]. [dom]: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model - [canvas]: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API - [webgl]: https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API - [gpgpu]: https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units - [compute-shaders]: https://www.khronos.org/opengl/wiki/Compute_Shader - [vulkan]: https://www.khronos.org/vulkan/ - [shiny]: http://shiny.rstudio.com/ - [bokeh]: http://bokeh.pydata.org/en/latest/ - [plotly]: https://plot.ly/matlab/ - [stackoverflow-developer-survey]: http://stackoverflow.com/research/developer-survey-2016 - [module-counts]: http://www.modulecounts.com/ - [node-fortune-500]: https://nodejs.org/en/blog/announcements/foundation-advances-growth/ - [javascript-ubiquity]: https://blog.codinghorror.com/javascript-the-lingua-franca-of-the-web/ - [cylon-js]: https://github.com/hybridgroup/cylon/ - [iot-js]: https://github.com/Samsung/iotjs - [jerryscript]: https://github.com/Samsung/jerryscript - [johnny-five]: https://github.com/rwaldron/johnny-five - [virtualenvs]: http://docs.python-guide.org/en/latest/dev/virtualenvs/ - [npm]: https://www.npmjs.com/ - [mdn-math]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math [built-in-math-bugs]: https://github.com/stdlib-js/stdlib/blob/develop/docs/misc/built_in_math_bugs.md - [contributing-guide]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md - [wasm]: https://github.com/WebAssembly/spec/ - [asm]: http://asmjs.org/spec/latest/ - [gyp]: https://gyp.gsrc.io/ - [gfortran]: https://gcc.gnu.org/fortran/ - [msvs-fortran-issue]: https://github.com/nodejs/node-gyp/issues/1102 - [numpy]: https://numpy.org/ - [scipy]: https://www.scipy.org/scipylib/index.html - [scikit-learn]: http://scikit-learn.org/stable/ - [jupyter]: http://jupyter.org/ - [semver]: http://semver.org/ - [node-release]: https://github.com/nodejs/Release - [node-add-ons]: https://nodejs.org/api/addons.html - [node-nan]: https://github.com/nodejs/nan - [node-gyp]: https://github.com/nodejs/node-gyp - [node-windows-build-tools]: https://github.com/felixrieseberg/windows-build-tools - [node-napi]: https://github.com/nodejs/abi-stable-node/ - [node-require]: https://nodejs.org/api/modules.html [modifying-node-path-hack]: https://lostechies.com/derickbailey/2014/02/20/how-i-work-around-the-require-problem-in-nodejs/ - [list-of-require-hacks]: https://gist.github.com/branneman/8048520 - [ecma-262]: http://www.ecma-international.org/publications/standards/Ecma-262.htm - [ecma-262-array-length]: http://www.ecma-international.org/ecma-262/6.0/#sec-arraycreate - [ecma-262-tolength]: http://www.ecma-international.org/ecma-262/6.0/#sec-tolength - [ecma-262-asi]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.9 [golang-big]: https://golang.org/pkg/math/big/ - [julia-bigint]: http://docs.julialang.org/en/stable/stdlib/numbers/?highlight=bigfloat#Base.BigInt - [julia-bigfloat]: http://docs.julialang.org/en/stable/stdlib/numbers/?highlight=bigfloat#Base.BigFloat [mozilla-simd]: https://hacks.mozilla.org/2014/10/introducing-simd-js/ - [ecmascript-simd]: https://github.com/tc39/ecmascript_simd/ - [five-things-that-make-go-fast]: http://dave.cheney.net/2014/06/07/five-things-that-make-go-fast - [typed-objects-proposal]: https://github.com/dslomov/typed-objects-es7 - [typed-objects-explainer]: https://github.com/nikomatsakis/typed-objects-explainer - [operator-overloading]: https://en.wikipedia.org/wiki/Operator_overloading -* * * +--- @@ -68,95 +68,95 @@ Thank you for being a part of our community! Your support is invaluable to us! ## Resources -- [**Installation**](#installation) -- [**Homepage**][stdlib-homepage] -- [**Documentation**][stdlib-documentation] -- [**Source code**][stdlib-source] -- [**Code coverage**][stdlib-code-coverage] -- [**FAQ**][stdlib-faq] +- [**Installation**](#installation) +- [**Homepage**][stdlib-homepage] +- [**Documentation**][stdlib-documentation] +- [**Source code**][stdlib-source] +- [**Code coverage**][stdlib-code-coverage] +- [**FAQ**][stdlib-faq] ### External Resources -- [**Google Calendar**][stdlib-public-calendar]: calendar of public events, including [open office hours][stdlib-office-hours]. -- [**Open Collective**][open-collective-stdlib]: financially support the project. -- [**Twitter**][stdlib-twitter]: follow us on social media. -- [**Gitter**][stdlib-gitter]: chat with project maintainers and other community members. +- [**Google Calendar**][stdlib-public-calendar]: calendar of public events, including [open office hours][stdlib-office-hours]. +- [**Open Collective**][open-collective-stdlib]: financially support the project. +- [**Twitter**][stdlib-twitter]: follow us on social media. +- [**Gitter**][stdlib-gitter]: chat with project maintainers and other community members. ## Features -- 150+ [special math functions][@stdlib/math/base/special]. +- 150+ [special math functions][@stdlib/math/base/special].
Demo showcasing special math functions
-- 35+ [probability distributions][@stdlib/stats/base/dists], with support for evaluating probability density functions (PDFs), cumulative distribution functions (CDFs), quantiles, moments, and more. +- 35+ [probability distributions][@stdlib/stats/base/dists], with support for evaluating probability density functions (PDFs), cumulative distribution functions (CDFs), quantiles, moments, and more.
Demo showcasing probability distributions
-- 40+ [seedable pseudorandom number generators][@stdlib/random/base] (PRNGs). +- 40+ [seedable pseudorandom number generators][@stdlib/random/base] (PRNGs).
Demo showcasing PRNGs
-- 200+ general [utilities][@stdlib/utils] for data transformation, functional programming, and asynchronous control flow. +- 200+ general [utilities][@stdlib/utils] for data transformation, functional programming, and asynchronous control flow.
Demo showcasing general utilities
-- 200+ [assertion utilities][@stdlib/assert] for data validation and feature detection. +- 200+ [assertion utilities][@stdlib/assert] for data validation and feature detection.
Demo showcasing assertion utilities
-- 50+ [sample datasets][@stdlib/datasets] for testing and development. +- 50+ [sample datasets][@stdlib/datasets] for testing and development.
Demo showcasing sample datasets
-- A [plot API][@stdlib/plot/ctor] for data visualization and exploratory data analysis. +- A [plot API][@stdlib/plot/ctor] for data visualization and exploratory data analysis.
Demo showcasing plot API
-- Native add-ons for interfacing with BLAS libraries, with pure JavaScript fallbacks. +- Native add-ons for interfacing with BLAS libraries, with pure JavaScript fallbacks.
Demo showcasing BLAS APIs
-- A [benchmark framework][@stdlib/bench/harness] supporting TAP. +- A [benchmark framework][@stdlib/bench/harness] supporting TAP.
Demo showcasing benchmark framework
-- REPL environment with integrated help and examples. +- REPL environment with integrated help and examples.
Demo showcasing REPL environment
-- Can be bundled using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers. +- Can be bundled using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers.
Demo showcasing browser support
-- Every function is accompanied by [TypeScript][typescript] declaration files, ensuring type safety and facilitating intelligent code completion in IDEs. +- Every function is accompanied by [TypeScript][typescript] declaration files, ensuring type safety and facilitating intelligent code completion in IDEs.
Demo showcasing TypeScript declaration files
-* * * +--- ## Installation @@ -166,61 +166,61 @@ While this project's installation instructions defaults to using [npm][npm] for ### User Stories -- I want to perform **data analysis** and **data science** tasks in JavaScript and Node.js, similar to how I might use Python, Julia, R, and MATLAB. +- I want to perform **data analysis** and **data science** tasks in JavaScript and Node.js, similar to how I might use Python, Julia, R, and MATLAB. - - Install the entire project as a [command-line utility](#install_command_line_utility). + - Install the entire project as a [command-line utility](#install_command_line_utility). -- I am building a **web application**. +- I am building a **web application**. - - I plan on using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers. + - I plan on using [Browserify][browserify], [Webpack][webpack], and other bundlers for use in web browsers. - - Install [individual packages](#install_individual_packages). Installing the entire project is likely unnecessary and will lead to slower installation times. + - Install [individual packages](#install_individual_packages). Installing the entire project is likely unnecessary and will lead to slower installation times. - - I would like to **vendor** a custom bundle containing various stdlib functionality. + - I would like to **vendor** a custom bundle containing various stdlib functionality. - - Follow the steps for creating [custom bundles](#install_custom_bundles). + - Follow the steps for creating [custom bundles](#install_custom_bundles). - - I would like to include stdlib functionality by just using a `script` tag. + - I would like to include stdlib functionality by just using a `script` tag. - - I would like to use ES Modules. + - I would like to use ES Modules. - - Use an individual package's ES Module [build](#install_env_builds_esm). + - Use an individual package's ES Module [build](#install_env_builds_esm). - - I would like to use a pre-built bundle (possibly via a CDN, such as [unpkg][unpkg] or [jsDelivr][jsdelivr]). + - I would like to use a pre-built bundle (possibly via a CDN, such as [unpkg][unpkg] or [jsDelivr][jsdelivr]). - - Install (or consume via a CDN) an individual package's pre-built UMD [browser bundle](#install_env_builds_umd). + - Install (or consume via a CDN) an individual package's pre-built UMD [browser bundle](#install_env_builds_umd). - - I am interested in using a substantial amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages (e.g., if building an on-line calculator application and wanting all of stdlib's math functionality). + - I am interested in using a substantial amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages (e.g., if building an on-line calculator application and wanting all of stdlib's math functionality). - - Install one or more top-level [namespaces](#install_namespaces). Installing the entire project is likely unnecessary and will lead to slower installation times. Installing a top-level namespace is likely to mean installing functionality which will never be used; however, installing a top-level namespace is likely to be easier and less time-consuming than installing many individual packages separately. + - Install one or more top-level [namespaces](#install_namespaces). Installing the entire project is likely unnecessary and will lead to slower installation times. Installing a top-level namespace is likely to mean installing functionality which will never be used; however, installing a top-level namespace is likely to be easier and less time-consuming than installing many individual packages separately. When bundling, installing a top-level namespace should not be a concern, as individual functionality can still be independently required/imported. Project installation times may, however, be somewhat slower. -- I am building a [Node.js][node-js] **server application**. +- I am building a [Node.js][node-js] **server application**. - - I am interested in using various functionality found in stdlib. + - I am interested in using various functionality found in stdlib. - - Install [individual packages](#install_individual_packages). Installing the entire project is likely unnecessary and will lead to slower installation times. + - Install [individual packages](#install_individual_packages). Installing the entire project is likely unnecessary and will lead to slower installation times. - - I would like to **vendor** stdlib functionality and avoid dependency trees. + - I would like to **vendor** stdlib functionality and avoid dependency trees. - - Install individual package UMD [bundles](#install_env_builds_nodejs). + - Install individual package UMD [bundles](#install_env_builds_nodejs). - - I am interested in using a _substantial_ amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages. + - I am interested in using a _substantial_ amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages. - - Install one or more top-level [namespaces](#install_namespaces). Installing the entire project is likely unnecessary and will lead to slower installation times. Installing a top-level namespace is likely to mean installing functionality which will never be used; however, installing a top-level namespace is likely to be easier and less time-consuming than installing many individual packages separately. + - Install one or more top-level [namespaces](#install_namespaces). Installing the entire project is likely unnecessary and will lead to slower installation times. Installing a top-level namespace is likely to mean installing functionality which will never be used; however, installing a top-level namespace is likely to be easier and less time-consuming than installing many individual packages separately. -- I am using **Deno**. +- I am using **Deno**. - - Import [individual packages](#install_env_builds_deno) using pre-built Deno builds. + - Import [individual packages](#install_env_builds_deno) using pre-built Deno builds. -- I would like to use stdlib functionality in an [Observable][observable] notebook. +- I would like to use stdlib functionality in an [Observable][observable] notebook. - - Consume a pre-built [browser bundles](#install_env_builds_umd) via a CDN, such as [unpkg][unpkg] or [jsDelivr][jsdelivr]. + - Consume a pre-built [browser bundles](#install_env_builds_umd) via a CDN, such as [unpkg][unpkg] or [jsDelivr][jsdelivr]. -- I want to hack at stdlib, possibly even creating **customized** builds to link to platform-specific native libraries (such as Intel's MKL or some other numerical library). +- I want to hack at stdlib, possibly even creating **customized** builds to link to platform-specific native libraries (such as Intel's MKL or some other numerical library). - - Install the project as a [system library](#install_system_library) by cloning this repository and following the [installation][stdlib-development] instructions as described in the [development guide][stdlib-development]. + - Install the project as a [system library](#install_system_library) by cloning this repository and following the [installation][stdlib-development] instructions as described in the [development guide][stdlib-development]. @@ -237,9 +237,12 @@ $ npm install @stdlib/stdlib Once installed, stdlib packages can be individually required/imported to minimize load times and decrease bundle sizes. For example, to use `require` ```javascript -var ndarray = require( '@stdlib/ndarray/array' ); +var ndarray = require("@stdlib/ndarray/array"); -var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] ); +var arr = ndarray([ + [1, 2], + [3, 4], +]); // returns ``` @@ -248,9 +251,12 @@ and to use `import` ```javascript -import ndarray from '@stdlib/ndarray/array'; +import ndarray from "@stdlib/ndarray/array"; -var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] ); +var arr = ndarray([ + [1, 2], + [3, 4], +]); // returns ``` @@ -271,9 +277,12 @@ $ npm install @stdlib/ndarray-array Once installed, individual packages can be required/imported. For example, to use `require` ```javascript -var ndarray = require( '@stdlib/ndarray-array' ); +var ndarray = require("@stdlib/ndarray-array"); -var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] ); +var arr = ndarray([ + [1, 2], + [3, 4], +]); // returns ``` @@ -282,9 +291,12 @@ and to use `import` ```javascript -import ndarray from '@stdlib/ndarray-array'; +import ndarray from "@stdlib/ndarray-array"; -var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] ); +var arr = ndarray([ + [1, 2], + [3, 4], +]); // returns ``` @@ -303,9 +315,9 @@ $ npm install @stdlib/math Once installed, packages within a top-level namespace can be individually required/imported to minimize load times and decrease bundle sizes. For example, to use `require` ```javascript -var sin = require( '@stdlib/math/base/special/sin' ); +var sin = require("@stdlib/math/base/special/sin"); -var v = sin( 3.14 ); +var v = sin(3.14); // returns ``` @@ -314,9 +326,9 @@ and to use `import` ```javascript -import sin from '@stdlib/math/base/special/sin'; +import sin from "@stdlib/math/base/special/sin"; -var v = sin( 3.14 ); +var v = sin(3.14); // returns ``` @@ -364,14 +376,14 @@ To use ES Modules via a ` ``` @@ -384,12 +396,14 @@ To use individual packages in Deno, use **Deno builds** available in each packag ```javascript -import ndarray from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-array@deno/mod.js'; +import ndarray from "https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-array@deno/mod.js"; -var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] ); +var arr = ndarray([ + [1, 2], + [3, 4], +]); // returns -```` - +``` @@ -406,18 +420,22 @@ To use UMD bundles either via a ` - + + ``` @@ -430,13 +448,13 @@ To **vendor** stdlib functionality and avoid installing dependency trees, use UM ```javascript -var linspace = require( '/path/to/vendor/umd/@stdlib/array-base-linspace' ); -var erf = require( '/path/to/vendor/umd/@stdlib/math-base-special-erf' ); +var linspace = require("/path/to/vendor/umd/@stdlib/array-base-linspace"); +var erf = require("/path/to/vendor/umd/@stdlib/math-base-special-erf"); -var x = linspace( -10.0, 10.0, 100 ); +var x = linspace(-10.0, 10.0, 100); -for ( var i = 0; i < x.length; i++ ) { - console.log( 'x: %d, erf(x): %d', x[ i ], erf( x[ i ] ) ); +for (var i = 0; i < x.length; i++) { + console.log("x: %d, erf(x): %d", x[i], erf(x[i])); } ``` @@ -487,44 +505,44 @@ Upon generating a bundle, the bundle can be loaded via a ` + ``` making sure to modify the script path based on the local installation directory. @@ -338,7 +353,7 @@ If no recognized module system is present, one can access bundle contents in ano ``` @@ -386,32 +401,32 @@ Upon generating a bundle, the bundle can be loaded via a `