@callstack/repack-plugin-reanimated 5.2.3 → 5.2.5-canary-20260305211900
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/README.md +11 -4
- package/dist/plugin.js +28 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<
|
|
2
|
-
<img src="https://raw.githubusercontent.com/callstack/repack/HEAD/logo.png"
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=repack" align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/callstack/repack/HEAD/logo.png" alt="Re.Pack" />
|
|
3
|
+
</a>
|
|
4
|
+
<h3 align="center">A toolkit to build your React Native application with Rspack or Webpack.</h3>
|
|
5
5
|
<div align="center">
|
|
6
6
|
|
|
7
7
|
[![mit licence][license-badge]][license]
|
|
@@ -79,8 +79,15 @@ export default (env) => {
|
|
|
79
79
|
|
|
80
80
|
Check out our website at https://re-pack.dev for more info and documentation or our GitHub: https://github.com/callstack/repack.
|
|
81
81
|
|
|
82
|
+
## Made with ❤️ at Callstack
|
|
83
|
+
|
|
84
|
+
`@callstack/repack` is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Callstack][callstack-readme-with-love] is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!
|
|
85
|
+
|
|
86
|
+
Like the project? ⚛️ [Join the team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
|
|
87
|
+
|
|
82
88
|
<!-- badges -->
|
|
83
89
|
|
|
90
|
+
[callstack-readme-with-love]: https://callstack.com/?utm_source=github.com&utm_medium=referral&utm_campaign=repack&utm_term=readme-with-love
|
|
84
91
|
[license-badge]: https://img.shields.io/npm/l/@callstack/repack?style=for-the-badge
|
|
85
92
|
[license]: https://github.com/callstack/repack/blob/main/LICENSE
|
|
86
93
|
[npm-downloads-badge]: https://img.shields.io/npm/dm/@callstack/repack?style=for-the-badge
|
package/dist/plugin.js
CHANGED
|
@@ -7,6 +7,28 @@ exports.ReanimatedPlugin = void 0;
|
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
const semver_1 = __importDefault(require("semver"));
|
|
9
9
|
const rules_js_1 = require("./rules.js");
|
|
10
|
+
const REANIMATED_SETUP_TESTS_WARNING = /'`setUpTests` is available only in Jest environment\.'/;
|
|
11
|
+
const WORKLETS_CRITICAL_DEPENDENCY_WARNING = /Critical dependency: require function is used in a way in which dependencies cannot be statically extracted/;
|
|
12
|
+
const WORKLETS_INITIALIZERS_MODULE = /react-native-(?:worklets|reanimated)[\\/].*initializers(?:\.[cm]?[jt]sx?)?/;
|
|
13
|
+
function warningToSearchableText(warning) {
|
|
14
|
+
if (typeof warning === 'string') {
|
|
15
|
+
return warning;
|
|
16
|
+
}
|
|
17
|
+
if (!warning || typeof warning !== 'object') {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
const warningObject = warning;
|
|
21
|
+
return [
|
|
22
|
+
warningObject.message,
|
|
23
|
+
warningObject.details,
|
|
24
|
+
warningObject.moduleName,
|
|
25
|
+
warningObject.moduleIdentifier,
|
|
26
|
+
warningObject.module?.resource,
|
|
27
|
+
warningObject.module?.userRequest,
|
|
28
|
+
]
|
|
29
|
+
.filter((value) => typeof value === 'string')
|
|
30
|
+
.join('\n');
|
|
31
|
+
}
|
|
10
32
|
class ReanimatedPlugin {
|
|
11
33
|
constructor(options = {}) {
|
|
12
34
|
this.options = options;
|
|
@@ -25,7 +47,12 @@ class ReanimatedPlugin {
|
|
|
25
47
|
}
|
|
26
48
|
// ignore the 'setUpTests' warning from reanimated which is not relevant
|
|
27
49
|
compiler.options.ignoreWarnings = compiler.options.ignoreWarnings ?? [];
|
|
28
|
-
compiler.options.ignoreWarnings.push((warning) =>
|
|
50
|
+
compiler.options.ignoreWarnings.push((warning) => {
|
|
51
|
+
const warningText = warningToSearchableText(warning);
|
|
52
|
+
return (REANIMATED_SETUP_TESTS_WARNING.test(warningText) ||
|
|
53
|
+
(WORKLETS_CRITICAL_DEPENDENCY_WARNING.test(warningText) &&
|
|
54
|
+
WORKLETS_INITIALIZERS_MODULE.test(warningText)));
|
|
55
|
+
});
|
|
29
56
|
}
|
|
30
57
|
ensureDependencyInstalled(context, dependency) {
|
|
31
58
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@callstack/repack-plugin-reanimated",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.5-canary-20260305211900",
|
|
4
4
|
"description": "A plugin for @callstack/repack that integrates react-native-reanimated",
|
|
5
5
|
"author": "Jakub Romańczyk <jakub.romanczyk@callstack.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@babel/core": "^7.20",
|
|
47
|
-
"@callstack/repack": "5.2.
|
|
47
|
+
"@callstack/repack": "5.2.5-canary-20260305211900"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@rspack/core": "^1.6.0",
|
|
51
51
|
"@types/babel__core": "7.20.5",
|
|
52
|
-
"@types/node": "^20",
|
|
52
|
+
"@types/node": "^20.19.31",
|
|
53
53
|
"@types/semver": "^7.7.0",
|
|
54
|
-
"webpack": "^5.
|
|
55
|
-
"@callstack/repack": "5.2.
|
|
54
|
+
"webpack": "^5.104.1",
|
|
55
|
+
"@callstack/repack": "5.2.5-canary-20260305211900"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsc -p tsconfig.build.json",
|