Skip to content

Commit f5e42af

Browse files
ChriztiaanChristiaan Landman
andauthored
chore: Exclude sourceMaps from prod builds and introduced base tsconfig (#161)
Co-authored-by: Christiaan Landman <[email protected]>
1 parent 7197949 commit f5e42af

File tree

14 files changed

+44
-82
lines changed

14 files changed

+44
-82
lines changed

.changeset/young-emus-pump.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@powersync/kysely-driver': patch
3+
'@powersync/react-native': patch
4+
'@powersync/attachments': patch
5+
'@powersync/common': patch
6+
'@powersync/react': patch
7+
'@powersync/vue': patch
8+
'@powersync/web': patch
9+
---
10+
11+
Introduced base tsconfig. SourceMaps are now excluded in dev and release publishes.

.github/workflows/dev-packages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install dependencies
3838
run: pnpm install
3939
- name: Build
40-
run: pnpm build:packages
40+
run: pnpm build:packages:prod
4141
- name: Publish
4242
run: |
4343
pnpm changeset version --no-git-tag --snapshot dev

demos/react-native-supabase-todolist/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"android": "expo run:android",
77
"ios": "expo run:ios",
8-
"clean": "watchman watch-del-all && rm -rf .expo",
9-
"preinstall": "cd ../.. && pnpm build:packages"
8+
"clean": "watchman watch-del-all && rm -rf .expo"
109
},
1110
"dependencies": {
1211
"@azure/core-asynciterator-polyfill": "^1.0.2",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"main": "index.js",
77
"scripts": {
88
"build:packages": "pnpm run --filter './packages/**' -r build",
9+
"build:packages:prod": "pnpm build:packages --sourceMap false",
910
"watch:packages": "pnpm run --parallel --filter './packages/**' -r build -w",
1011
"build": "pnpm run -r build",
1112
"ci:publish": "changeset publish && git push --follow-tags",
@@ -15,7 +16,7 @@
1516
"docs:start": "pnpm --filter docs start",
1617
"format": "prettier --write .",
1718
"lint": "eslint .",
18-
"release": "pnpm build:packages && pnpm changeset publish",
19+
"release": "pnpm build:packages:prod && pnpm changeset publish",
1920
"test": "pnpm run -r test"
2021
},
2122
"keywords": [],

packages/attachments/tsconfig.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
{
2+
"extends": "../../tsconfig.base",
23
"compilerOptions": {
34
"baseUrl": "./",
4-
"esModuleInterop": true,
55
"jsx": "react",
66
"rootDir": "src",
7-
"composite": true,
8-
"outDir": "./lib",
9-
"lib": ["esnext", "DOM"],
10-
"module": "esnext",
11-
"sourceMap": true,
12-
"moduleResolution": "node",
13-
"noFallthroughCasesInSwitch": true,
14-
"noImplicitReturns": true,
15-
"noImplicitUseStrict": false,
16-
"noStrictGenericChecks": false,
17-
"resolveJsonModule": true,
18-
"skipLibCheck": true,
19-
"target": "esnext"
7+
"outDir": "./lib"
208
},
219
"references": [
2210
{

packages/common/tsconfig.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
{
2+
"extends": "../../tsconfig.base",
23
"compilerOptions": {
34
"baseUrl": "./",
4-
"esModuleInterop": true,
55
"jsx": "react",
66
"types": ["node"],
77
"rootDir": "src",
88
"outDir": "./lib",
9-
"composite": true,
109
"lib": ["esnext"],
11-
"module": "esnext",
1210
"declaration": true,
13-
"sourceMap": true,
14-
"moduleResolution": "node",
15-
"noFallthroughCasesInSwitch": true,
16-
"noImplicitReturns": true,
17-
"noImplicitUseStrict": false,
18-
"noStrictGenericChecks": false,
19-
"resolveJsonModule": true,
20-
"skipLibCheck": true,
21-
"target": "esnext",
2211
"strictNullChecks": true
2312
},
2413
"include": ["src/**/*"]

packages/kysely-driver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"homepage": "https://docs.powersync.com",
2121
"scripts": {
2222
"build": "tsc --build",
23-
"clean": "rm -rf dist tsconfig.tsbuildinfo",
23+
"clean": "rm -rf lib tsconfig.tsbuildinfo",
2424
"watch": "tsc --build -w",
2525
"test": "pnpm build && vitest"
2626
},

packages/kysely-driver/tsconfig.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
{
2+
"extends": "../../tsconfig.base",
23
"compilerOptions": {
3-
"composite": true,
44
"baseUrl": "./",
55
"declaration": true /* Generates corresponding '.d.ts' file. */,
6-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
76
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
87
"lib": ["DOM", "ES2020", "WebWorker"] /* Specify library files to be included in the compilation. */,
98
"module": "es2020" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
10-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
119
"outDir": "./lib" /* Redirect output structure to the directory. */,
12-
"skipLibCheck": true /* Skip type checking of declaration files. */,
13-
"sourceMap": true /* Generates corresponding '.map' file. */,
1410
"strict": true /* Enable all strict type-checking options. */,
1511
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
1612
},

packages/react-native/tsconfig.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
{
2+
"extends": "../../tsconfig.base",
23
"compilerOptions": {
34
"baseUrl": "./",
4-
"esModuleInterop": true,
55
"jsx": "react",
66
"rootDir": "src",
7-
"composite": true,
87
"outDir": "./lib",
9-
"lib": ["esnext", "DOM"],
10-
"module": "esnext",
11-
"sourceMap": true,
12-
"moduleResolution": "node",
13-
"noFallthroughCasesInSwitch": true,
14-
"noImplicitReturns": true,
15-
"noImplicitUseStrict": false,
16-
"noStrictGenericChecks": false,
17-
"resolveJsonModule": true,
18-
"skipLibCheck": true,
19-
"target": "esnext",
208
"strictNullChecks": true
219
},
2210
"references": [

packages/react/tsconfig.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
{
2+
"extends": "../../tsconfig.base",
23
"compilerOptions": {
34
"baseUrl": "./",
4-
"esModuleInterop": true,
55
"jsx": "react",
66
"rootDir": "src",
7-
"composite": true,
87
"outDir": "./lib",
9-
"lib": ["es2022", "DOM"],
10-
"module": "esnext",
11-
"sourceMap": true,
12-
"moduleResolution": "node",
13-
"noFallthroughCasesInSwitch": true,
14-
"noImplicitReturns": true,
15-
"noImplicitUseStrict": false,
16-
"noStrictGenericChecks": false,
17-
"resolveJsonModule": true,
18-
"skipLibCheck": true,
19-
"target": "esnext"
8+
"lib": ["es2022", "DOM"]
209
},
2110
"references": [
2211
{

0 commit comments

Comments
 (0)