Skip to content

Commit

Permalink
Deprecate web-image-gen-common npm package.
Browse files Browse the repository at this point in the history
- Move code to pkgs that use it.
- Move types to pkgs that use them.
- Only thing remains is truly common types.
- `common` dir no longer used as pkg, but via symlinks.
- `ImageSet` type is re-exported by other pkgs.
- `Credit` and `Meta` types deprecated, user can type their own
  metadata json.

Issue #4
  • Loading branch information
brev committed Nov 2, 2023
1 parent 1d24693 commit 430cf70
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 167 deletions.
2 changes: 0 additions & 2 deletions packages/common/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
coverage/
dist/
node_modules/

.DS_Store
31 changes: 7 additions & 24 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "web-image-gen-common",
"version": "1.0.6",
"description": "Common code for web-image-gen*",
"name": "common",
"version": "0.0.0",
"description": "Common code for web-image-gen*, shared via symlinks.",
"homepage": "https://github.com/brev/web-image-gen/tree/main/packages/common",
"license": "MIT",
"private": true,
"type": "module",
"types": "./types/index.d.ts",
"author": {
"name": "Brev Patterson",
"url": "https://github.com/brev"
Expand All @@ -19,16 +21,12 @@
"eslint-config-prettier": "^9.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"typescript": "^5.2.2"
},
"exports": {
"./package.json": "./package.json",
"./const": "./dist/const.js",
"./stub": "./dist/stub.js"
"./package.json": "./package.json"
},
"files": [
"dist/*",
"types/*"
],
"keywords": [
Expand All @@ -45,22 +43,7 @@
"scripts": {
"bin:eslint": "eslint --ignore-path .gitignore .",
"bin:prettier": "prettier --ignore-path .gitignore .",
"bin:tsc": "tsc",
"build": "run-s bin:tsc",
"build:watch": "run-s 'bin:tsc --watch'",
"clean": "rimraf coverage/ dist/",
"format": "run-s 'bin:prettier --write --list-different'",
"lint": "run-s 'bin:prettier --check' bin:eslint 'bin:tsc --noEmit'"
},
"types": "./types/index.d.ts",
"typesVersions": {
"*": {
"const": [
"./dist/const.d.ts"
],
"stub": [
"./dist/stub.d.ts"
]
}
"lint": "run-s 'bin:prettier --check' bin:eslint"
}
}
19 changes: 0 additions & 19 deletions packages/common/src/const.ts

This file was deleted.

44 changes: 0 additions & 44 deletions packages/common/src/stub.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/common/tsconfig.json

This file was deleted.

27 changes: 0 additions & 27 deletions packages/common/types/Arguments.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions packages/common/types/Config.d.ts

This file was deleted.

4 changes: 1 addition & 3 deletions packages/common/types/ImageSet.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import type { Meta } from './Meta'

export type ImageSet = {
default: string
formats: {
[key: string]: Record<string, string>
}
meta: Meta | null
meta: Record<string, any> | null // eslint-disable-line @typescript-eslint/no-explicit-any
placeholder: string
sizes: {
[key: string]: Record<string, string>
Expand Down
10 changes: 0 additions & 10 deletions packages/common/types/Meta.d.ts

This file was deleted.

5 changes: 1 addition & 4 deletions packages/common/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export * from './Arguments'
export * from './Config'
export * from './ImageSet'
export * from './Meta'
export type * from './ImageSet'

0 comments on commit 430cf70

Please sign in to comment.