Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: form8ion/javascript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.2
Choose a base ref
...
head repository: form8ion/javascript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 339 changed files with 27,098 additions and 27,030 deletions.
1 change: 0 additions & 1 deletion .babelrc

This file was deleted.

14 changes: 14 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"reporter": [
"lcov",
"text-summary",
"html"
],
"exclude": [
"src/**/*-test.js",
"src/**/*.test.js",
"test/",
"thirdparty-wrappers/",
"vendor/"
]
}
1 change: 0 additions & 1 deletion .commitlintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"extends": ["@form8ion"]}
8 changes: 2 additions & 6 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
root: true
extends:
- '@form8ion'
- '@form8ion/mocha'
- '@form8ion/cucumber'

overrides:
- files: example.js
rules:
import/no-extraneous-dependencies: off
no-console: off
parserOptions:
ecmaVersion: 2022
38 changes: 38 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
_extends: .github

repository:
name: javascript
description: JavaScript language plugin for the @form8ion toolset
homepage: https://npm.im/@form8ion/javascript
private: false

branches:
- name: master
protection:

rulesets:
- name: prevent destruction of the default branch
target: branch
enforcement: active
conditions:
ref_name:
include:
- "~DEFAULT_BRANCH"
exclude: []
rules:
- type: deletion
- type: non_fast_forward

- name: verification must pass
target: branch
enforcement: active
conditions:
ref_name:
include:
- "~DEFAULT_BRANCH"
exclude: []
rules:
- type: required_status_checks
parameters:
strict_required_status_checks_policy: false
required_status_checks:
- context: workflow-result
integration_id: 15368
bypass_actors:
- actor_id: 3208999
actor_type: Team
bypass_mode: always
79 changes: 79 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '19 13 * * 6'

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

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


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
with:
category: "/language:${{matrix.language}}"
17 changes: 17 additions & 0 deletions .github/workflows/experimental-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release
'on':
push:
branches:
- alpha
permissions:
contents: read
jobs:
release:
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
uses: form8ion/.github/.github/workflows/release-package.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
72 changes: 50 additions & 22 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
@@ -3,44 +3,72 @@ name: Node.js CI
push:
branches:
- master
- alpha
- beta
- 'renovate/**'
- renovate/**
pull_request:
types:
- opened
- synchronize
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['12.20', 12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '${{ matrix.node }}'
- uses: bahmutov/npm-install@v1
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: npm install --global corepack@latest
- run: corepack npm audit signatures
- run: npm test
- name: Upload coverage data to Codecov
run: npm run coverage:report
release:
needs: verify
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
verify-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 18.19.0
- 20.9.0
- 22.11.0
- 23
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: lts/*
- uses: bahmutov/npm-install@v1
- name: semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
cache: npm
node-version: ${{ matrix.node }}
- run: npm clean-install
- run: OPTIONS="${{ matrix.options }}" npm test
release:
needs:
- verify
- verify-matrix
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
uses: form8ion/.github/.github/workflows/release-package.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
workflow-result:
runs-on: ubuntu-latest
needs:
- verify
- verify-matrix
if: ${{ !cancelled() }}
steps:
- name: All matrix versions passed
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some matrix version failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
72 changes: 72 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '45 8 * * 0'
push:
branches: [ "master" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
with:
sarif_file: results.sarif
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/node_modules/
/lib/
/coverage/
/.nyc_output/

.eslintcache
.eslintcache

.idea
!.idea/
.idea/*
!.idea/runConfigurations/

3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
11 changes: 11 additions & 0 deletions .idea/runConfigurations/Unit_Tests.xml

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

9 changes: 8 additions & 1 deletion .lockfile-lintrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
{"path":"package-lock.json","type":"npm","validate-https":true,"allowed-hosts":["npm"]}
{
"path": "package-lock.json",
"type": "npm",
"validate-https": true,
"allowed-hosts": [
"npm"
]
}
Loading