Skip to content

Commit

Permalink
fix: invalid types publication for esm
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed May 20, 2023
1 parent 1867000 commit 00a9cc3
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 23 deletions.
7 changes: 7 additions & 0 deletions .changeset/fresh-shirts-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@soluble/cache-interop": patch
"@soluble/cache-ioredis": patch
"@soluble/cache-redis": patch
---

Fix export types publication
7 changes: 7 additions & 0 deletions .changeset/sixty-brooms-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@soluble/cache-interop": patch
"@soluble/cache-ioredis": patch
"@soluble/cache-redis": patch
---

Add publint check to prevent publication issues
39 changes: 22 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,60 +22,65 @@ jobs:
# This allows yarn workspaces --since to compare with origin/main branch
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
- name: ⚙️ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: 📥 Monorepo install
uses: ./.github/actions/yarn-nm-install

- name: Restore dx caches
- name: ♻️ Restore packages cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/**/tsconfig.tsbuildinfo
key: ${{ runner.os }}-dx-${{ hashFiles('**/yarn.lock') }}

- name: Linter
- name: List changed workspaces
run: yarn workspaces list --since --recursive --json

- name: 🔬 ESLint checks
run: |
yarn workspaces foreach --exclude '@examples/**' -v run lint
- name: Typecheck
- name: 🕵️ Typecheck
run: |
yarn workspaces foreach --exclude '@examples/**' -v run typecheck
- name: List changed workspaces
run: yarn workspaces list --since --recursive --json

- name: Build-release
- name: 🏗 Build packages
# Till https://github.com/atlassian/changesets/issues/432 has a solution we can remove the
# build-release and replace with a regular build command
run: |
yarn workspaces foreach --exclude '@examples/**' -tv run build-release
- name: Check generated dist folder
- name: 📐 Check build for size-limits
run: |
yarn workspaces foreach -v run check-dist
yarn workspaces foreach -v run size-limit
- name: Check for bundle size limits
- name: 🛟 Check build for ecmascript compliance
if: matrix.node-version == '18.x'
run: |
yarn workspaces foreach -v run size-limit
yarn workspaces foreach -v run check-dist
- name: 🛟 Check publishable dist (publint)
if: matrix.node-version == '18.x'
run: yarn workspaces foreach -tv --include '@httpx/*' --no-private run check-pub

- name: E2E tests
- name: 🧪 Unit tests
run: |
yarn g:test-e2e --coverage
yarn workspaces foreach -tv --include '@soluble/*' --exclude '@examples/*' run test-unit --coverage
env:
CI: true

- name: Unit tests
- name: 🧪 E2E tests
run: |
yarn workspaces foreach -tv --include '@soluble/*' --exclude '@examples/*' run test-unit --coverage
yarn g:test-e2e --coverage
env:
CI: true

- name: Send coverage to codecov.io
- name: ☂️ Codecov upload
working-directory: ${{ github.workspace }}
if: matrix.node-version == '18.x'
run: |
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"g:build-release": "yarn workspaces foreach -tv run build-release",
"g:size-limit": "yarn workspaces foreach -v --no-private run size-limit",
"g:check-dist": "yarn workspaces foreach -v --no-private run check-dist",
"g:check-pub": "yarn workspaces foreach -v --no-private run check-pub",
"g:clean": "yarn clean:global-cache && yarn workspaces foreach -pv run clean",
"g:build-api-doc": "yarn workspaces foreach -pv run build-api-doc",
"g:test": "run-s g:test-unit g:test-e2e",
Expand Down
6 changes: 4 additions & 2 deletions packages/cache-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.js"
},
"./package.json": "./package.json"
},
Expand All @@ -41,6 +41,7 @@
"build-release": "yarn build",
"check-size": "size-limit",
"check-dist": "es-check -v",
"check-pub": "publint",
"clean": "rimraf ./dist ./build ./coverage ./out ./node_modules/.cache",
"test-unit": "jest --config jest.config.js --color $@",
"typecheck": "tsc --project ./tsconfig.json --noEmit",
Expand All @@ -61,6 +62,7 @@
"eslint": "8.41.0",
"get-tsconfig": "4.5.0",
"jest": "29.5.0",
"publint": "^0.1.11",
"rimraf": "5.0.1",
"size-limit": "8.2.4",
"ts-jest": "29.1.0",
Expand Down
6 changes: 4 additions & 2 deletions packages/cache-ioredis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.js"
},
"./package.json": "./package.json"
},
Expand All @@ -44,6 +44,7 @@
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
"check-size": "size-limit",
"check-dist": "es-check -v",
"check-pub": "publint",
"clean": "rimraf ./dist ./build ./coverage ./out ./_release ./node_modules/.cache",
"test": "run-s test-unit",
"test-unit": "jest --config jest.config.js --color $@",
Expand All @@ -68,6 +69,7 @@
"eslint": "8.41.0",
"get-tsconfig": "4.5.0",
"jest": "29.5.0",
"publint": "^0.1.11",
"rimraf": "5.0.1",
"size-limit": "8.2.4",
"ts-jest": "29.1.0",
Expand Down
6 changes: 4 additions & 2 deletions packages/cache-redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.js"
},
"./package.json": "./package.json"
},
Expand All @@ -45,6 +45,7 @@
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
"check-size": "size-limit",
"check-dist": "es-check -v",
"check-pub": "publint",
"clean": "rimraf ./dist ./build ./coverage ./out ./_release ./node_modules/.cache",
"test": "yarn run test-unit",
"test-unit": "jest --config jest.config.js --color $@",
Expand All @@ -69,6 +70,7 @@
"eslint": "8.41.0",
"get-tsconfig": "4.5.0",
"jest": "29.5.0",
"publint": "^0.1.11",
"redis": "3.1.2",
"rimraf": "5.0.1",
"size-limit": "8.2.4",
Expand Down
2 changes: 2 additions & 0 deletions packages/dsn-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"check-dist": "run-s check-dist-esm check-dist-cjs",
"check-dist-cjs": "es-check --not './dist/*.map.js' -v es2017 './dist/**/*.js'",
"check-dist-esm": "es-check --not './dist/*.map.js' -v es2017 --module './dist/**/*.mjs'",
"check-pub": "publint",
"clean": "rimraf ./dist ./build ./coverage ./_release",
"test-unit": "jest --config jest.config.mjs --color $@",
"typecheck": "tsc --project tsconfig.json --noEmit",
Expand All @@ -64,6 +65,7 @@
"get-tsconfig": "4.5.0",
"jest": "29.5.0",
"npm-run-all": "4.1.5",
"publint": "^0.1.11",
"rimraf": "5.0.1",
"size-limit": "8.2.4",
"ts-jest": "29.1.0",
Expand Down
72 changes: 72 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,7 @@ __metadata:
eslint: "npm:8.41.0"
get-tsconfig: "npm:4.5.0"
jest: "npm:29.5.0"
publint: "npm:^0.1.11"
rimraf: "npm:5.0.1"
size-limit: "npm:8.2.4"
ts-jest: "npm:29.1.0"
Expand All @@ -1857,6 +1858,7 @@ __metadata:
get-tsconfig: "npm:4.5.0"
ioredis: "npm:^5.3.2"
jest: "npm:29.5.0"
publint: "npm:^0.1.11"
rimraf: "npm:5.0.1"
size-limit: "npm:8.2.4"
ts-jest: "npm:29.1.0"
Expand All @@ -1881,6 +1883,7 @@ __metadata:
eslint: "npm:8.41.0"
get-tsconfig: "npm:4.5.0"
jest: "npm:29.5.0"
publint: "npm:^0.1.11"
redis: "npm:3.1.2"
rimraf: "npm:5.0.1"
size-limit: "npm:8.2.4"
Expand Down Expand Up @@ -1912,6 +1915,7 @@ __metadata:
get-tsconfig: "npm:4.5.0"
jest: "npm:29.5.0"
npm-run-all: "npm:4.1.5"
publint: "npm:^0.1.11"
rimraf: "npm:5.0.1"
size-limit: "npm:8.2.4"
ts-jest: "npm:29.1.0"
Expand Down Expand Up @@ -5539,6 +5543,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: c7b4771272ff78a248742c51cc9e03d45aed0df922d1939f41eaab8bf3bffe06c376cb3222938297850cdcf81acf39f8427779f69d41bb29e4489d16503987d2
languageName: node
linkType: hard

"ignore@npm:^5.2.0":
version: 5.2.1
resolution: "ignore@npm:5.2.1"
Expand Down Expand Up @@ -7351,6 +7364,13 @@ __metadata:
languageName: node
linkType: hard

"mri@npm:^1.1.0":
version: 1.2.0
resolution: "mri@npm:1.2.0"
checksum: f459cd82edbe77b6296cc59a5005c351cd52f6a6d733539ae91f6dbc61a23c6e558bf9dea2703212b2caf1b0803852f357325612ba848795686577432740bd49
languageName: node
linkType: hard

"ms@npm:2.1.2":
version: 2.1.2
resolution: "ms@npm:2.1.2"
Expand Down Expand Up @@ -7588,6 +7608,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: fedd0950ef7edb74f0133d7d007d7e90c783f9df4765e1e1d9f24deee56ec2435772001e5c3fef92d3f60ae0a337b1f8814744aa28b8f93d5ef884813970f4c2
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: c64469d165d71ea4c3d53a51672a73c011b707c4d4a0a76b94f24ccf309c7c4d5d7057aa72d7051c71dc1351ecce5083de9d15e9822ca04f1cb9c586962376be
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: e5e7bee37507c3c1cb8b17abc78bf31f1e984d527958cfa1ac3291423b77e56435bb460ac9db1dba2d1f1c5117d0e3c1623facd8eda6e964b0d02c477e04cef1
languageName: node
linkType: hard

"npm-run-all@npm:4.1.5":
version: 4.1.5
resolution: "npm-run-all@npm:4.1.5"
Expand Down Expand Up @@ -8178,6 +8228,19 @@ __metadata:
languageName: node
linkType: hard

"publint@npm:^0.1.11":
version: 0.1.11
resolution: "publint@npm:0.1.11"
dependencies:
npm-packlist: "npm:^5.1.3"
picocolors: "npm:^1.0.0"
sade: "npm:^1.8.1"
bin:
publint: lib/cli.js
checksum: 5af5db0ba2cff5431f0759b1907bc450d003de8b44a53b0ca037185eb2eb9f84509aaab99bd6340dda21fc0d639a05da9f46a7646a9c9927800e60552e68f91f
languageName: node
linkType: hard

"pump@npm:^3.0.0":
version: 3.0.0
resolution: "pump@npm:3.0.0"
Expand Down Expand Up @@ -8645,6 +8708,15 @@ __metadata:
languageName: node
linkType: hard

"sade@npm:^1.8.1":
version: 1.8.1
resolution: "sade@npm:1.8.1"
dependencies:
mri: "npm:^1.1.0"
checksum: da67f42ec984b58d0eac48d160e4da6d966416bafb88c37556f41f8a52c1ff897ca065984da3d62557ed8622c9999493f133ed6af63e4ea5191342029f37455c
languageName: node
linkType: hard

"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1":
version: 5.1.2
resolution: "safe-buffer@npm:5.1.2"
Expand Down

0 comments on commit 00a9cc3

Please sign in to comment.