Merge branch 'main' into release-process-updates

This commit is contained in:
James M. Greene
2022-09-26 15:43:11 -05:00
committed by GitHub
22 changed files with 279 additions and 2637 deletions

View File

@@ -1,2 +0,0 @@
node_modules/
dist/

View File

@@ -1,19 +1,17 @@
{
"env": {
"commonjs": true,
"es6": true,
"jest": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
"es2021": true,
"node": true,
"jest": true
},
"plugins": ["github"],
"extends": ["eslint:recommended", "prettier", "plugin:github/internal"],
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": 12
},
"rules": {
"semi": ["error", "never"]
}
}
},
"ignorePatterns": ["/dist/", "/pre/"]
}

View File

@@ -1,6 +1,6 @@
---
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: |
# Changelog
@@ -8,33 +8,33 @@ template: |
See details of [all code changes](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release.
categories:
- title: "🚀 Features"
- title: '🚀 Features'
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
labels:
- "infrastructure"
- "automation"
- "documentation"
- title: "🏎 Performance"
label: "performance"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
- 'infrastructure'
- 'automation'
- 'documentation'
- title: '🏎 Performance'
label: 'performance'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
labels:
- "type: breaking"
- 'type: breaking'
minor:
labels:
- "type: enhancement"
- 'type: enhancement'
patch:
labels:
- "type: bug"
- "type: maintenance"
- "type: documentation"
- 'type: bug'
- 'type: maintenance'
- 'type: documentation'
default: patch

View File

@@ -31,4 +31,4 @@ jobs:
run: npm ci
- name: Verify formatting
run: npm run format:check
run: npm run format:check

View File

@@ -1,4 +1,4 @@
name: Checking linter
name: Check linter
on:
push:
@@ -31,4 +31,4 @@ jobs:
run: npm ci
- name: Verify linter
run: npm run lint
run: npm run lint:check

View File

@@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'
on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '40 0 * * 1'
@@ -32,39 +32,39 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, 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@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, 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@v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
TAG_NAME:
description: "Tag name that the major tag will point to"
description: 'Tag name that the major tag will point to'
required: true
env:

View File

@@ -9,20 +9,20 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Set Node.JS
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Set Node.JS
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
if: github.ref_name == 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
if: github.ref_name == 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1 +1,6 @@
node_modules/
# Ignore build artifacts
/dist/
/pre/
# Ignore all Markdown files
*.md

View File

@@ -7,4 +7,4 @@ semi: false
singleQuote: true
trailingComma: none
bracketSpacing: true
arrowParens: avoid
arrowParens: avoid

View File

@@ -1 +0,0 @@
module.exports = {presets: ['@babel/preset-env']}

4
dist/index.js vendored
View File

@@ -8199,8 +8199,6 @@ module.exports = function getContext() {
/***/ 2877:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
__nccwpck_require__(4307)
const core = __nccwpck_require__(2186)
const axios = __nccwpck_require__(6545)
@@ -8662,8 +8660,6 @@ module.exports = require("zlib");
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
__nccwpck_require__(4307)
// This package assumes a site has already been built and the files exist in the current workspace
// If there's an artifact named `artifact.tar`, it can upload that to actions on its own,
// without the user having to do the tar process themselves.

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +0,0 @@
module.exports = {
transform: {
'^.+\\.(js|jsx)$': 'babel-jest'
}
}

2704
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,17 +4,11 @@
"description": "Deploy an actions artifact to GitHub Pages",
"main": "./dist/index.js",
"dependencies": {
"@actions/artifact": "^0.5.2",
"@actions/core": "^1.9.1",
"@babel/plugin-transform-runtime": "^7.16.0",
"axios": "^0.24.0",
"regenerator-runtime": "^0.13.9",
"axios-retry": "^3.2.4",
"tar": "^6.1.11"
"axios-retry": "^3.2.4"
},
"devDependencies": {
"@babel/preset-env": "^7.16.0",
"@github/prettier-config": "0.0.4",
"@vercel/ncc": "^0.31.1",
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
@@ -24,12 +18,13 @@
"prettier": "^2.4.1"
},
"scripts": {
"lint": "eslint src",
"all": "npm run format && npm run lint && npm run prepare && npm run test",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "DEBUG=eslint:cli-engine eslint --fix .",
"lint:check": "DEBUG=eslint:cli-engine eslint .",
"prepare": "ncc build src/index.js -o dist --source-map --license licenses.txt && ncc build src/pre.js -o pre --source-map --license licenses.txt",
"test": "jest",
"format": "prettier --write 'src/**/*.js'",
"format:check": "prettier --check 'src/**/*.js'",
"all": "npm run format && npm run lint && npm run prepare && npm run test"
"test": "jest"
},
"repository": {
"type": "git",

View File

@@ -8199,8 +8199,6 @@ module.exports = function getContext() {
/***/ 2877:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
__nccwpck_require__(4307)
const core = __nccwpck_require__(2186)
const axios = __nccwpck_require__(6545)

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,3 @@
require('regenerator-runtime/runtime')
const core = require('@actions/core')
const axios = require('axios')

View File

@@ -1,5 +1,3 @@
require('regenerator-runtime/runtime')
// This package assumes a site has already been built and the files exist in the current workspace
// If there's an artifact named `artifact.tar`, it can upload that to actions on its own,
// without the user having to do the tar process themselves.

View File

@@ -5,8 +5,6 @@ const path = require('path')
const nock = require('nock')
const axios = require('axios')
const { expect, jest } = require('@jest/globals')
const { Deployment } = require('./deployment')
describe('with all environment variables set', () => {

View File

@@ -2,8 +2,6 @@ const core = require('@actions/core')
const process = require('process')
const axios = require('axios')
const { expect, jest } = require('@jest/globals')
const { emitTelemetry } = require('./pre')
describe('emitTelemetry', () => {