Skip to content

Commit

Permalink
upgrade deps, properly expose types
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Mar 23, 2024
1 parent 21702c0 commit 4282a71
Show file tree
Hide file tree
Showing 15 changed files with 3,784 additions and 5,067 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ jobs:
yarn
yarn build
- name: Test
run: |
yarn lint
yarn test
run: yarn test
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
Expand All @@ -41,7 +39,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn lint
yarn test
yarn release
run: yarn release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.tshy

# Runtime data
pids
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const bmpData = {
data, // Buffer
bitPP: 1 | 2 | 4 | 16 | 24 | 32, // The number of bits per pixel
width, // Number
height // Number
height, // Number
};
// Compression is not supported
Expand Down Expand Up @@ -122,8 +122,8 @@ const rawData = bmp.encode({
{ red: 0, green: 255, blue: 255, quad: 0 },
{ red: 0, green: 255, blue: 0, quad: 0 },
{ red: 0, green: 0, blue: 255, quad: 0 },
{ red: 0, green: 0, blue: 0, quad: 0 }
]
{ red: 0, green: 0, blue: 0, quad: 0 },
],
});
fs.writeFileSync('./image.bmp', rawData.data);
Expand Down
8 changes: 0 additions & 8 deletions lib/index.ts

This file was deleted.

61 changes: 31 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"name": "bmp-ts",
"version": "1.0.4",
"description": "A pure typescript BMP encoder and decoder",
"main": "dist/index.js",
"exports": "./dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -19,41 +16,23 @@
"email": "[email protected]"
},
"scripts": {
"build": "tsc",
"lint": "tslint -p . --format stylish",
"build": "tshy",
"test": "jest",
"release": "auto shipit"
},
"dependencies": {
"@types/node": "^10.11.7"
},
"devDependencies": {
"@types/jest": "^23.3.5",
"auto": "^10.46.0",
"husky": "^1.1.2",
"jest": "^23.6.0",
"lint-staged": "^7.3.0",
"prettier": "^1.14.3",
"ts-jest": "^23.10.4",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"tslint-xo": "^0.9.0",
"typescript": "^3.1.3"
"@types/node": "^10.11.7",
"auto": "^11.1.2",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"tshy": "^1.12.0",
"typescript": "^5.4.3"
},
"prettier": {
"singleQuote": true
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,json,css,md}": [
"prettier --write",
"git add"
]
},
"keywords": [
"bmp",
"1bit",
Expand Down Expand Up @@ -99,5 +78,27 @@
"!**/node_modules/**",
"!**/vendor/**"
]
}
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"type": "module"
}
Loading

0 comments on commit 4282a71

Please sign in to comment.