@rollipop/jest-preset 1.0.0-beta.2 → 1.0.0-beta.4

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/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as createTransformer, r as TransformerOptions } from "./transformer-Cn7TWwgX.js";
1
+ import { i as createTransformer, r as TransformerOptions } from "./transformer-0K5b44y0.js";
2
2
  export { type TransformerOptions, createTransformer };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_transformer = require("./transformer-B9RYZvsj.js");
2
+ const require_transformer = require("./transformer-DO-Xiwwj.js");
3
3
  exports.createTransformer = require_transformer.createTransformer;
@@ -1,4 +1,4 @@
1
- import { rolldownExperimental } from "rollipop";
1
+ import { WorkletsConfig, rolldownExperimental } from "rollipop";
2
2
  //#region src/utils.d.ts
3
3
  interface TransformOptions {
4
4
  configString?: string;
@@ -12,7 +12,7 @@ interface TransformerOptions {
12
12
  root?: string;
13
13
  runtimeTarget?: rolldownExperimental.RollipopReactNativeRuntimeTarget;
14
14
  flow?: rolldownExperimental.RollipopReactNativeFlowConfig;
15
- worklets?: rolldownExperimental.RollipopReactNativeWorkletsConfig;
15
+ worklets?: WorkletsConfig;
16
16
  envDir?: string;
17
17
  envFile?: string;
18
18
  envPrefix?: string;
@@ -32,6 +32,10 @@ function packageVersion(packageJsonPath) {
32
32
  }
33
33
  function createContext(options) {
34
34
  const mode = resolveMode(options.mode);
35
+ const worklets = (0, rollipop.resolveWorkletsConfig)(options.worklets, {
36
+ root: options.root ?? process.cwd(),
37
+ mode
38
+ });
35
39
  const env = (0, rollipop.loadEnv)({
36
40
  envDir: options.envDir ?? options.root ?? process.cwd(),
37
41
  envFile: options.envFile ?? rollipop.Constants.DEFAULT_ENV_FILE,
@@ -46,11 +50,13 @@ function createContext(options) {
46
50
  cwd: process.cwd(),
47
51
  mode,
48
52
  env,
49
- options
53
+ options,
54
+ worklets
50
55
  })).digest("hex");
51
56
  return {
52
57
  options,
53
58
  mode,
59
+ worklets,
54
60
  globals: {
55
61
  "import.meta.hot": "undefined",
56
62
  "import.meta.env": JSON.stringify({}),
@@ -95,7 +101,7 @@ function getPipeline(context, jestOptions = {}) {
95
101
  jest: true
96
102
  },
97
103
  flow: context.options.flow,
98
- worklets: context.options.worklets
104
+ worklets: context.worklets
99
105
  };
100
106
  pipeline = new rollipop.rolldownExperimental.RollipopReactNativeTransformer(config);
101
107
  context.pipelines.set(key, pipeline);
@@ -1,2 +1,2 @@
1
- import { i as createTransformer, n as ExperimentalOptions, r as TransformerOptions, t as CustomCoverageInstrumentationOptions } from "./transformer-Cn7TWwgX.js";
1
+ import { i as createTransformer, n as ExperimentalOptions, r as TransformerOptions, t as CustomCoverageInstrumentationOptions } from "./transformer-0K5b44y0.js";
2
2
  export { CustomCoverageInstrumentationOptions, ExperimentalOptions, TransformerOptions, createTransformer };
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_transformer = require("./transformer-B9RYZvsj.js");
2
+ const require_transformer = require("./transformer-DO-Xiwwj.js");
3
3
  exports.createTransformer = require_transformer.createTransformer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollipop/jest-preset",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.4",
4
4
  "homepage": "https://github.com/rollipop-dev/rollipop#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/rollipop-dev/rollipop/issues"
@@ -44,7 +44,7 @@
44
44
  "swc-plugin-coverage-instrument": "0.0.33"
45
45
  },
46
46
  "devDependencies": {
47
- "rollipop": "1.0.0-beta.2",
47
+ "rollipop": "1.0.0-beta.4",
48
48
  "typescript": "7.0.2",
49
49
  "vite-plus": "1.3.0"
50
50
  },
@@ -52,7 +52,7 @@
52
52
  "@react-native/jest-preset": "*",
53
53
  "react": "*",
54
54
  "react-native": "*",
55
- "rollipop": "1.0.0-beta.2"
55
+ "rollipop": "1.0.0-beta.4"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@react-native/jest-preset": {