@craft-native/ios 0.0.186 → 0.0.187

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -156,7 +156,12 @@ function serializeSimulatorSteps(steps) {
156
156
  `;
157
157
  }
158
158
  function createNativeMutationValidator() {
159
- const output = mkdtempSync(join2(tmpdir(), "craft-native-mutation-"));
159
+ const output = mkdtempSync(join2(tmpdir(), `craft-native-mutation-p${process.pid}-`));
160
+ const removeOutput = () => {
161
+ process.off("exit", removeOutput);
162
+ rmSync(output, { recursive: true, force: true });
163
+ };
164
+ process.on("exit", removeOutput);
160
165
  const binary = join2(output, "validate");
161
166
  try {
162
167
  writeFileSync(join2(output, "main.swift"), readFileSync(join2(templates, "MutationValidator.swift")));
@@ -164,7 +169,7 @@ function createNativeMutationValidator() {
164
169
  if (build.exitCode !== 0)
165
170
  throw new Error(build.stderr.toString());
166
171
  } catch (error) {
167
- rmSync(output, { recursive: true, force: true });
172
+ removeOutput();
168
173
  throw error;
169
174
  }
170
175
  let disposed = false;
@@ -185,7 +190,7 @@ function createNativeMutationValidator() {
185
190
  },
186
191
  dispose() {
187
192
  disposed = true;
188
- rmSync(output, { recursive: true, force: true });
193
+ removeOutput();
189
194
  }
190
195
  };
191
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craft-native/ios",
3
- "version": "0.0.186",
3
+ "version": "0.0.187",
4
4
  "homepage": "https://github.com/craft-native/craft/tree/main/packages/ios#readme",
5
5
  "repository": {
6
6
  "type": "git",