Skip to content

Commit 5776d7d

Browse files
authored
Merge pull request #7 from contentauth/add_types
fix: fix release process
2 parents 6020a18 + 3c3d6e8 commit 5776d7d

File tree

8 files changed

+561
-81
lines changed

8 files changed

+561
-81
lines changed

.github/workflows/build-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ jobs:
3636
node-version: 22
3737
cache: pnpm
3838

39-
- run: pnpm install
39+
- name: Install dependencies
40+
env:
41+
SKIP_RUST_BUILD: 1
42+
run: pnpm install
4043

4144
- run: pnpm run ci
4245

eslint.config.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,32 @@ module.exports = [
6060
'no-console': 'off',
6161
},
6262
},
63+
{
64+
files: ['scripts/**/*.js'],
65+
languageOptions: {
66+
ecmaVersion: 'latest',
67+
sourceType: 'commonjs',
68+
globals: {
69+
console: 'readonly',
70+
process: 'readonly',
71+
Buffer: 'readonly',
72+
__dirname: 'readonly',
73+
__filename: 'readonly',
74+
global: 'readonly',
75+
module: 'readonly',
76+
require: 'readonly',
77+
exports: 'readonly',
78+
},
79+
},
80+
rules: {
81+
'no-console': 'off',
82+
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
83+
},
84+
},
6385
{
6486
ignores: [
6587
'dist/',
6688
'node_modules/',
67-
'*.js',
6889
'**/*.d.ts',
6990
'*.config.js',
7091
'*.config.mjs',

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ module.exports = {
55
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
66
moduleNameMapper: {
77
"index\\.node": "<rootDir>/index.node"
8-
}
8+
},
9+
// Force Jest to exit after tests complete to prevent hanging
10+
forceExit: true
911
};

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"build": "run-s build:rust build:ts build:docs",
1919
"build:debug": "run-s build:rust-debug build:ts",
2020
"build:docs": "rimraf docs && typedoc --plugin typedoc-plugin-markdown --readme none --out docs js-src/index.ts",
21-
"build:rust": "pnpm run build:rust-debug --release",
21+
"build:rust": "cargo-cp-artifact -nc generated/c2pa.node -- cargo build --message-format=json-render-diagnostics --release",
2222
"build:rust-debug": "cargo build --message-format=json-render-diagnostics > cargo.log",
2323
"build:ts": "tsc -b && cpy index.node dist && cpy --flat js-src/types.d.ts dist/types && node scripts/fix-types.js",
2424
"changeset:publish": "changeset publish",
@@ -30,6 +30,7 @@
3030
"lint": "cargo clippy && pnpm eslint",
3131
"postbuild:rust-debug": "neon dist < cargo.log",
3232
"postcross-build": "neon dist -m /target < cross.log",
33+
"postinstall": "node ./scripts/postinstall.js",
3334
"release": "run-s build changeset:publish",
3435
"test": "jest",
3536
"test:watch": "jest --watch --runInBand --detectOpenHandles --forceExit"
@@ -46,6 +47,7 @@
4647
"@types/node": "^22.17.1",
4748
"@typescript-eslint/eslint-plugin": "^8.39.1",
4849
"@typescript-eslint/parser": "^8.39.1",
50+
"cargo-cp-artifact": "^0.1.9",
4951
"cpy-cli": "^5.0.0",
5052
"eslint": "^9.33.0",
5153
"fs-extra": "^11.3.1",
@@ -66,7 +68,14 @@
6668
},
6769
"homepage": "https://github.com/contentauth/c2pa-node-v2#readme",
6870
"dependencies": {
69-
"debug": "^4.4.1"
71+
"chalk": "^5.6.0",
72+
"cli-progress": "^3.12.0",
73+
"debug": "^4.4.1",
74+
"mkdirp": "^3.0.1",
75+
"node-fetch": "^3.3.2",
76+
"pkg-dir": "^9.0.0",
77+
"pretty-bytes": "^7.0.1",
78+
"unzipper": "^0.12.3"
7079
},
7180
"packageManager": "[email protected]"
7281
}

0 commit comments

Comments
 (0)