mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-08 06:13:53 -05:00
Update Node Versions (for tests) (#3237)
* Update Node Versions (for tests) - Move all test to a single file - test on Node 20, 22 and 24 - on Windows and Ubuntu - Sort `package.json` (with VS Code extension of this https://www.npmjs.com/package/sort-package-json) * Update test.yml
This commit is contained in:
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
|||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
- name: publish npm
|
- name: publish npm
|
||||||
run: npm publish
|
run: npm publish
|
||||||
|
|||||||
35
.github/workflows/test-windows.yml
vendored
35
.github/workflows/test-windows.yml
vendored
@@ -1,35 +0,0 @@
|
|||||||
name: Build status (Windows)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [18.x, 20.x]
|
|
||||||
steps:
|
|
||||||
- name: Get npm cache directory
|
|
||||||
id: npm-cache
|
|
||||||
run: |
|
|
||||||
echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Run tests ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm test
|
|
||||||
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -1,20 +1,26 @@
|
|||||||
name: Build status (Ubuntu)
|
name: Build status
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [18.x, 20.x]
|
node-version:
|
||||||
|
- 20
|
||||||
|
- 22
|
||||||
|
- 24
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get npm cache directory
|
- name: Get npm cache directory
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ Our branch protection rules are as follows:
|
|||||||
- In addition to the PR and approving reviewer, we require three status checks
|
- In addition to the PR and approving reviewer, we require three status checks
|
||||||
to pass before code can be merged
|
to pass before code can be merged
|
||||||
_ Build with Node 20
|
_ Build with Node 20
|
||||||
_ Build with Node 18
|
_ Build with Node 22
|
||||||
|
_ Build with Node 24
|
||||||
- We _allow_ force pushes for project admins. While force pushes can create
|
- We _allow_ force pushes for project admins. While force pushes can create
|
||||||
some head scratching moments for people who have cloned the repo and update
|
some head scratching moments for people who have cloned the repo and update
|
||||||
before and after the force push, the ability to clean up the `HEAD` of a
|
before and after the force push, the ability to clean up the `HEAD` of a
|
||||||
|
|||||||
3
package-lock.json
generated
3
package-lock.json
generated
@@ -26,8 +26,7 @@
|
|||||||
"strip-json-comments": "^5.0.1"
|
"strip-json-comments": "^5.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18",
|
"node": ">=20"
|
||||||
"npm": ">=10"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@aashutoshrathi/word-wrap": {
|
"node_modules/@aashutoshrathi/word-wrap": {
|
||||||
|
|||||||
32
package.json
32
package.json
@@ -1,21 +1,28 @@
|
|||||||
{
|
{
|
||||||
"name": "html5-boilerplate",
|
"name": "html5-boilerplate",
|
||||||
"version": "9.0.1",
|
"version": "9.0.1",
|
||||||
"homepage": "https://html5boilerplate.com/",
|
|
||||||
"license": "MIT",
|
|
||||||
"description": "A professional front-end template for building fast, robust, and adaptable web apps or sites.",
|
"description": "A professional front-end template for building fast, robust, and adaptable web apps or sites.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"h5bp",
|
"h5bp",
|
||||||
"template",
|
"template",
|
||||||
"front-end"
|
"front-end"
|
||||||
],
|
],
|
||||||
|
"homepage": "https://html5boilerplate.com/",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/h5bp/html5-boilerplate/issues"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/h5bp/html5-boilerplate.git"
|
"url": "https://github.com/h5bp/html5-boilerplate.git"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"license": "MIT",
|
||||||
"url": "https://github.com/h5bp/html5-boilerplate/issues"
|
"files": [
|
||||||
},
|
"CHANGELOG.md",
|
||||||
|
"LICENSE.txt",
|
||||||
|
"package.json",
|
||||||
|
"dist/",
|
||||||
|
"README.md"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"prettier": "prettier --write ./**/*.{js,json,md,mjs,yml}",
|
"prettier": "prettier --write ./**/*.{js,json,md,mjs,yml}",
|
||||||
@@ -39,8 +46,10 @@
|
|||||||
"strip-json-comments": "^5.0.1"
|
"strip-json-comments": "^5.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18",
|
"node": ">=20"
|
||||||
"npm": ">=10"
|
},
|
||||||
|
"volta": {
|
||||||
|
"node": "20.19.1"
|
||||||
},
|
},
|
||||||
"h5bp-configs": {
|
"h5bp-configs": {
|
||||||
"directories": {
|
"directories": {
|
||||||
@@ -49,12 +58,5 @@
|
|||||||
"src": "src",
|
"src": "src",
|
||||||
"test": "test"
|
"test": "test"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"files": [
|
|
||||||
"CHANGELOG.md",
|
|
||||||
"LICENSE.txt",
|
|
||||||
"package.json",
|
|
||||||
"dist/",
|
|
||||||
"README.md"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user