Skip to content

Commit c586b0e

Browse files
authored
Merge pull request #101 from dashlog/update-overall-project
chore: update dependencies & configs
2 parents 74e2afb + 6054481 commit c586b0e

18 files changed

Lines changed: 80 additions & 40 deletions

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: /
55
schedule:
66
interval: monthly
7+
cooldown:
8+
default-days: 5
79
groups:
810
github-actions:
911
patterns:
@@ -14,6 +16,8 @@ updates:
1416
versioning-strategy: widen
1517
schedule:
1618
interval: weekly
19+
cooldown:
20+
default-days: 5
1721
groups:
1822
dependencies:
1923
dependency-type: "production"

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [20.x]
14+
node-version: [24.x]
1515
fail-fast: false
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
node-version: ${{ matrix.node-version }}
2222
- name: Install dependencies
23-
run: npm i
23+
run: npm install --ignore-scripts
2424
- name: Lint
2525
run: npm run lint
2626
- name: Run tests

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
18+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
19+
with:
20+
node-version: '24.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
# Ensure npm 11.5.1 or later is installed
24+
- name: Update npm
25+
run: npm install -g npm@latest
26+
- run: npm install --ignore-scripts
27+
- run: npm run build --if-present
28+
- run: npm test
29+
- run: npm publish

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
package-lock=false
2+
save-exact=true
3+
ignore-scripts=true

package.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
"exports": "./dist/index.js",
77
"types": "./dist/index.d.ts",
88
"scripts": {
9-
"build": "rimraf ./dist && tsc",
9+
"build": "tsc",
1010
"prepublishOnly": "npm run build",
11-
"test": "glob -c \"tsx --test\" \"./test/**/*.spec.ts\"",
11+
"test": "node --test ./test/**/*.spec.ts",
1212
"coverage": "c8 --all -r html npm test",
1313
"lint": "eslint src test"
1414
},
15+
"publishConfig": {
16+
"registry": "https://registry.npmjs.org",
17+
"access": "public",
18+
"provenance": true
19+
},
1520
"repository": {
1621
"type": "git",
1722
"url": "git+https://github.com/dashlog/core.git"
@@ -27,22 +32,19 @@
2732
},
2833
"homepage": "https://github.com/dashlog/core#readme",
2934
"devDependencies": {
30-
"@openally/config.eslint": "^2.1.0",
31-
"@openally/config.typescript": "^1.0.3",
32-
"@types/node": "^22.15.21",
33-
"c8": "^10.1.2",
34-
"glob": "^11.0.0",
35-
"rimraf": "^6.0.1",
36-
"tsx": "^4.16.2"
35+
"@openally/config.eslint": "^2.2.0",
36+
"@openally/config.typescript": "^1.2.1",
37+
"@types/node": "^25.0.3",
38+
"c8": "^10.1.2"
3739
},
3840
"dependencies": {
3941
"@dashlog/fetch-github-repositories": "^3.0.2",
40-
"@myunisoft/httpie": "^5.0.0",
41-
"@nodesecure/npm-registry-sdk": "^3.0.0",
42-
"@nodesecure/npm-types": "^1.2.0",
42+
"@nodesecure/npm-registry-sdk": "^4.4.0",
43+
"@nodesecure/npm-types": "^1.3.0",
4344
"@nodesecure/ossf-scorecard-sdk": "^3.2.1",
44-
"@nodesecure/scanner": "^6.4.0",
45-
"@octokit/types": "^14.0.0",
46-
"@openally/mutex": "^1.0.0"
45+
"@nodesecure/scanner": "^8.2.0",
46+
"@octokit/types": "^16.0.0",
47+
"@openally/httpie": "1.0.0",
48+
"@openally/mutex": "^2.0.0"
4749
}
4850
}

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Import Internal Dependencies
2-
import Github from "./services/github.js";
3-
import * as plugins from "./plugins/index.js";
4-
import { type DashlogRepository } from "./services/repository.js";
2+
import Github from "./services/github.ts";
3+
import * as plugins from "./plugins/index.ts";
4+
import { type DashlogRepository } from "./services/repository.ts";
55

66
export type DashlogAllPlugins =
77
plugins.nodesecure.NodesecurePlugin &
@@ -14,13 +14,13 @@ export type DashlogOrganization<T extends object> = {
1414
projects: DashlogRepository<T>[];
1515
};
1616

17-
export interface IFetchOrgMetadataOptions<Plugins extends DashlogPlugins> {
17+
export interface FetchOrgMetadataOptions<Plugins extends DashlogPlugins> {
1818
plugins: Plugins[];
1919
}
2020

2121
export async function fetchOrgMetadata<T extends DashlogPlugins>(
2222
orgName: string,
23-
options: IFetchOrgMetadataOptions<T> = { plugins: [] }
23+
options: FetchOrgMetadataOptions<T> = { plugins: [] }
2424
): Promise<DashlogOrganization<Pick<DashlogAllPlugins, T>>> {
2525
const githubRepository = new Github(orgName);
2626

src/plugins/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * as scorecard from "./scorecard.js";
2-
export * as nodesecure from "./nodesecure.js";
1+
export * as scorecard from "./scorecard.ts";
2+
export * as nodesecure from "./nodesecure.ts";

src/plugins/nodesecure.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as scanner from "@nodesecure/scanner";
33
import { Mutex } from "@openally/mutex";
44

55
// Import Internal Dependencies
6-
import { type DashlogRepository } from "../services/repository.js";
6+
import { type DashlogRepository } from "../services/repository.ts";
77

88
// CONSTANTS
99
const kScannerLock = new Mutex({ concurrency: 5 });

src/plugins/scorecard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import * as scorecard from "@nodesecure/ossf-scorecard-sdk";
33

44
// Import Internal Dependencies
5-
import { type DashlogRepository } from "../services/repository.js";
5+
import { type DashlogRepository } from "../services/repository.ts";
66

77
export type ScorecardPlugin = {
88
scorecard?: scorecard.ScorecardResult | null;

src/services/github.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Import Third-party Dependencies
2-
import * as httpie from "@myunisoft/httpie";
2+
import * as httpie from "@openally/httpie";
33
import type { Endpoints } from "@octokit/types";
44
import { fetchLazy } from "@dashlog/fetch-github-repositories";
55

66
// Import Internal Dependencies
7-
import GithubRepository, { type DashlogRepository } from "./repository.js";
7+
import GithubRepository, { type DashlogRepository } from "./repository.ts";
88

99
export default class Github {
1010
public orgName: string;

0 commit comments

Comments
 (0)