Skip to content

Commit cf2acd9

Browse files
committed
Merge branch 'refs/heads/main' into #26-eslint-9
2 parents c99d8f9 + 6bdec44 commit cf2acd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2442
-1942
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment
2+
# The copilot-setup-steps.yml workflow won't trigger unless it's present on your main branch.
3+
name: "Copilot Setup Steps"
4+
5+
# Automatically run the setup steps when they are changed to allow for easy validation, and
6+
# allow manual testing through the repository's "Actions" tab
7+
on:
8+
workflow_dispatch:
9+
push:
10+
paths:
11+
- .github/workflows/copilot-setup-steps.yml
12+
pull_request:
13+
paths:
14+
- .github/workflows/copilot-setup-steps.yml
15+
16+
jobs:
17+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
18+
copilot-setup-steps:
19+
runs-on: ubuntu-latest
20+
21+
permissions:
22+
contents: read
23+
24+
# You can define any steps you want, and they will run before the agent starts.
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Node and NPM Cache
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version-file: .nvmrc
33+
cache: 'npm'
34+
35+
- name: GitHub registry Auth & Install Dependencies
36+
run: npm ci

.github/workflows/main.yml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,44 @@ jobs:
3434
with:
3535
skipOnCommitMsg: "[skip_build]"
3636
githubToken: ${{ secrets.GITHUB_TOKEN }}
37-
build:
37+
test:
3838
runs-on: ubuntu-latest
3939
needs: checkExecution
4040
# only execute if not skipped by commit message
4141
if: needs.checkExecution.outputs.shouldExecute == 'true'
42+
strategy:
43+
matrix:
44+
# Test with Node.js v20 and v22
45+
node:
46+
- 20
47+
- 22
48+
name: Node.js v${{ matrix.node }}
49+
steps:
50+
# checkout branch
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
with:
54+
# 0 indicates all history, because publish requires tag information
55+
fetch-depth: 0
56+
# we need privileged access to publish to protected branch
57+
token: ${{ secrets.GH_TOKEN_PUBLIC_REPO }}
58+
# setup node and dependency cache
59+
- name: Setup Node and NPM Cache
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: ${{ matrix.node }}
63+
cache: 'npm'
64+
# install dependencies
65+
- name: Install
66+
run: HUSKY=0 npm ci
67+
# test
68+
- name: Test
69+
run: npm run test:ci
70+
build:
71+
runs-on: ubuntu-latest
72+
needs: [checkExecution, test]
73+
# only execute if not skipped by commit message
74+
if: needs.checkExecution.outputs.shouldExecute == 'true'
4275
steps:
4376
# checkout branch
4477
- name: Checkout
@@ -60,12 +93,12 @@ jobs:
6093
# build lint plugins before linting
6194
- name: Build lint plugins
6295
run: npm run build:lint:ci
96+
# check formatting
97+
- name: Check Formatting
98+
run: npm run format:ci
6399
# lint
64100
- name: Lint
65101
run: npm run lint:ci
66-
# test
67-
- name: Test
68-
run: npm run test:ci
69102
# build
70103
- name: Build
71104
run: npm run build:ci

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ dist/
88
# Dependency directories
99
node_modules/
1010

11+
# Caches
12+
.eslintcache
13+
1114
# IDEs and editors
1215
.idea/
1316
.project/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.11.1
1+
lts/jod

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ We use lerna to manage the packages.
5252
## ES Version
5353
We support two runtimes: `node` and `latest browser versions`.
5454

55-
### Node 20
56-
Node 20 (which is also supported by AWS Lambda) supports [97%](https://node.green/#ES2022) of `es2022` features
55+
### Node 22
56+
Node 22 (which is also supported by AWS Lambda) supports [97%](https://node.green/#ES2022) of `es2022` features
5757
(no version supports 100%) and [100%](https://node.green/#ES2023) of `es2023` features.
5858
The only `es2022` feature that is currently not supported and needs a polyfill when using it is
5959
[RegExp Match Indices (shows up in flags)](https://node.green/#ES2022-features-RegExp-Match-Indices---hasIndices-----d--flag-) (see [2ality blog](https://2ality.com/2019/12/regexp-match-indices.html) for insights).

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "independent",
44
"command": {
55
"version": {
6-
"allowBranch": "*",
6+
"allowBranch": "**/*",
77
"message": "build(release): next version [skip_build]"
88
},
99
"publish": {

0 commit comments

Comments
 (0)