-
Notifications
You must be signed in to change notification settings - Fork 50
fix: standardize package publishing hygiene (PLT-847) #321
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| "@sei-js/create-sei": patch | ||
| "@sei-js/ledger": patch | ||
| "@sei-js/mcp-server": patch | ||
| "@sei-js/precompiles": patch | ||
| "@sei-js/registry": patch | ||
| "@sei-js/sei-global-wallet": patch | ||
| --- | ||
|
|
||
| Standardize published package contents, licensing, and type resolution. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,3 +29,6 @@ jobs: | |
|
|
||
| - name: Test | ||
| run: pnpm test:all | ||
|
|
||
| - name: Validate Published Packages | ||
| run: pnpm lint:pack:all | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,10 @@ | |
| "license": "MIT", | ||
| "scripts": { | ||
| "build:all": "pnpm -r run build", | ||
| "lint:pack:all": "pnpm lint:pack:publint && pnpm lint:pack:types && pnpm lint:pack:types:mcp", | ||
| "lint:pack:publint": "pnpm --recursive --filter './packages/*' exec publint --pack npm --strict --level warning", | ||
| "lint:pack:types": "pnpm --recursive --filter './packages/*' --filter '!@sei-js/create-sei' --filter '!@sei-js/mcp-server' exec attw --pack . --profile node16", | ||
| "lint:pack:types:mcp": "pnpm --filter @sei-js/mcp-server exec attw --pack . --profile esm-only", | ||
| "release": "changeset publish && git push --follow-tags", | ||
| "release:internal": "pnpm build:all && pnpm changeset && pnpm changeset version --snapshot internal && pnpm changeset publish --no-git-tag --snapshot --tag internal", | ||
| "test:all": "pnpm -r run test", | ||
|
|
@@ -15,9 +19,12 @@ | |
| "@changesets/cli": "^2.28.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@arethetypeswrong/cli": "0.18.5", | ||
| "@types/jest": "^29.5.14", | ||
| "@types/node": "^22.13.13", | ||
| "esbuild": "^0.28.2", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [suggestion] Separately: |
||
| "jest": "^29.7.0", | ||
| "publint": "0.3.23", | ||
| "rimraf": "^3.0.2", | ||
| "ts-jest": "^29.3.0", | ||
| "ts-node": "2.1.2", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2024-2026 Sei Labs | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2024-2026 Sei Labs | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| "version": "1.1.6", | ||
| "description": "TypeScript library for SEI Ledger app helper functions", | ||
| "main": "./dist/cjs/src/index.js", | ||
| "module": "./dist/esm/src/index.js", | ||
| "module": "./dist/esm/src/index.mjs", | ||
| "types": "./dist/types/src/index.d.ts", | ||
| "sideEffects": false, | ||
| "files": [ | ||
|
|
@@ -12,7 +12,7 @@ | |
| "scripts": { | ||
| "build": "rimraf dist && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", | ||
| "build:cjs": "tsc --outDir dist/cjs --module commonjs", | ||
| "build:esm": "tsc --outDir dist/esm --module esnext", | ||
| "build:esm": "esbuild src/index.ts --bundle --format=esm --platform=neutral --packages=external --target=es2020 --outfile=dist/esm/src/index.mjs", | ||
|
alexander-sei marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [suggestion] Two notes on the esbuild switch, both of which also apply to
|
||
| "build:types": "tsc --project ./tsconfig.declaration.json", | ||
| "test": "jest" | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "exclude": ["node_modules", "dist", "src/tests/**/*", "**/*.spec.ts", "**/*.test.ts", "**/*.spec.js", "**/*.test.js", "**/__tests__/**/*"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] This |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "include": ["src"], | ||
| "exclude": ["node_modules", "dist", "src/tests/**/*", "**/*.spec.ts", "**/*.test.ts", "**/*.spec.js", "**/*.test.js", "**/__tests__/**/*"], | ||
| "compilerOptions": { | ||
| "rootDir": "./src", | ||
| "outDir": "./dist/esm", | ||
| "moduleResolution": "node", | ||
| "module": "ES2020", | ||
| "moduleResolution": "Node16", | ||
|
alexander-sei marked this conversation as resolved.
|
||
| "module": "Node16", | ||
| "target": "ES2020" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,10 @@ | |
| "compilerOptions": { | ||
| "types": ["jest", "node"], | ||
| "isolatedModules": true, | ||
| "resolveJsonModule": true | ||
| "resolveJsonModule": true, | ||
| "module": "ES2020", | ||
| "moduleResolution": "Bundler" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [suggestion] This project now resolves to zero input files. Nothing breaks today because ts-jest reads only Add an override alongside the new compiler options: "exclude": ["node_modules", "dist"], |
||
| }, | ||
| "exclude": ["node_modules", "dist"], | ||
| "include": ["src/tests/**/*.test.ts"] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2025-2026 Sei Labs | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2024-2026 Sei Labs | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| "version": "1.0.4", | ||
| "description": "TypeScript library for Sei chain constants and assets", | ||
| "main": "./dist/cjs/src/index.js", | ||
| "module": "./dist/esm/src/index.js", | ||
| "module": "./dist/esm/src/index.mjs", | ||
|
alexander-sei marked this conversation as resolved.
|
||
| "types": "./dist/types/src/index.d.ts", | ||
| "sideEffects": false, | ||
| "files": [ | ||
|
|
@@ -12,7 +12,7 @@ | |
| "scripts": { | ||
| "build": "rimraf dist && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", | ||
| "build:cjs": "tsc --outDir dist/cjs --module commonjs", | ||
| "build:esm": "tsc --outDir dist/esm --module esnext", | ||
| "build:esm": "esbuild src/index.ts --bundle --format=esm --platform=neutral --packages=external --target=es2020 --outfile=dist/esm/src/index.mjs", | ||
|
alexander-sei marked this conversation as resolved.
alexander-sei marked this conversation as resolved.
|
||
| "build:types": "tsc --project ./tsconfig.declaration.json", | ||
| "test": "jest", | ||
| "postinstall": "git submodule update --init --recursive" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [suggestion] Pre-existing, but squarely in this PR's scope: |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ISC License | ||
|
|
||
| Copyright (c) 2025-2026 Sei Labs | ||
|
|
||
| Permission to use, copy, modify, and/or distribute this software for any | ||
| purpose with or without fee is hereby granted, provided that the above | ||
| copyright notice and this permission notice appear in all copies. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
| AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
| OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
| PERFORMANCE OF THIS SOFTWARE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] Chaining with
&&means a publint failure short-circuits before ATTW ever runs, so a CI run surfaces one class of packaging problem at a time. Minor, but for a validation aggregate it's usually nicer to run all three and fail at the end.