react-native-worklets 0.11.2 → 0.11.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.11.
|
|
6
|
+
export declare const jsVersion = "0.11.3";
|
|
7
7
|
//# sourceMappingURL=jsVersion.d.ts.map
|
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -424,6 +424,7 @@ var require_globals = __commonJS({
|
|
|
424
424
|
exports2.isGeneratedWorkletFile = isGeneratedWorkletFile;
|
|
425
425
|
exports2.initializeGlobals = initializeGlobals;
|
|
426
426
|
exports2.addCustomGlobals = addCustomGlobals;
|
|
427
|
+
var assert_1 = require("assert");
|
|
427
428
|
var path_1 = __importDefault(require("path"));
|
|
428
429
|
var autoworkletization_12 = require_autoworkletization();
|
|
429
430
|
var types_12 = require_types();
|
|
@@ -565,7 +566,8 @@ var require_globals = __commonJS({
|
|
|
565
566
|
addCustomGlobals(state);
|
|
566
567
|
}
|
|
567
568
|
const userImportForwarding = state.opts.importForwarding;
|
|
568
|
-
state.
|
|
569
|
+
(0, assert_1.strict)(state.importForwarding === void 0, "state.importForwarding should be undefined at this point");
|
|
570
|
+
state.importForwarding = {
|
|
569
571
|
relativePaths: [
|
|
570
572
|
...defaultAllowedPaths,
|
|
571
573
|
...(_a = userImportForwarding === null || userImportForwarding === void 0 ? void 0 : userImportForwarding.relativePaths) !== null && _a !== void 0 ? _a : []
|
|
@@ -624,7 +626,7 @@ var require_imports = __commonJS({
|
|
|
624
626
|
var _a;
|
|
625
627
|
if (nodePath.get("callee").isIdentifier({ name: "require" }) && ((_a = nodePath.get("arguments")[0]) === null || _a === void 0 ? void 0 : _a.isStringLiteral())) {
|
|
626
628
|
const requiredModule = nodePath.get("arguments")[0];
|
|
627
|
-
if (requiredModule.node.value.startsWith(".") && canForwardRelativeImport(state.file.opts.filename || "", state.
|
|
629
|
+
if (requiredModule.node.value.startsWith(".") && canForwardRelativeImport(state.file.opts.filename || "", state.importForwarding.relativePaths)) {
|
|
628
630
|
requiredModule.replaceWith(createImportPathLiteral(requiredModule.node.value, state));
|
|
629
631
|
}
|
|
630
632
|
}
|
|
@@ -721,13 +723,13 @@ var require_closure = __commonJS({
|
|
|
721
723
|
scope = scope.parent;
|
|
722
724
|
}
|
|
723
725
|
if (state.opts.bundleMode && (0, imports_1.isImport)(binding)) {
|
|
724
|
-
if ((0, imports_1.isImportRelative)(binding) && (0, imports_1.canForwardRelativeImport)(state.filename, state.
|
|
726
|
+
if ((0, imports_1.isImportRelative)(binding) && (0, imports_1.canForwardRelativeImport)(state.filename, state.importForwarding.relativePaths)) {
|
|
725
727
|
capturedNames.add(name);
|
|
726
728
|
relativeBindingsToImport.add(binding);
|
|
727
729
|
return;
|
|
728
730
|
}
|
|
729
731
|
const source = binding.path.parentPath.node.source.value;
|
|
730
|
-
if ((0, imports_1.canForwardModuleImport)(source, state.
|
|
732
|
+
if ((0, imports_1.canForwardModuleImport)(source, state.importForwarding.moduleNames)) {
|
|
731
733
|
capturedNames.add(name);
|
|
732
734
|
moduleBindingsToImport.add(binding);
|
|
733
735
|
return;
|
package/src/debug/jsVersion.ts
CHANGED