Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .conform.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
2 changes: 1 addition & 1 deletion .github/artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/pullrequest-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand All @@ -14,26 +14,26 @@ on:
- 'feature/**'

permissions:
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed

jobs:
pr-checks:
uses: diggsweden/reusable-ci/.github/workflows/pullrequest-orchestrator.yml@1a7dcd9c5257495ebf141e4e4b4bac438a8aae56 # v2.0.0
secrets: inherit # Pass org-level secrets (NPM token if private packages)
secrets: inherit # Pass org-level secrets (NPM token if private packages)
permissions:
contents: read # Clone repository and read source code
packages: read # Access private NPM packages from GitHub registry
contents: read # Clone repository and read source code
packages: read # Access private NPM packages from GitHub registry
security-events: write # Upload ESLint/security findings to GitHub Security tab
with:
project-type: npm
# MegaLinter is disabled for this project
linters.megalint: false # Skip MegaLinter
linters.megalint: false # Skip MegaLinter
linters.publiccodelint: true

test:
needs: [pr-checks]
if: always() # Run tests even if linting fails (get full CI feedback)
if: always() # Run tests even if linting fails (get full CI feedback)
permissions:
contents: read # Read test files and source code
packages: read # Fetch test dependencies from registry
uses: ./.github/workflows/test.yml
contents: read # Read test files and source code
packages: read # Fetch test dependencies from registry
uses: ./.github/workflows/test.yml
10 changes: 5 additions & 5 deletions .github/workflows/release-dev-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

# Release Workflow Dev
#
#
# Triggers dev builds for testing on development branches.
# Creates:
# - Dev container image (ghcr.io)
# - Dev NPM package (GitHub Packages)
#
# Triggers:
# - Push to dev/* or feat/* branches
# - Push to dev/* or feat/* branches
# - Manual workflow dispatch
#
# Created artifacts:
Expand All @@ -34,5 +34,5 @@ jobs:
uses: diggsweden/reusable-ci/.github/workflows/release-dev-orchestrator.yml@1a7dcd9c5257495ebf141e4e4b4bac438a8aae56 # v2.0.0
with:
project-type: npm
package-scope: "@diggsweden"
secrets: inherit
package-scope: '@diggsweden'
secrets: inherit
30 changes: 15 additions & 15 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand All @@ -10,30 +10,30 @@ name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Stable: v1.0.0
- "v[0-9]+.[0-9]+.[0-9]+-alpha*" # Alpha: v1.0.0-alpha.1
- "v[0-9]+.[0-9]+.[0-9]+-beta*" # Beta: v1.0.0-beta.1
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # RC: v1.0.0-rc.1
- 'v[0-9]+.[0-9]+.[0-9]+' # Stable: v1.0.0
- 'v[0-9]+.[0-9]+.[0-9]+-alpha*' # Alpha: v1.0.0-alpha.1
- 'v[0-9]+.[0-9]+.[0-9]+-beta*' # Beta: v1.0.0-beta.1
- 'v[0-9]+.[0-9]+.[0-9]+-rc*' # RC: v1.0.0-rc.1

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false # Queue releases, don't cancel partial releases
cancel-in-progress: false # Queue releases, don't cancel partial releases

permissions:
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed

jobs:
release:
uses: diggsweden/reusable-ci/.github/workflows/release-orchestrator.yml@1a7dcd9c5257495ebf141e4e4b4bac438a8aae56 # v2.0.0
permissions:
contents: write # Create GitHub releases, push changelog commits
packages: write # Publish to GitHub Packages
id-token: write # Generate OIDC token for SLSA provenance
attestations: write # Attach SBOM attestations
security-events: write # Upload container vulnerability scan results
actions: read # Required for SLSA provenance
contents: write # Create GitHub releases, push changelog commits
packages: write # Publish to GitHub Packages
id-token: write # Generate OIDC token for SLSA provenance
attestations: write # Attach SBOM attestations
security-events: write # Upload container vulnerability scan results
actions: read # Required for SLSA provenance
secrets: inherit
with:
artifacts-config: .github/artifacts.yml
file-pattern: "CHANGELOG.md package.json package-lock.json"
release-publisher: github-cli
file-pattern: 'CHANGELOG.md package.json package-lock.json'
release-publisher: github-cli
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0
---
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: "22.21.0"
node-version: '22.21.0'

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
; SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
;
; SPDX-License-Identifier: CC0-1.0

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government

SPDX-License-Identifier: CC-BY-4.0
-->
Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
2 changes: 1 addition & 1 deletion GUIDELINES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government

SPDX-License-Identifier: CC0-1.0
-->
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government

SPDX-License-Identifier: CC0-1.0
-->
Expand Down
8 changes: 4 additions & 4 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand All @@ -8,7 +8,7 @@ version = 1
[[annotations]]
path = ["CHANGELOG.md","tsconfig.json","package.json","package-lock.json"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2025 diggsweden/rest-api-profil-lint-processor"
SPDX-FileCopyrightText = "2025 Digg - Agency for Digital Government"
SPDX-License-Identifier = "CC0-1.0"

# images etc
Expand Down Expand Up @@ -85,12 +85,12 @@ path = [
"**/*/code_quality.sh",
"images/ver6.png"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2025 diggsweden/rest-api-profil-lint-processor"
SPDX-FileCopyrightText = "2025 Digg - Agency for Digital Government"
SPDX-License-Identifier = "CC0-1.0"

# documents etc
[[annotations]]
path = ["document/Avstaemning_REST_API_profil_v_1_2_0_0.xlsx"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2025 diggsweden/rest-api-profil-lint-processor"
SPDX-FileCopyrightText = "2025 Digg - Agency for Digital Government"
SPDX-License-Identifier = "CC0-1.0"
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government

SPDX-License-Identifier: CC0-1.0
-->
Expand Down
2 changes: 1 addition & 1 deletion apis/ame-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/arq-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/dok-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/dot-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/fel-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/fel01-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/fns-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/for-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/for.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/hyp-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/mog-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/res-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/sak-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/ufn-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion apis/ver-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: EUPL-1.2

Expand Down
2 changes: 1 addition & 1 deletion development/megalinter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
16 changes: 9 additions & 7 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
// SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
//
// SPDX-License-Identifier: EUPL-1.2

Expand All @@ -8,15 +8,17 @@ module.exports = {
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.ts$': ['ts-jest', {
useESM: true,
tsconfig: 'tsconfig.jest.json'
}],
'^.+\\.ts$': [
'ts-jest',
{
useESM: true,
tsconfig: 'tsconfig.jest.json',
},
],
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transformIgnorePatterns: ['/node_modules/'],
testMatch: ['**/tests/unit/**/*.test.ts'],

};
};
6 changes: 3 additions & 3 deletions jest.integration.config.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
// SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
//
// SPDX-License-Identifier: EUPL-1.2
const base = require('./jest.config.cjs');

/** @type {import('jest').Config} */
module.exports = {
...base,
testMatch: ['**/tests/integration/**/*.test.ts']
};
testMatch: ['**/tests/integration/**/*.test.ts'],
};
2 changes: 1 addition & 1 deletion publiccode.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
4 changes: 2 additions & 2 deletions register.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
// SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
//
// SPDX-License-Identifier: EUPL-1.2

import { register } from 'node:module';
import { pathToFileURL } from 'node:url';

register('ts-node/esm', pathToFileURL('./'));
register('ts-node/esm', pathToFileURL('./'));
Loading