Skip to content

Commit

Permalink
Revert "fix: use proper dual-packaging"
Browse files Browse the repository at this point in the history
This reverts commit 056bc8f.
  • Loading branch information
soedirgo committed May 23, 2024
1 parent 24de3b7 commit 4ad906d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 284 deletions.
256 changes: 0 additions & 256 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@
"dist",
"src"
],
"main": "dist/cjs/index.js",
"module": "dist/esm/wrapper.mjs",
"exports": {
"import": "./dist/esm/wrapper.mjs",
"require": "./dist/cjs/index.js"
},
"types": "dist/cjs/index.d.ts",
"main": "dist/main/index.js",
"module": "dist/module/index.js",
"types": "dist/module/index.d.ts",
"sideEffects": false,
"repository": "supabase/supabase-js",
"scripts": {
"clean": "rimraf dist docs/v2",
"format": "prettier --write \"{src,test}/**/*.ts\" wrapper.mjs",
"format": "prettier --write \"{src,test}/**/*.ts\"",
"build": "run-s clean format build:*",
"build:cjs": "tsc -p tsconfig.json",
"build:esm": "cpy wrapper.mjs dist/esm/",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"build:umd": "webpack",
"types-generate": "dts-gen -m '@supabase/supabase-js' -s",
"test": "run-s test:types test:run",
Expand All @@ -38,7 +34,7 @@
"test:db": "cd infra/db && docker-compose down && docker-compose up -d && sleep 5",
"test:watch": "jest --watch --verbose false --silent false",
"test:clean": "cd infra/db && docker-compose down",
"test:types": "run-s build && tsd --files test/*.test-d.ts",
"test:types": "run-s build:module && tsd --files test/*.test-d.ts",
"docs": "typedoc --entryPoints src/index.ts --out docs/v2 --includes src/**/*.ts",
"docs:json": "typedoc --entryPoints src/index.ts --includes src/**/*.ts --json docs/v2/spec.json --excludeExternals",
"serve:coverage": "npm run test:coverage && serve test/coverage"
Expand All @@ -54,7 +50,6 @@
"devDependencies": {
"@sebbo2002/semantic-release-jsr": "^1.0.0",
"@types/jest": "^29.2.5",
"cpy-cli": "^5.0.0",
"husky": "^4.3.0",
"jest": "^29.3.1",
"npm-run-all": "^4.1.5",
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Always update wrapper.mjs when updating this file.

import SupabaseClient from './SupabaseClient'
import type { GenericSchema, SupabaseClientOptions } from './lib/types'

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"declaration": true,
"declarationMap": true,
"module": "CommonJS",
"outDir": "dist/cjs",
"outDir": "dist/main",
"sourceMap": true,
"target": "ES2015",

Expand Down
7 changes: 7 additions & 0 deletions tsconfig.module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "ES2020",
"outDir": "dist/module"
}
}
13 changes: 0 additions & 13 deletions wrapper.mjs

This file was deleted.

0 comments on commit 4ad906d

Please sign in to comment.