react-native-worklets 0.10.2 → 0.10.3
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.
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* version used to build the native part of the library in runtime. Remember to
|
|
4
4
|
* keep this in sync with the version declared in `package.json`
|
|
5
5
|
*/
|
|
6
|
-
export declare const jsVersion = "0.10.
|
|
6
|
+
export declare const jsVersion = "0.10.3";
|
|
7
7
|
//# sourceMappingURL=jsVersion.d.ts.map
|
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -414,6 +414,7 @@ var require_globals = __commonJS({
|
|
|
414
414
|
exports2.isGeneratedWorkletFile = isGeneratedWorkletFile;
|
|
415
415
|
exports2.initializeGlobals = initializeGlobals;
|
|
416
416
|
exports2.addCustomGlobals = addCustomGlobals;
|
|
417
|
+
var assert_1 = require("assert");
|
|
417
418
|
var path_1 = __importDefault(require("path"));
|
|
418
419
|
var autoworkletization_12 = require_autoworkletization();
|
|
419
420
|
var types_12 = require_types();
|
|
@@ -555,7 +556,8 @@ var require_globals = __commonJS({
|
|
|
555
556
|
addCustomGlobals(state);
|
|
556
557
|
}
|
|
557
558
|
const userImportForwarding = state.opts.importForwarding;
|
|
558
|
-
state.
|
|
559
|
+
(0, assert_1.strict)(state.importForwarding === void 0, "state.importForwarding should be undefined at this point");
|
|
560
|
+
state.importForwarding = {
|
|
559
561
|
relativePaths: [
|
|
560
562
|
...defaultAllowedPaths,
|
|
561
563
|
...(_a = userImportForwarding === null || userImportForwarding === void 0 ? void 0 : userImportForwarding.relativePaths) !== null && _a !== void 0 ? _a : []
|
|
@@ -614,7 +616,7 @@ var require_imports = __commonJS({
|
|
|
614
616
|
var _a;
|
|
615
617
|
if (nodePath.get("callee").isIdentifier({ name: "require" }) && ((_a = nodePath.get("arguments")[0]) === null || _a === void 0 ? void 0 : _a.isStringLiteral())) {
|
|
616
618
|
const requiredModule = nodePath.get("arguments")[0];
|
|
617
|
-
if (requiredModule.node.value.startsWith(".") && canForwardRelativeImport(state.file.opts.filename || "", state.
|
|
619
|
+
if (requiredModule.node.value.startsWith(".") && canForwardRelativeImport(state.file.opts.filename || "", state.importForwarding.relativePaths)) {
|
|
618
620
|
requiredModule.replaceWith(createImportPathLiteral(requiredModule.node.value, state));
|
|
619
621
|
}
|
|
620
622
|
}
|
|
@@ -711,13 +713,13 @@ var require_closure = __commonJS({
|
|
|
711
713
|
scope = scope.parent;
|
|
712
714
|
}
|
|
713
715
|
if (state.opts.bundleMode && (0, imports_1.isImport)(binding)) {
|
|
714
|
-
if ((0, imports_1.isImportRelative)(binding) && (0, imports_1.canForwardRelativeImport)(state.filename, state.
|
|
716
|
+
if ((0, imports_1.isImportRelative)(binding) && (0, imports_1.canForwardRelativeImport)(state.filename, state.importForwarding.relativePaths)) {
|
|
715
717
|
capturedNames.add(name);
|
|
716
718
|
relativeBindingsToImport.add(binding);
|
|
717
719
|
return;
|
|
718
720
|
}
|
|
719
721
|
const source = binding.path.parentPath.node.source.value;
|
|
720
|
-
if ((0, imports_1.canForwardModuleImport)(source, state.
|
|
722
|
+
if ((0, imports_1.canForwardModuleImport)(source, state.importForwarding.moduleNames)) {
|
|
721
723
|
capturedNames.add(name);
|
|
722
724
|
moduleBindingsToImport.add(binding);
|
|
723
725
|
return;
|
package/src/debug/jsVersion.ts
CHANGED