rollipop 0.1.0-alpha.18 → 0.1.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/commands.cjs +15 -1
- package/dist/commands.js +15 -1
- package/dist/index.js +17 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/commands.cjs
CHANGED
|
@@ -3446,7 +3446,7 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
|
|
|
3446
3446
|
sourcemapBaseUrl: rolldownSourcemapBaseUrl,
|
|
3447
3447
|
sourcemapDebugIds: rolldownSourcemapDebugIds,
|
|
3448
3448
|
sourcemapIgnoreList: rolldownSourcemapIgnoreList,
|
|
3449
|
-
sourcemapPathTransform: rolldownSourcemapPathTransform,
|
|
3449
|
+
sourcemapPathTransform: rolldownSourcemapPathTransform ?? createProjectRootSourcemapPathTransform(config.root),
|
|
3450
3450
|
codeSplitting: false,
|
|
3451
3451
|
strictExecutionOrder: true,
|
|
3452
3452
|
globalIdentifiers: rolldownGlobalIdentifiers,
|
|
@@ -3533,6 +3533,20 @@ function getResolveExtensions({ platform, sourceExtensions, assetExtensions, pre
|
|
|
3533
3533
|
return supportedExtensions.map((extension) => `.${platform}.${extension}`);
|
|
3534
3534
|
}), ...supportedExtensions.map((extension) => `.${extension}`)].flat();
|
|
3535
3535
|
}
|
|
3536
|
+
/**
|
|
3537
|
+
* Default sourcemap path transform.
|
|
3538
|
+
*
|
|
3539
|
+
* Rolldown emits `sources` relative to the bundle output's directory, which
|
|
3540
|
+
* yields paths like `../App.tsx` when the bundle lives under e.g. `dist/`.
|
|
3541
|
+
* RN tooling (symbolication, devtools) expects project-root-relative paths,
|
|
3542
|
+
* so this rewrites each entry to be relative to `projectRoot`.
|
|
3543
|
+
*/
|
|
3544
|
+
function createProjectRootSourcemapPathTransform(projectRoot) {
|
|
3545
|
+
return (source, sourcemapPath) => {
|
|
3546
|
+
const absolute = node_path.default.resolve(node_path.default.dirname(sourcemapPath), source);
|
|
3547
|
+
return node_path.default.relative(projectRoot, absolute);
|
|
3548
|
+
};
|
|
3549
|
+
}
|
|
3536
3550
|
function loadPolyfills(polyfills) {
|
|
3537
3551
|
return polyfills.map((polyfill) => {
|
|
3538
3552
|
if (typeof polyfill === "string") return node_fs.default.readFileSync(polyfill, "utf-8");
|
package/dist/commands.js
CHANGED
|
@@ -3400,7 +3400,7 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
|
|
|
3400
3400
|
sourcemapBaseUrl: rolldownSourcemapBaseUrl,
|
|
3401
3401
|
sourcemapDebugIds: rolldownSourcemapDebugIds,
|
|
3402
3402
|
sourcemapIgnoreList: rolldownSourcemapIgnoreList,
|
|
3403
|
-
sourcemapPathTransform: rolldownSourcemapPathTransform,
|
|
3403
|
+
sourcemapPathTransform: rolldownSourcemapPathTransform ?? createProjectRootSourcemapPathTransform(config.root),
|
|
3404
3404
|
codeSplitting: false,
|
|
3405
3405
|
strictExecutionOrder: true,
|
|
3406
3406
|
globalIdentifiers: rolldownGlobalIdentifiers,
|
|
@@ -3487,6 +3487,20 @@ function getResolveExtensions({ platform, sourceExtensions, assetExtensions, pre
|
|
|
3487
3487
|
return supportedExtensions.map((extension) => `.${platform}.${extension}`);
|
|
3488
3488
|
}), ...supportedExtensions.map((extension) => `.${extension}`)].flat();
|
|
3489
3489
|
}
|
|
3490
|
+
/**
|
|
3491
|
+
* Default sourcemap path transform.
|
|
3492
|
+
*
|
|
3493
|
+
* Rolldown emits `sources` relative to the bundle output's directory, which
|
|
3494
|
+
* yields paths like `../App.tsx` when the bundle lives under e.g. `dist/`.
|
|
3495
|
+
* RN tooling (symbolication, devtools) expects project-root-relative paths,
|
|
3496
|
+
* so this rewrites each entry to be relative to `projectRoot`.
|
|
3497
|
+
*/
|
|
3498
|
+
function createProjectRootSourcemapPathTransform(projectRoot) {
|
|
3499
|
+
return (source, sourcemapPath) => {
|
|
3500
|
+
const absolute = path.resolve(path.dirname(sourcemapPath), source);
|
|
3501
|
+
return path.relative(projectRoot, absolute);
|
|
3502
|
+
};
|
|
3503
|
+
}
|
|
3490
3504
|
function loadPolyfills(polyfills) {
|
|
3491
3505
|
return polyfills.map((polyfill) => {
|
|
3492
3506
|
if (typeof polyfill === "string") return fs.readFileSync(polyfill, "utf-8");
|
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ async function stripFlowTypes(id, code) {
|
|
|
88
88
|
}
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/constants.ts
|
|
91
|
-
const ROLLIPOP_VERSION = "0.1.0-alpha.
|
|
91
|
+
const ROLLIPOP_VERSION = "0.1.0-alpha.19";
|
|
92
92
|
const GLOBAL_IDENTIFIER = "global";
|
|
93
93
|
/**
|
|
94
94
|
* @see {@link https://github.com/facebook/metro/blob/0.81.x/docs/Configuration.md#resolvermainfields}
|
|
@@ -3213,7 +3213,7 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
|
|
|
3213
3213
|
sourcemapBaseUrl: rolldownSourcemapBaseUrl,
|
|
3214
3214
|
sourcemapDebugIds: rolldownSourcemapDebugIds,
|
|
3215
3215
|
sourcemapIgnoreList: rolldownSourcemapIgnoreList,
|
|
3216
|
-
sourcemapPathTransform: rolldownSourcemapPathTransform,
|
|
3216
|
+
sourcemapPathTransform: rolldownSourcemapPathTransform ?? createProjectRootSourcemapPathTransform(config.root),
|
|
3217
3217
|
codeSplitting: false,
|
|
3218
3218
|
strictExecutionOrder: true,
|
|
3219
3219
|
globalIdentifiers: rolldownGlobalIdentifiers,
|
|
@@ -3300,6 +3300,20 @@ function getResolveExtensions({ platform, sourceExtensions, assetExtensions, pre
|
|
|
3300
3300
|
return supportedExtensions.map((extension) => `.${platform}.${extension}`);
|
|
3301
3301
|
}), ...supportedExtensions.map((extension) => `.${extension}`)].flat();
|
|
3302
3302
|
}
|
|
3303
|
+
/**
|
|
3304
|
+
* Default sourcemap path transform.
|
|
3305
|
+
*
|
|
3306
|
+
* Rolldown emits `sources` relative to the bundle output's directory, which
|
|
3307
|
+
* yields paths like `../App.tsx` when the bundle lives under e.g. `dist/`.
|
|
3308
|
+
* RN tooling (symbolication, devtools) expects project-root-relative paths,
|
|
3309
|
+
* so this rewrites each entry to be relative to `projectRoot`.
|
|
3310
|
+
*/
|
|
3311
|
+
function createProjectRootSourcemapPathTransform(projectRoot) {
|
|
3312
|
+
return (source, sourcemapPath) => {
|
|
3313
|
+
const absolute = path.resolve(path.dirname(sourcemapPath), source);
|
|
3314
|
+
return path.relative(projectRoot, absolute);
|
|
3315
|
+
};
|
|
3316
|
+
}
|
|
3303
3317
|
function loadPolyfills(polyfills) {
|
|
3304
3318
|
return polyfills.map((polyfill) => {
|
|
3305
3319
|
if (typeof polyfill === "string") return fs.readFileSync(polyfill, "utf-8");
|
|
@@ -3418,7 +3432,7 @@ async function runServer(config, options) {
|
|
|
3418
3432
|
}
|
|
3419
3433
|
//#endregion
|
|
3420
3434
|
//#region package.json
|
|
3421
|
-
var version = "0.1.0-alpha.
|
|
3435
|
+
var version = "0.1.0-alpha.19";
|
|
3422
3436
|
//#endregion
|
|
3423
3437
|
//#region src/node/logger.ts
|
|
3424
3438
|
const logger = new Logger("cli");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollipop",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.19",
|
|
4
4
|
"homepage": "https://github.com/leegeunhyeok/rollipop#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/leegeunhyeok/rollipop/issues"
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@react-native-community/cli-types": "^20.1.2",
|
|
80
80
|
"@react-native/babel-plugin-codegen": "^0.84.1",
|
|
81
81
|
"@react-native/dev-middleware": "^0.84.1",
|
|
82
|
-
"@rollipop/rolldown": "1.0.
|
|
83
|
-
"@rollipop/rolldown-pluginutils": "1.0.
|
|
82
|
+
"@rollipop/rolldown": "1.0.1",
|
|
83
|
+
"@rollipop/rolldown-pluginutils": "1.0.1",
|
|
84
84
|
"@swc/core": "^1.15.18",
|
|
85
85
|
"@swc/helpers": "^0.5.19",
|
|
86
86
|
"@types/ws": "^8",
|