Skip to content

Commit 3219396

Browse files
committed
feat: introduce @faststats/sourcemap-uploader-core package and integrate with existing plugins
1 parent 38ceae2 commit 3219396

File tree

19 files changed

+791
-591
lines changed

19 files changed

+791
-591
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ A monorepo for sourcemap upload infrastructure.
77

88
## Structure
99

10+
- **`packages/javascript-core`** — shared JS sourcemap upload core used by the bundler and Next.js adapters
1011
- **`apps/backend`** — Rust (Axum) API server that ingests sourcemap uploads
1112
- **`packages/bundler-plugin`** — Universal unplugin adapter set (Vite, Rolldown, Webpack and more) that uploads sourcemaps after builds
13+
- **`packages/nextjs-config`** — Next.js config wrapper that composes the shared JS core with the bundler plugin where needed
1214
- **`packages/proguard-plugin`** — a Gradle plugin for uploading ProGuard obfuscation mappings
1315

1416
## Development

bun.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"scripts": {
55
"build": "turbo run build",
6-
"build:packages": "turbo run build --filter=@faststats/sourcemap-uploader-plugin --filter=@faststats/sourcemap-uploader-nextjs && bun run build:proguard-plugin",
6+
"build:packages": "turbo run build --filter=@faststats/sourcemap-uploader-core --filter=@faststats/sourcemap-uploader-plugin --filter=@faststats/sourcemap-uploader-nextjs && bun run build:proguard-plugin",
77
"build:proguard-plugin": "bun run --cwd packages/proguard-plugin build",
88
"sync-proguard-version": "bun scripts/sync-proguard-version.ts",
99
"dev": "turbo run dev",

packages/bundler-plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Unplugin-based sourcemap uploader that works across all unplugin adapters:
2727
## Usage
2828

2929
```ts
30-
import sourcemapsPlugin from "@sourcemaps/bundler-plugin/vite";
30+
import sourcemapsPlugin from "@faststats/sourcemap-uploader-plugin/vite";
3131

3232
export default {
3333
plugins: [

packages/bundler-plugin/package.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,58 @@
1414
"module": "./dist/index.mjs",
1515
"files": [
1616
"dist",
17+
"src",
1718
"README.md"
1819
],
19-
"types": "./dist/index.d.mts",
20+
"types": "./src/index.ts",
2021
"exports": {
2122
".": {
22-
"types": "./dist/index.d.mts",
23+
"types": "./src/index.ts",
2324
"import": "./dist/index.mjs",
2425
"default": "./dist/index.mjs"
2526
},
2627
"./vite": {
27-
"types": "./dist/bundler/vite.d.mts",
28+
"types": "./src/bundler/vite.ts",
2829
"import": "./dist/bundler/vite.mjs",
2930
"default": "./dist/bundler/vite.mjs"
3031
},
3132
"./rollup": {
32-
"types": "./dist/bundler/rollup.d.mts",
33+
"types": "./src/bundler/rollup.ts",
3334
"import": "./dist/bundler/rollup.mjs",
3435
"default": "./dist/bundler/rollup.mjs"
3536
},
3637
"./rolldown": {
37-
"types": "./dist/bundler/rolldown.d.mts",
38+
"types": "./src/bundler/rolldown.ts",
3839
"import": "./dist/bundler/rolldown.mjs",
3940
"default": "./dist/bundler/rolldown.mjs"
4041
},
4142
"./webpack": {
42-
"types": "./dist/bundler/webpack.d.mts",
43+
"types": "./src/bundler/webpack.ts",
4344
"import": "./dist/bundler/webpack.mjs",
4445
"default": "./dist/bundler/webpack.mjs"
4546
},
4647
"./rspack": {
47-
"types": "./dist/bundler/rspack.d.mts",
48+
"types": "./src/bundler/rspack.ts",
4849
"import": "./dist/bundler/rspack.mjs",
4950
"default": "./dist/bundler/rspack.mjs"
5051
},
5152
"./esbuild": {
52-
"types": "./dist/bundler/esbuild.d.mts",
53+
"types": "./src/bundler/esbuild.ts",
5354
"import": "./dist/bundler/esbuild.mjs",
5455
"default": "./dist/bundler/esbuild.mjs"
5556
},
5657
"./unloader": {
57-
"types": "./dist/bundler/unloader.d.mts",
58+
"types": "./src/bundler/unloader.ts",
5859
"import": "./dist/bundler/unloader.mjs",
5960
"default": "./dist/bundler/unloader.mjs"
6061
},
6162
"./farm": {
62-
"types": "./dist/bundler/farm.d.mts",
63+
"types": "./src/bundler/farm.ts",
6364
"import": "./dist/bundler/farm.mjs",
6465
"default": "./dist/bundler/farm.mjs"
6566
},
6667
"./bun": {
67-
"types": "./dist/bundler/bun.d.mts",
68+
"types": "./src/bundler/bun.ts",
6869
"import": "./dist/bundler/bun.mjs",
6970
"default": "./dist/bundler/bun.mjs"
7071
}
@@ -73,6 +74,7 @@
7374
"build": "tsdown",
7475
"lint": "biome check .",
7576
"check-types": "tsc --noEmit",
77+
"pretest": "bun run --cwd ../javascript-core build",
7678
"test": "vitest run"
7779
},
7880
"devDependencies": {
@@ -90,6 +92,7 @@
9092
"typescript": "^5.9.3 || ^6.0.0"
9193
},
9294
"dependencies": {
95+
"@faststats/sourcemap-uploader-core": "workspace:*",
9396
"unplugin": "^3.0.0"
9497
}
9598
}

0 commit comments

Comments
 (0)