Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(package.json): lint by publint #93

Merged
merged 3 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/large-keys-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"es-hangul": patch
---

ci(package.json): lint by publint
18 changes: 17 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ jobs:
- run:
name: Check Peer Dependency
command: ./.scripts/check-peer.sh || (echo "Peer Dependency 오류가 발생했습니다."; exit -1)
publint:
docker:
- image: cimg/node:20.12
steps:
- checkout
- setup
- run:
name: Build
command: yarn build
- run:
name: Check Publint
command: yarn publint

test:
docker:
Expand All @@ -75,7 +87,7 @@ jobs:
name: vitest
command: yarn vitest --reporter=junit > ./.junit
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
- store_test_results:
path: ./.junit
- store_artifacts:
Expand All @@ -101,3 +113,7 @@ workflows:
filters:
branches:
ignore: main
- publint:
filters:
branches:
ignore: main
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@
"repository": "github:toss/es-hangul",
"license": "MIT",
"packageManager": "yarn@4.1.1",
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/*"
],
Expand All @@ -38,6 +46,7 @@
"changeset:publish": "changeset publish",
"changeset:version": "changeset version",
"packlint": "packlint sort -R",
"publint": "publint --strict",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 --strict 옵션이 어떤 역할을 해주나요?
publint가 문서가 잘 되어있지는 �않은것 같아서 strict 옵션에 대한 설명을 찾지 못했습니당 ㅠ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strict옵션이 있으면 warning도 error로 체크할 수 있게 됩니다 그래서 더 엄격히 검사할 수 있는 장점이 있어요
https://github.com/bluwy/publint/blob/master/pkg/src/index.js#L381-L387

문서화가 잘 되어있지 않네요..! 이 부분 저 레포에 기여해보아야겠어요👍

"test": "vitest run --coverage --typecheck",
"test:watch": "vitest --ui --coverage --typecheck",
"typecheck": "tsc --noEmit"
Expand All @@ -55,23 +64,13 @@
"eslint-config-prettier": "^8.5.0",
"packlint": "^0.2.4",
"prettier": "^3.2.5",
"publint": "^0.2.7",
"tsup": "^8.0.2",
"typescript": "^5.4.3",
"vitest": "^1.5.0"
},
"publishConfig": {
"access": "public",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
}
"access": "public"
},
"import": "./dist/index.mjs"
}
77 changes: 76 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3907,6 +3907,7 @@ __metadata:
eslint-config-prettier: "npm:^8.5.0"
packlint: "npm:^0.2.4"
prettier: "npm:^3.2.5"
publint: "npm:^0.2.7"
tsup: "npm:^8.0.2"
typescript: "npm:^5.4.3"
vitest: "npm:^1.5.0"
Expand Down Expand Up @@ -5142,6 +5143,19 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^8.0.1":
version: 8.1.0
resolution: "glob@npm:8.1.0"
dependencies:
fs.realpath: "npm:^1.0.0"
inflight: "npm:^1.0.4"
inherits: "npm:2"
minimatch: "npm:^5.0.1"
once: "npm:^1.3.0"
checksum: 10c0/cb0b5cab17a59c57299376abe5646c7070f8acb89df5595b492dba3bfb43d301a46c01e5695f01154e6553168207cb60d4eaf07d3be4bc3eb9b0457c5c561d0f
languageName: node
linkType: hard

"globals@npm:^11.1.0":
version: 11.12.0
resolution: "globals@npm:11.12.0"
Expand Down Expand Up @@ -5566,6 +5580,15 @@ __metadata:
languageName: node
linkType: hard

"ignore-walk@npm:^5.0.1":
version: 5.0.1
resolution: "ignore-walk@npm:5.0.1"
dependencies:
minimatch: "npm:^5.0.1"
checksum: 10c0/0d157a54d6d11af0c3059fdc7679eef3b074e9a663d110a76c72788e2fb5b22087e08b21ab767718187ac3396aca4d0aa6c6473f925b19a74d9a00480ca7a76e
languageName: node
linkType: hard

"ignore@npm:^4.0.6":
version: 4.0.6
resolution: "ignore@npm:4.0.6"
Expand Down Expand Up @@ -7520,6 +7543,15 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^5.0.1":
version: 5.1.6
resolution: "minimatch@npm:5.1.6"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10c0/3defdfd230914f22a8da203747c42ee3c405c39d4d37ffda284dac5e45b7e1f6c49aa8be606509002898e73091ff2a3bbfc59c2c6c71d4660609f63aa92f98e3
languageName: node
linkType: hard

"minimatch@npm:^9.0.1":
version: 9.0.4
resolution: "minimatch@npm:9.0.4"
Expand Down Expand Up @@ -7969,6 +8001,36 @@ __metadata:
languageName: node
linkType: hard

"npm-bundled@npm:^2.0.0":
version: 2.0.1
resolution: "npm-bundled@npm:2.0.1"
dependencies:
npm-normalize-package-bin: "npm:^2.0.0"
checksum: 10c0/5b2dc1de455d38200e49c6205dee185ce919ea6b608672c693bec8907116bc5686dabcc150347630d351c1c533315fd60a1910ce00bdad6bb204cef016b90b7d
languageName: node
linkType: hard

"npm-normalize-package-bin@npm:^2.0.0":
version: 2.0.0
resolution: "npm-normalize-package-bin@npm:2.0.0"
checksum: 10c0/9b5283a2e423124c60fbc14244d36686b59e517d29156eacf9df8d3dc5d5bf4d9444b7669c607567ed2e089bbdbef5a2b3678cbf567284eeff3612da6939514b
languageName: node
linkType: hard

"npm-packlist@npm:^5.1.3":
version: 5.1.3
resolution: "npm-packlist@npm:5.1.3"
dependencies:
glob: "npm:^8.0.1"
ignore-walk: "npm:^5.0.1"
npm-bundled: "npm:^2.0.0"
npm-normalize-package-bin: "npm:^2.0.0"
bin:
npm-packlist: bin/index.js
checksum: 10c0/a8bea97661b2a7132bc8832d5560da24f823ee5324429bd16eb82b7873557de14641bc3fed8a7611b0d88b9771e59e99e01a9e551a53adb164327ded6128aada
languageName: node
linkType: hard

"npm-run-path@npm:^2.0.0":
version: 2.0.2
resolution: "npm-run-path@npm:2.0.2"
Expand Down Expand Up @@ -8689,6 +8751,19 @@ __metadata:
languageName: node
linkType: hard

"publint@npm:^0.2.7":
version: 0.2.7
resolution: "publint@npm:0.2.7"
dependencies:
npm-packlist: "npm:^5.1.3"
picocolors: "npm:^1.0.0"
sade: "npm:^1.8.1"
bin:
publint: lib/cli.js
checksum: 10c0/dfa476c77c2644de6986ef94616780cc44398bbfe6f56a790aadbfa0ec9d41a136c8a0c5a0a999ceb8bcee0d5736c3e93a5f28662c515c47ad6eba03244edea0
languageName: node
linkType: hard

"punycode@npm:^2.1.0":
version: 2.3.1
resolution: "punycode@npm:2.3.1"
Expand Down Expand Up @@ -9180,7 +9255,7 @@ __metadata:
languageName: node
linkType: hard

"sade@npm:^1.7.3":
"sade@npm:^1.7.3, sade@npm:^1.8.1":
version: 1.8.1
resolution: "sade@npm:1.8.1"
dependencies:
Expand Down