-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
144 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
name: Release on main | ||
|
||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
# Cancel previous workflows which might still be running | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run all tests | ||
run: npm test | ||
|
||
- name: Release and publish | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run all tests | ||
run: npm test | ||
|
||
- name: Release and publish | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
name: Run Lint and Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
node-version: [18.x, 20.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
node-version: [18, 20] | ||
runs-on: ${{ matrix.os }} | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Lint | ||
run: npm run lint | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run tests | ||
run: npm test | ||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Run tests | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
package-lock=false | ||
save-exact=true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"singleQuote": false, | ||
"trailingComma": "all", | ||
"useTabs": true, | ||
"printWidth": 120, | ||
"overrides": [ | ||
{ | ||
"files": ["*.yml", "*.json"], | ||
"options": { | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import prettierConfig from "eslint-config-prettier"; | ||
import prettierPlugin from "eslint-plugin-prettier/recommended"; | ||
import globals from "globals"; | ||
import js from "@eslint/js"; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
prettierConfig, | ||
prettierPlugin, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
...globals.browser, | ||
global: true, | ||
}, | ||
}, | ||
}, | ||
{ | ||
ignores: ["coverage/*", "dist/*"], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,53 @@ | ||
{ | ||
"name": "@metrics/guard", | ||
"version": "1.0.2", | ||
"description": "Module to guard against excessive metric permutation creation in a metric stream", | ||
"main": "lib/guard.js", | ||
"types": "guard.d.ts", | ||
"files": [ | ||
"lib", | ||
"guard.d.ts" | ||
], | ||
"scripts": { | ||
"bench": "node benchmark/benchmark.js", | ||
"test": "tap test/*.js --disable-coverage --allow-empty-coverage", | ||
"test:coverage": "tap test/*.js", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix" | ||
}, | ||
"author": "Trygve Lie <[email protected]>", | ||
"license": "MIT", | ||
"keywords": [ | ||
"server-statistics", | ||
"server-stats", | ||
"statistics", | ||
"metrics", | ||
"monitoring", | ||
"guard" | ||
], | ||
"dependencies": { | ||
"readable-stream": "^3.4.0" | ||
}, | ||
"devDependencies": { | ||
"@metrics/client": "2.5.2", | ||
"@metrics/metric": "2.3.3", | ||
"@semantic-release/changelog": "6.0.3", | ||
"@semantic-release/commit-analyzer": "11.1.0", | ||
"@semantic-release/git": "10.0.1", | ||
"@semantic-release/github": "9.2.6", | ||
"@semantic-release/npm": "11.0.3", | ||
"@semantic-release/release-notes-generator": "12.1.0", | ||
"eslint": "8.57.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-prettier": "5.1.3", | ||
"fastbench": "1.0.1", | ||
"prettier": "3.3.0", | ||
"semantic-release": "23.0.2", | ||
"tap": "18.7.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/metrics-js/client.git" | ||
} | ||
"name": "@metrics/guard", | ||
"version": "1.0.2", | ||
"description": "Module to guard against excessive metric permutation creation in a metric stream", | ||
"main": "lib/guard.js", | ||
"types": "guard.d.ts", | ||
"files": [ | ||
"lib", | ||
"guard.d.ts" | ||
], | ||
"scripts": { | ||
"bench": "node benchmark/benchmark.js", | ||
"test": "tap test/*.js --disable-coverage --allow-empty-coverage", | ||
"test:coverage": "tap test/*.js", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix" | ||
}, | ||
"author": "Trygve Lie <[email protected]>", | ||
"license": "MIT", | ||
"keywords": [ | ||
"server-statistics", | ||
"server-stats", | ||
"statistics", | ||
"metrics", | ||
"monitoring", | ||
"guard" | ||
], | ||
"dependencies": { | ||
"readable-stream": "^3.4.0" | ||
}, | ||
"devDependencies": { | ||
"@metrics/client": "2.5.2", | ||
"@metrics/metric": "2.3.3", | ||
"@semantic-release/changelog": "6.0.3", | ||
"@semantic-release/commit-analyzer": "11.1.0", | ||
"@semantic-release/git": "10.0.1", | ||
"@semantic-release/github": "9.2.6", | ||
"@semantic-release/npm": "11.0.3", | ||
"@semantic-release/release-notes-generator": "12.1.0", | ||
"eslint": "9.6.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-prettier": "5.1.3", | ||
"fastbench": "1.0.1", | ||
"globals": "15.8.0", | ||
"prettier": "3.3.0", | ||
"semantic-release": "23.0.2", | ||
"tap": "18.7.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/metrics-js/client.git" | ||
} | ||
} |