Skip to content

Commit 7785b05

Browse files
authored
Merge pull request #883 from soluble-io/fix-types-publication
fix: invalid types publication for esm
2 parents 504fab2 + c7e4ba9 commit 7785b05

File tree

9 files changed

+123
-23
lines changed

9 files changed

+123
-23
lines changed

.changeset/fresh-shirts-sniff.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@soluble/cache-interop": patch
3+
"@soluble/cache-ioredis": patch
4+
"@soluble/cache-redis": patch
5+
---
6+
7+
Fix export types publication

.changeset/sixty-brooms-approve.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@soluble/cache-interop": patch
3+
"@soluble/cache-ioredis": patch
4+
"@soluble/cache-redis": patch
5+
---
6+
7+
Add publint check to prevent publication issues

.github/workflows/ci.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,60 +22,65 @@ jobs:
2222
# This allows yarn workspaces --since to compare with origin/main branch
2323
fetch-depth: 0
2424

25-
- name: Use Node.js ${{ matrix.node-version }}
25+
- name: ⚙️ Use Node.js ${{ matrix.node-version }}
2626
uses: actions/setup-node@v3
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929

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

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

41-
- name: Linter
41+
- name: List changed workspaces
42+
run: yarn workspaces list --since --recursive --json
43+
44+
- name: 🔬 ESLint checks
4245
run: |
4346
yarn workspaces foreach --exclude '@examples/**' -v run lint
4447
45-
- name: Typecheck
48+
- name: 🕵️ Typecheck
4649
run: |
4750
yarn workspaces foreach --exclude '@examples/**' -v run typecheck
4851
49-
- name: List changed workspaces
50-
run: yarn workspaces list --since --recursive --json
51-
52-
- name: Build-release
52+
- name: 🏗 Build packages
5353
# Till https://github.com/atlassian/changesets/issues/432 has a solution we can remove the
5454
# build-release and replace with a regular build command
5555
run: |
5656
yarn workspaces foreach --exclude '@examples/**' -tv run build-release
5757
58-
- name: Check generated dist folder
58+
- name: 📐 Check build for size-limits
5959
run: |
60-
yarn workspaces foreach -v run check-dist
60+
yarn workspaces foreach -v run size-limit
6161
62-
- name: Check for bundle size limits
62+
- name: 🛟 Check build for ecmascript compliance
63+
if: matrix.node-version == '18.x'
6364
run: |
64-
yarn workspaces foreach -v run size-limit
65+
yarn workspaces foreach -v run check-dist
66+
67+
- name: 🛟 Check publishable dist (publint)
68+
if: matrix.node-version == '18.x'
69+
run: yarn workspaces foreach -tv --include '@httpx/*' --no-private run check-pub
6570

66-
- name: E2E tests
71+
- name: 🧪 Unit tests
6772
run: |
68-
yarn g:test-e2e --coverage
73+
yarn workspaces foreach -tv --include '@soluble/*' --exclude '@examples/*' run test-unit --coverage
6974
env:
7075
CI: true
7176

72-
- name: Unit tests
77+
- name: 🧪 E2E tests
7378
run: |
74-
yarn workspaces foreach -tv --include '@soluble/*' --exclude '@examples/*' run test-unit --coverage
79+
yarn g:test-e2e --coverage
7580
env:
7681
CI: true
7782

78-
- name: Send coverage to codecov.io
83+
- name: ☂️ Codecov upload
7984
working-directory: ${{ github.workspace }}
8085
if: matrix.node-version == '18.x'
8186
run: |

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"g:build-release": "yarn workspaces foreach -tv run build-release",
2626
"g:size-limit": "yarn workspaces foreach -v --no-private run size-limit",
2727
"g:check-dist": "yarn workspaces foreach -v --no-private run check-dist",
28+
"g:check-pub": "yarn workspaces foreach -v --no-private run check-pub",
2829
"g:clean": "yarn clean:global-cache && yarn workspaces foreach -pv run clean",
2930
"g:build-api-doc": "yarn workspaces foreach -pv run build-api-doc",
3031
"g:test": "run-s g:test-unit g:test-e2e",

packages/cache-interop/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"types": "./dist/index.d.ts",
2525
"exports": {
2626
".": {
27+
"types": "./dist/index.d.ts",
2728
"require": "./dist/index.cjs",
28-
"import": "./dist/index.js",
29-
"types": "./dist/index.d.ts"
29+
"import": "./dist/index.js"
3030
},
3131
"./package.json": "./package.json"
3232
},
@@ -41,6 +41,7 @@
4141
"build-release": "yarn build",
4242
"check-size": "size-limit",
4343
"check-dist": "es-check -v",
44+
"check-pub": "publint",
4445
"clean": "rimraf ./dist ./build ./coverage ./out ./node_modules/.cache",
4546
"test-unit": "jest --config jest.config.js --color $@",
4647
"typecheck": "tsc --project ./tsconfig.json --noEmit",
@@ -61,6 +62,7 @@
6162
"eslint": "8.41.0",
6263
"get-tsconfig": "4.5.0",
6364
"jest": "29.5.0",
65+
"publint": "0.1.11",
6466
"rimraf": "5.0.1",
6567
"size-limit": "8.2.4",
6668
"ts-jest": "29.1.0",

packages/cache-ioredis/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"types": "./dist/index.d.ts",
2525
"exports": {
2626
".": {
27+
"types": "./dist/index.d.ts",
2728
"require": "./dist/index.cjs",
28-
"import": "./dist/index.js",
29-
"types": "./dist/index.d.ts"
29+
"import": "./dist/index.js"
3030
},
3131
"./package.json": "./package.json"
3232
},
@@ -44,6 +44,7 @@
4444
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
4545
"check-size": "size-limit",
4646
"check-dist": "es-check -v",
47+
"check-pub": "publint",
4748
"clean": "rimraf ./dist ./build ./coverage ./out ./_release ./node_modules/.cache",
4849
"test": "run-s test-unit",
4950
"test-unit": "jest --config jest.config.js --color $@",
@@ -68,6 +69,7 @@
6869
"eslint": "8.41.0",
6970
"get-tsconfig": "4.5.0",
7071
"jest": "29.5.0",
72+
"publint": "0.1.11",
7173
"rimraf": "5.0.1",
7274
"size-limit": "8.2.4",
7375
"ts-jest": "29.1.0",

packages/cache-redis/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"types": "./dist/index.d.ts",
2626
"exports": {
2727
".": {
28+
"types": "./dist/index.d.ts",
2829
"require": "./dist/index.cjs",
29-
"import": "./dist/index.js",
30-
"types": "./dist/index.d.ts"
30+
"import": "./dist/index.js"
3131
},
3232
"./package.json": "./package.json"
3333
},
@@ -45,6 +45,7 @@
4545
"build-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
4646
"check-size": "size-limit",
4747
"check-dist": "es-check -v",
48+
"check-pub": "publint",
4849
"clean": "rimraf ./dist ./build ./coverage ./out ./_release ./node_modules/.cache",
4950
"test": "yarn run test-unit",
5051
"test-unit": "jest --config jest.config.js --color $@",
@@ -69,6 +70,7 @@
6970
"eslint": "8.41.0",
7071
"get-tsconfig": "4.5.0",
7172
"jest": "29.5.0",
73+
"publint": "0.1.11",
7274
"redis": "3.1.2",
7375
"rimraf": "5.0.1",
7476
"size-limit": "8.2.4",

packages/dsn-parser/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"check-dist": "run-s check-dist-esm check-dist-cjs",
4646
"check-dist-cjs": "es-check --not './dist/*.map.js' -v es2017 './dist/**/*.js'",
4747
"check-dist-esm": "es-check --not './dist/*.map.js' -v es2017 --module './dist/**/*.mjs'",
48+
"check-pub": "publint",
4849
"clean": "rimraf ./dist ./build ./coverage ./_release",
4950
"test-unit": "jest --config jest.config.mjs --color $@",
5051
"typecheck": "tsc --project tsconfig.json --noEmit",
@@ -64,6 +65,7 @@
6465
"get-tsconfig": "4.5.0",
6566
"jest": "29.5.0",
6667
"npm-run-all": "4.1.5",
68+
"publint": "0.1.11",
6769
"rimraf": "5.0.1",
6870
"size-limit": "8.2.4",
6971
"ts-jest": "29.1.0",

yarn.lock

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,6 +1824,7 @@ __metadata:
18241824
eslint: "npm:8.41.0"
18251825
get-tsconfig: "npm:4.5.0"
18261826
jest: "npm:29.5.0"
1827+
publint: "npm:0.1.11"
18271828
rimraf: "npm:5.0.1"
18281829
size-limit: "npm:8.2.4"
18291830
ts-jest: "npm:29.1.0"
@@ -1850,6 +1851,7 @@ __metadata:
18501851
get-tsconfig: "npm:4.5.0"
18511852
ioredis: "npm:^5.3.2"
18521853
jest: "npm:29.5.0"
1854+
publint: "npm:0.1.11"
18531855
rimraf: "npm:5.0.1"
18541856
size-limit: "npm:8.2.4"
18551857
ts-jest: "npm:29.1.0"
@@ -1874,6 +1876,7 @@ __metadata:
18741876
eslint: "npm:8.41.0"
18751877
get-tsconfig: "npm:4.5.0"
18761878
jest: "npm:29.5.0"
1879+
publint: "npm:0.1.11"
18771880
redis: "npm:3.1.2"
18781881
rimraf: "npm:5.0.1"
18791882
size-limit: "npm:8.2.4"
@@ -1905,6 +1908,7 @@ __metadata:
19051908
get-tsconfig: "npm:4.5.0"
19061909
jest: "npm:29.5.0"
19071910
npm-run-all: "npm:4.1.5"
1911+
publint: "npm:0.1.11"
19081912
rimraf: "npm:5.0.1"
19091913
size-limit: "npm:8.2.4"
19101914
ts-jest: "npm:29.1.0"
@@ -5476,6 +5480,15 @@ __metadata:
54765480
languageName: node
54775481
linkType: hard
54785482

5483+
"ignore-walk@npm:^5.0.1":
5484+
version: 5.0.1
5485+
resolution: "ignore-walk@npm:5.0.1"
5486+
dependencies:
5487+
minimatch: "npm:^5.0.1"
5488+
checksum: c7b4771272ff78a248742c51cc9e03d45aed0df922d1939f41eaab8bf3bffe06c376cb3222938297850cdcf81acf39f8427779f69d41bb29e4489d16503987d2
5489+
languageName: node
5490+
linkType: hard
5491+
54795492
"ignore@npm:^5.2.0":
54805493
version: 5.2.1
54815494
resolution: "ignore@npm:5.2.1"
@@ -7281,6 +7294,13 @@ __metadata:
72817294
languageName: node
72827295
linkType: hard
72837296

7297+
"mri@npm:^1.1.0":
7298+
version: 1.2.0
7299+
resolution: "mri@npm:1.2.0"
7300+
checksum: f459cd82edbe77b6296cc59a5005c351cd52f6a6d733539ae91f6dbc61a23c6e558bf9dea2703212b2caf1b0803852f357325612ba848795686577432740bd49
7301+
languageName: node
7302+
linkType: hard
7303+
72847304
"ms@npm:2.1.2":
72857305
version: 2.1.2
72867306
resolution: "ms@npm:2.1.2"
@@ -7519,6 +7539,36 @@ __metadata:
75197539
languageName: node
75207540
linkType: hard
75217541

7542+
"npm-bundled@npm:^2.0.0":
7543+
version: 2.0.1
7544+
resolution: "npm-bundled@npm:2.0.1"
7545+
dependencies:
7546+
npm-normalize-package-bin: "npm:^2.0.0"
7547+
checksum: fedd0950ef7edb74f0133d7d007d7e90c783f9df4765e1e1d9f24deee56ec2435772001e5c3fef92d3f60ae0a337b1f8814744aa28b8f93d5ef884813970f4c2
7548+
languageName: node
7549+
linkType: hard
7550+
7551+
"npm-normalize-package-bin@npm:^2.0.0":
7552+
version: 2.0.0
7553+
resolution: "npm-normalize-package-bin@npm:2.0.0"
7554+
checksum: c64469d165d71ea4c3d53a51672a73c011b707c4d4a0a76b94f24ccf309c7c4d5d7057aa72d7051c71dc1351ecce5083de9d15e9822ca04f1cb9c586962376be
7555+
languageName: node
7556+
linkType: hard
7557+
7558+
"npm-packlist@npm:^5.1.3":
7559+
version: 5.1.3
7560+
resolution: "npm-packlist@npm:5.1.3"
7561+
dependencies:
7562+
glob: "npm:^8.0.1"
7563+
ignore-walk: "npm:^5.0.1"
7564+
npm-bundled: "npm:^2.0.0"
7565+
npm-normalize-package-bin: "npm:^2.0.0"
7566+
bin:
7567+
npm-packlist: bin/index.js
7568+
checksum: e5e7bee37507c3c1cb8b17abc78bf31f1e984d527958cfa1ac3291423b77e56435bb460ac9db1dba2d1f1c5117d0e3c1623facd8eda6e964b0d02c477e04cef1
7569+
languageName: node
7570+
linkType: hard
7571+
75227572
"npm-run-all@npm:4.1.5":
75237573
version: 4.1.5
75247574
resolution: "npm-run-all@npm:4.1.5"
@@ -8109,6 +8159,19 @@ __metadata:
81098159
languageName: node
81108160
linkType: hard
81118161

8162+
"publint@npm:0.1.11":
8163+
version: 0.1.11
8164+
resolution: "publint@npm:0.1.11"
8165+
dependencies:
8166+
npm-packlist: "npm:^5.1.3"
8167+
picocolors: "npm:^1.0.0"
8168+
sade: "npm:^1.8.1"
8169+
bin:
8170+
publint: lib/cli.js
8171+
checksum: 5af5db0ba2cff5431f0759b1907bc450d003de8b44a53b0ca037185eb2eb9f84509aaab99bd6340dda21fc0d639a05da9f46a7646a9c9927800e60552e68f91f
8172+
languageName: node
8173+
linkType: hard
8174+
81128175
"pump@npm:^3.0.0":
81138176
version: 3.0.0
81148177
resolution: "pump@npm:3.0.0"
@@ -8565,6 +8628,15 @@ __metadata:
85658628
languageName: node
85668629
linkType: hard
85678630

8631+
"sade@npm:^1.8.1":
8632+
version: 1.8.1
8633+
resolution: "sade@npm:1.8.1"
8634+
dependencies:
8635+
mri: "npm:^1.1.0"
8636+
checksum: da67f42ec984b58d0eac48d160e4da6d966416bafb88c37556f41f8a52c1ff897ca065984da3d62557ed8622c9999493f133ed6af63e4ea5191342029f37455c
8637+
languageName: node
8638+
linkType: hard
8639+
85688640
"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1":
85698641
version: 5.1.2
85708642
resolution: "safe-buffer@npm:5.1.2"

0 commit comments

Comments
 (0)