Skip to content

Commit 4ad906d

Browse files
committed
Revert "fix: use proper dual-packaging"
This reverts commit 056bc8f.
1 parent 24de3b7 commit 4ad906d

File tree

6 files changed

+15
-284
lines changed

6 files changed

+15
-284
lines changed

Diff for: package-lock.json

-256
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+7-12
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,17 @@
1515
"dist",
1616
"src"
1717
],
18-
"main": "dist/cjs/index.js",
19-
"module": "dist/esm/wrapper.mjs",
20-
"exports": {
21-
"import": "./dist/esm/wrapper.mjs",
22-
"require": "./dist/cjs/index.js"
23-
},
24-
"types": "dist/cjs/index.d.ts",
18+
"main": "dist/main/index.js",
19+
"module": "dist/module/index.js",
20+
"types": "dist/module/index.d.ts",
2521
"sideEffects": false,
2622
"repository": "supabase/supabase-js",
2723
"scripts": {
2824
"clean": "rimraf dist docs/v2",
29-
"format": "prettier --write \"{src,test}/**/*.ts\" wrapper.mjs",
25+
"format": "prettier --write \"{src,test}/**/*.ts\"",
3026
"build": "run-s clean format build:*",
31-
"build:cjs": "tsc -p tsconfig.json",
32-
"build:esm": "cpy wrapper.mjs dist/esm/",
27+
"build:main": "tsc -p tsconfig.json",
28+
"build:module": "tsc -p tsconfig.module.json",
3329
"build:umd": "webpack",
3430
"types-generate": "dts-gen -m '@supabase/supabase-js' -s",
3531
"test": "run-s test:types test:run",
@@ -38,7 +34,7 @@
3834
"test:db": "cd infra/db && docker-compose down && docker-compose up -d && sleep 5",
3935
"test:watch": "jest --watch --verbose false --silent false",
4036
"test:clean": "cd infra/db && docker-compose down",
41-
"test:types": "run-s build && tsd --files test/*.test-d.ts",
37+
"test:types": "run-s build:module && tsd --files test/*.test-d.ts",
4238
"docs": "typedoc --entryPoints src/index.ts --out docs/v2 --includes src/**/*.ts",
4339
"docs:json": "typedoc --entryPoints src/index.ts --includes src/**/*.ts --json docs/v2/spec.json --excludeExternals",
4440
"serve:coverage": "npm run test:coverage && serve test/coverage"
@@ -54,7 +50,6 @@
5450
"devDependencies": {
5551
"@sebbo2002/semantic-release-jsr": "^1.0.0",
5652
"@types/jest": "^29.2.5",
57-
"cpy-cli": "^5.0.0",
5853
"husky": "^4.3.0",
5954
"jest": "^29.3.1",
6055
"npm-run-all": "^4.1.5",

Diff for: src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Always update wrapper.mjs when updating this file.
2-
31
import SupabaseClient from './SupabaseClient'
42
import type { GenericSchema, SupabaseClientOptions } from './lib/types'
53

Diff for: tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"declaration": true,
66
"declarationMap": true,
77
"module": "CommonJS",
8-
"outDir": "dist/cjs",
8+
"outDir": "dist/main",
99
"sourceMap": true,
1010
"target": "ES2015",
1111

Diff for: tsconfig.module.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig",
3+
"compilerOptions": {
4+
"module": "ES2020",
5+
"outDir": "dist/module"
6+
}
7+
}

Diff for: wrapper.mjs

-13
This file was deleted.

0 commit comments

Comments
 (0)