Compare commits

..

25 Commits

Author SHA1 Message Date
Félix MARQUET
d1d980136f Merge pull request #9 from BreizhHardware/dev
Dev
2025-11-13 16:32:47 +01:00
Félix MARQUET
b2f5283303 Merge pull request #8 from BreizhHardware/dependabot/npm_and_yarn/dev/eslint-9.39.1
Bump eslint from 9.39.0 to 9.39.1
2025-11-13 16:18:27 +01:00
dependabot[bot]
cdc558a8d8 Bump eslint from 9.39.0 to 9.39.1
Bumps [eslint](https://github.com/eslint/eslint) from 9.39.0 to 9.39.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.39.0...v9.39.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-13 15:17:03 +00:00
Félix MARQUET
af8a3097fc Merge pull request #7 from BreizhHardware/dependabot/npm_and_yarn/dev/eslint/js-9.39.1
Bump @eslint/js from 9.39.0 to 9.39.1
2025-11-13 16:15:35 +01:00
Félix MARQUET
c5cce9f8f5 Merge pull request #1 from BreizhHardware/dependabot/npm_and_yarn/tsd-0.33.0
Bump tsd from 0.30.7 to 0.33.0
2025-11-13 16:15:22 +01:00
Félix MARQUET
36789b54ae fix: bump version to 8.0.4 2025-11-13 15:14:21 +00:00
dependabot[bot]
e1b09bca43 Bump tsd from 0.30.7 to 0.33.0
Bumps [tsd](https://github.com/tsdjs/tsd) from 0.30.7 to 0.33.0.
- [Release notes](https://github.com/tsdjs/tsd/releases)
- [Commits](https://github.com/tsdjs/tsd/compare/v0.30.7...v0.33.0)

---
updated-dependencies:
- dependency-name: tsd
  dependency-version: 0.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-13 15:11:20 +00:00
dependabot[bot]
c3284c6ce6 Bump @eslint/js from 9.39.0 to 9.39.1
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.39.0 to 9.39.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.39.1/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-13 15:11:16 +00:00
Félix MARQUET
1c7935b377 Merge pull request #6 from BreizhHardware/dev
Dev
2025-11-13 16:10:17 +01:00
Félix MARQUET
8dc2f9c171 feat: add a release workflow 2025-11-13 15:06:18 +00:00
Félix MARQUET
a9eb496d11 Merge pull request #2 from BreizhHardware/dependabot/npm_and_yarn/typescript-5.9.3
Bump typescript from 3.9.10 to 5.9.3
2025-11-13 15:57:41 +01:00
Félix MARQUET
3353686379 Merge pull request #3 from BreizhHardware/dependabot/npm_and_yarn/supertest-7.1.4
Bump supertest from 3.4.2 to 7.1.4
2025-11-13 15:57:06 +01:00
Félix MARQUET
489ce17366 Merge pull request #4 from BreizhHardware/dependabot/npm_and_yarn/eslint-9.39.0
Bump eslint from 9.38.0 to 9.39.0
2025-11-13 15:56:09 +01:00
Félix MARQUET
4e07a7db7a Merge pull request #5 from BreizhHardware/dependabot/npm_and_yarn/globals-16.5.0
Bump globals from 16.4.0 to 16.5.0
2025-11-13 15:54:31 +01:00
dependabot[bot]
59f6ac0afa Bump globals from 16.4.0 to 16.5.0
Bumps [globals](https://github.com/sindresorhus/globals) from 16.4.0 to 16.5.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.4.0...v16.5.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 16.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 16:42:43 +00:00
dependabot[bot]
597fdda556 Bump eslint from 9.38.0 to 9.39.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.38.0 to 9.39.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.38.0...v9.39.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.39.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 16:42:35 +00:00
dependabot[bot]
21e90237e4 Bump supertest from 3.4.2 to 7.1.4
Bumps [supertest](https://github.com/ladjs/supertest) from 3.4.2 to 7.1.4.
- [Release notes](https://github.com/ladjs/supertest/releases)
- [Commits](https://github.com/ladjs/supertest/compare/v3.4.2...v7.1.4)

---
updated-dependencies:
- dependency-name: supertest
  dependency-version: 7.1.4
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 10:03:37 +00:00
dependabot[bot]
2de73f7526 Bump typescript from 3.9.10 to 5.9.3
Bumps [typescript](https://github.com/microsoft/TypeScript) from 3.9.10 to 5.9.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v3.9.10...v5.9.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 10:03:29 +00:00
Félix MARQUET
e886d7cb05 chore: add dependabot configuration and CI workflow for tests 2025-10-31 10:02:19 +00:00
Félix MARQUET
815ba9819a chore: clean package-lock 2025-10-29 13:28:17 +00:00
Félix MARQUET
f7805d301b chore: remove Istanbul and add NYC for code coverage in package.json 2025-10-29 13:27:45 +00:00
Félix MARQUET
6b23a109b1 chore: update koa dependency to version 3.0.1 2025-10-29 13:24:22 +00:00
Félix MARQUET
39788a1ff0 chore: update express dependency to version 5.1.0 2025-10-29 13:23:33 +00:00
Félix MARQUET
f7474e3ea7 chore: bump version to 8.0.3 and update dependencies
- Updated version from 8.0.2 to 8.0.3 in package.json
- Upgraded eslint from 5.11.0 to 9.38.0
- Added @eslint/eslintrc and @eslint/js as devDependencies
- Added globals as a devDependency
2025-10-29 13:21:53 +00:00
Félix MARQUET
6da4bece87 feat: update package metadata and version to 8.0.2 2025-10-29 13:18:11 +00:00
8 changed files with 3238 additions and 2464 deletions

View File

@@ -1,55 +0,0 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"globals": {
"app": true,
"fetch": true
},
"env": {
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [1, 2],
"array-bracket-spacing": [2, "never"],
"block-scoped-var": 2,
"brace-style": [2, "1tbs"],
"computed-property-spacing": [2, "never"],
"curly": 2,
"eol-last": 2,
"eqeqeq": [2, "smart"],
"max-depth": [1, 3],
"new-cap": 1,
"no-extend-native": 2,
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 1,
"no-unused-vars": 1,
"no-use-before-define": [2, "nofunc"],
"object-curly-spacing": [2, "never"],
"quotes": [1, "single", "avoid-escape"],
"semi": [2, "always"],
"keyword-spacing": [2, {"before": true, "after": true}],
"space-unary-ops": 2,
"no-console": [1, { allow: ["info", "warn", "error"] }],
"max-len": [1, 120],
"max-statements": [1, 50],
"consistent-this": [2, "self"],
"no-var": 2,
"no-dupe-class-members": 2,
"operator-linebreak": [1, "before"],
"no-unneeded-ternary": [1, {"defaultAssignment": false}],
"no-lonely-if": 1,
"linebreak-style": [2, "unix"],
"no-nested-ternary": 2,
"require-yield": 2
}
}

12
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
- package-ecosystem: "github-actions"
directory: "/.github/workflows"
schedule:
interval: "weekly"
target-branch: "dev"

65
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: Release
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22, 24, latest]
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm install prom-client
- run: npm install
- run: npm run lint
- run: npm test
- run: npm run test-types
publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Use Node.js 18
uses: actions/setup-node@v6
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
release:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Get version
id: get_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Generate Changelog
run: |
# Simple changelog generation
echo "# Changelog" > CHANGELOG.md
git log --oneline --pretty=format:"- %s" $(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~1")..HEAD >> CHANGELOG.md
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.version }}
release_name: Release v${{ steps.get_version.outputs.version }}
body_path: CHANGELOG.md
draft: false
prerelease: false

54
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: CI-Tests
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22, 24, latest]
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm install prom-client
- run: npm install
- run: npm run lint
- run: npm test
- run: npm run test-types
codeql:
name: CodeQL Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
audit:
name: Audit Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Use Node.js 18
uses: actions/setup-node@v6
with:
node-version: 18
- run: npm install
- name: Audit Dependencies
run: npm audit --audit-level=moderate

View File

@@ -2,7 +2,8 @@
# express prometheus bundle
Express middleware with popular prometheus metrics in one bundle. It's also compatible with koa v1 and v2 (see below).
Express middleware with popular prometheus metrics in one bundle. It's also compatible with koa v1 and v2 (see below). This package is a fork from the one from
[Jochen Schweizer](https://github.com/jochen-schweizer/express-prom-bundle).
This library uses **prom-client v15+** as a peer dependency. See: https://github.com/siimon/prom-client

77
eslint.config.mjs Normal file
View File

@@ -0,0 +1,77 @@
import { defineConfig } from "eslint/config";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default defineConfig([{
extends: compat.extends("eslint:recommended"),
languageOptions: {
globals: {
...globals.node,
app: true,
fetch: true,
},
ecmaVersion: 6,
sourceType: "module",
},
rules: {
indent: [1, 2],
"array-bracket-spacing": [2, "never"],
"block-scoped-var": 2,
"brace-style": [2, "1tbs"],
"computed-property-spacing": [2, "never"],
curly: 2,
"eol-last": 2,
eqeqeq: [2, "smart"],
"max-depth": [1, 3],
"new-cap": 1,
"no-extend-native": 2,
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 1,
"no-unused-vars": 1,
"no-use-before-define": [2, "nofunc"],
"object-curly-spacing": [2, "never"],
quotes: [1, "single", "avoid-escape"],
semi: [2, "always"],
"keyword-spacing": [2, {
before: true,
after: true,
}],
"space-unary-ops": 2,
"no-console": [1, {
allow: ["info", "warn", "error"],
}],
"max-len": [1, 120],
"max-statements": [1, 50],
"consistent-this": [2, "self"],
"no-var": 2,
"no-dupe-class-members": 2,
"operator-linebreak": [1, "before"],
"no-unneeded-ternary": [1, {
defaultAssignment: false,
}],
"no-lonely-if": 1,
"linebreak-style": [2, "unix"],
"no-nested-ternary": 2,
"require-yield": 2,
},
}]);

5411
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "express-prom-bundle",
"version": "8.0.1",
"name": "@breizhhardware/express-prom-bundle",
"version": "8.0.4",
"description": "express middleware with popular prometheus metrics in one bundle",
"main": "src/index.js",
"keywords": [
@@ -21,7 +21,7 @@
"coverage": "make coverage",
"test-types": "tsd"
},
"author": "Konstantin Pogorelov <or@pluseq.com>",
"author": "BreizhHardware <felix.marquet@horoquartz.com>",
"license": "MIT",
"dependencies": {
"@types/express": "^5.0.0",
@@ -29,25 +29,28 @@
"url-value-parser": "^2.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.38.0",
"dts": "^0.1.1",
"eslint": "^5.11.0",
"express": "^5.0.1",
"istanbul": "^0.4.5",
"eslint": "^9.38.0",
"express": "^5.1.0",
"globals": "^16.4.0",
"jasme": "^6.0.0",
"koa": "^2.6.2",
"koa": "^3.0.1",
"koa-connect": "^2.0.1",
"prom-client": "^15.0.0",
"supertest": "^3.3.0",
"supertest": "^7.1.4",
"supertest-koa-agent": "^0.3.0",
"tsd": "^0.30.3",
"typescript": "^3.4.5"
"tsd": "^0.33.0",
"typescript": "^5.9.3",
"nyc": "^17.1.0"
},
"peerDependencies": {
"prom-client": ">=15.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/jochen-schweizer/express-prom-bundle.git"
"url": "git+https://github.com/breizhhardware/express-prom-bundle.git"
},
"engines": {
"node": ">=18"