@tamagui/static 3.0.0-beta.765.1 → 3.0.0-beta.804.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/static",
3
- "version": "3.0.0-beta.765.1",
3
+ "version": "3.0.0-beta.804.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
@@ -39,27 +39,27 @@
39
39
  "access": "public"
40
40
  },
41
41
  "scripts": {
42
- "build": "tamagui-build --skip-native",
43
- "watch": "tamagui-build --skip-native --watch",
42
+ "build": "tamagui-build --skip-native --keep-env-target",
43
+ "watch": "tamagui-build --skip-native --keep-env-target --watch",
44
44
  "clean": "tamagui-build clean",
45
45
  "clean:build": "tamagui-build clean:build"
46
46
  },
47
47
  "dependencies": {
48
- "@tamagui/cli-color": "3.0.0-beta.765.1",
49
- "@tamagui/compiler-core": "3.0.0-beta.765.1",
50
- "@tamagui/config-default": "3.0.0-beta.765.1",
51
- "@tamagui/core": "3.0.0-beta.765.1",
52
- "@tamagui/dom": "3.0.0-beta.765.1",
53
- "@tamagui/fake-react-native": "3.0.0-beta.765.1",
54
- "@tamagui/generate-themes": "3.0.0-beta.765.1",
55
- "@tamagui/helpers": "3.0.0-beta.765.1",
56
- "@tamagui/helpers-node": "3.0.0-beta.765.1",
57
- "@tamagui/react-native-web-internals": "3.0.0-beta.765.1",
58
- "@tamagui/react-native-web-lite": "3.0.0-beta.765.1",
59
- "@tamagui/shorthands": "3.0.0-beta.765.1",
60
- "@tamagui/style-grammar": "3.0.0-beta.765.1",
61
- "@tamagui/types": "3.0.0-beta.765.1",
62
- "@tamagui/web": "3.0.0-beta.765.1",
48
+ "@tamagui/cli-color": "3.0.0-beta.804.1",
49
+ "@tamagui/compiler-core": "3.0.0-beta.804.1",
50
+ "@tamagui/config-default": "3.0.0-beta.804.1",
51
+ "@tamagui/core": "3.0.0-beta.804.1",
52
+ "@tamagui/dom": "3.0.0-beta.804.1",
53
+ "@tamagui/fake-react-native": "3.0.0-beta.804.1",
54
+ "@tamagui/generate-themes": "3.0.0-beta.804.1",
55
+ "@tamagui/helpers": "3.0.0-beta.804.1",
56
+ "@tamagui/helpers-node": "3.0.0-beta.804.1",
57
+ "@tamagui/react-native-web-internals": "3.0.0-beta.804.1",
58
+ "@tamagui/react-native-web-lite": "3.0.0-beta.804.1",
59
+ "@tamagui/shorthands": "3.0.0-beta.804.1",
60
+ "@tamagui/style-grammar": "3.0.0-beta.804.1",
61
+ "@tamagui/types": "3.0.0-beta.804.1",
62
+ "@tamagui/web": "3.0.0-beta.804.1",
63
63
  "browserslist": "^4.28.1",
64
64
  "check-dependency-version-consistency": "^4.1.0",
65
65
  "esbuild": "0.28.1",
@@ -71,7 +71,7 @@
71
71
  "react-native-web": "~0.21.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@tamagui/build": "3.0.0-beta.765.1",
74
+ "@tamagui/build": "3.0.0-beta.804.1",
75
75
  "@types/find-root": "^1.1.2",
76
76
  "@types/node": "^22.1.0",
77
77
  "@types/webpack": "^4.41.26",
package/src/compiler.ts CHANGED
@@ -289,7 +289,22 @@ export class CompilerFrontend {
289
289
  }
290
290
 
291
291
  compile(input: CompilerInput): Promise<CompilerResult> {
292
- const operation = this.queue.then(() => this.compileNow(input))
292
+ // compiling must not leak process-global state: internal stages set
293
+ // TAMAGUI_TARGET / IS_STATIC while evaluating modules for a platform, and
294
+ // an embedder (or a test that renders at runtime after compiling) must see
295
+ // its own environment unchanged afterward
296
+ const operation = this.queue.then(async () => {
297
+ const previousTarget = process.env.TAMAGUI_TARGET
298
+ const previousStatic = process.env.IS_STATIC
299
+ try {
300
+ return await this.compileNow(input)
301
+ } finally {
302
+ if (previousTarget === undefined) delete process.env.TAMAGUI_TARGET
303
+ else process.env.TAMAGUI_TARGET = previousTarget
304
+ if (previousStatic === undefined) delete process.env.IS_STATIC
305
+ else process.env.IS_STATIC = previousStatic
306
+ }
307
+ })
293
308
  this.queue = operation.catch(() => undefined)
294
309
  return operation
295
310
  }