Skip to content

Commit

Permalink
👷 🧪 Add types checking (tsd) after generating the .d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuch committed Mar 15, 2024
1 parent 13b071e commit 1c5eb64
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 41 deletions.
1 change: 1 addition & 0 deletions packages/placeholder-pdf-lib/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/pdflibAddPlaceholder'
19 changes: 13 additions & 6 deletions packages/placeholder-pdf-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/pdflibAddPlaceholder.js",
"types": "dist/pdflibAddPlaceholder.d.ts",
Expand All @@ -40,8 +40,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -73,6 +79,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdf-lib": "^1.17.1",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "56f621c5b6b240f363927cdab47ec8e0bb9fa180"
Expand Down
1 change: 1 addition & 0 deletions packages/placeholder-pdfkit/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist'
19 changes: 13 additions & 6 deletions packages/placeholder-pdfkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -40,8 +40,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -73,6 +79,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "^0.11.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
}
}
1 change: 1 addition & 0 deletions packages/placeholder-pdfkit010/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist'
19 changes: 13 additions & 6 deletions packages/placeholder-pdfkit010/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -40,8 +40,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -73,6 +79,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
1 change: 1 addition & 0 deletions packages/placeholder-plain/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/plainAddPlaceholder'
20 changes: 14 additions & 6 deletions packages/placeholder-plain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/plainAddPlaceholder.js",
"types": "dist/plainAddPlaceholder.d.ts",
"files": [
"dist",
"LICENSE",
Expand All @@ -38,8 +39,14 @@
},
"scripts": {
"test": "./node_modules/.bin/jest",
"build": "rm -rf ./dist/* & ./node_modules/.bin/babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/placeholder-pdfkit010": "^3.2.3",
Expand Down Expand Up @@ -68,6 +75,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
1 change: 1 addition & 0 deletions packages/signer-p12/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/P12Signer'
19 changes: 13 additions & 6 deletions packages/signer-p12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/P12Signer.js",
"types": "dist/P12Signer.d.ts",
Expand All @@ -41,8 +41,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -74,6 +80,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
1 change: 1 addition & 0 deletions packages/signpdf/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/signpdf'
20 changes: 14 additions & 6 deletions packages/signpdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/signpdf.js",
"types": "dist/signpdf.d.ts",
"files": [
"dist",
"LICENSE",
Expand All @@ -38,8 +39,14 @@
},
"scripts": {
"test": "./node_modules/.bin/jest",
"build": "rm -rf ./dist/* & ./node_modules/.bin/babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -71,6 +78,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
Loading

0 comments on commit 1c5eb64

Please sign in to comment.