@tamagui/static 1.112.22 → 1.112.24

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/src/checkDeps.ts CHANGED
@@ -1,5 +1,4 @@
1
- // @ts-ignore
2
- import type { CDVC as Type } from 'check-dependency-version-consistency'
1
+ import { CDVC } from './check-dep-versions'
3
2
 
4
3
  export enum DEPENDENCY_TYPE {
5
4
  dependencies = 'dependencies',
@@ -20,7 +19,13 @@ export type Options = {
20
19
  ignorePathPattern?: readonly string[]
21
20
  }
22
21
 
23
- export async function checkDeps(root: string, options: Options) {
24
- const checker = await import('check-dependency-version-consistency')
25
- return new checker.CDVC(root, options) as Type
22
+ export async function checkDeps(root: string) {
23
+ const summary = new CDVC(root).toMismatchSummary()
24
+
25
+ if (!summary) {
26
+ console.info(`Tamagui dependencies look good ✅`)
27
+ }
28
+
29
+ console.error(summary)
30
+ process.exit(1)
26
31
  }
@@ -96,6 +96,8 @@ function updateLastLoaded(config: any) {
96
96
  global.tamaguiLastBundledConfig = config
97
97
  }
98
98
 
99
+ let hasBundledOnce = false
100
+
99
101
  export async function bundleConfig(props: TamaguiOptions) {
100
102
  // webpack is calling this a ton for no reason
101
103
  if (global.tamaguiLastBundledConfig && Date.now() - global.tamaguiLastLoaded < 3000) {
@@ -189,12 +191,17 @@ export async function bundleConfig(props: TamaguiOptions) {
189
191
  let out
190
192
  const { unregister } = registerRequire(props.platform || 'web')
191
193
  try {
192
- // clear cache to get new files
193
- for (const key in require.cache) {
194
- // avoid clearing core/web it seems to break things
195
- if (!/(core|web)[\/\\]dist/.test(key)) {
196
- delete require.cache[key]
194
+ if (hasBundledOnce) {
195
+ // this did cause mini-css-extract plugin to freak out
196
+ // clear cache to get new files
197
+ for (const key in require.cache) {
198
+ // avoid clearing core/web it seems to break things
199
+ if (!/(core|web)[\/\\]dist/.test(key)) {
200
+ delete require.cache[key]
201
+ }
197
202
  }
203
+ } else {
204
+ hasBundledOnce = true
198
205
  }
199
206
 
200
207
  out = require(configOutPath)
@@ -0,0 +1,37 @@
1
+ /**
2
+ * "license": "MIT",
3
+ "author": "Bryan Mishkin",
4
+ */
5
+ /** Relevant public data about a dependency. */
6
+ type Dependency = {
7
+ name: string;
8
+ isMismatching: boolean;
9
+ versions: readonly {
10
+ version: string;
11
+ packages: readonly {
12
+ pathRelative: string;
13
+ }[];
14
+ }[];
15
+ };
16
+ export declare class CDVC {
17
+ /** An object mapping each dependency in the workspace to information including the versions found of it. */
18
+ private readonly dependencies;
19
+ /**
20
+ * @param path - path to the workspace root
21
+ * @param options
22
+ * @param options.fix - Whether to autofix inconsistencies (using latest version present)
23
+ * @param options.ignoreDep - Dependency(s) to ignore mismatches for
24
+ * @param options.includeDepPattern - RegExp(s) of dependency names to ignore mismatches for
25
+ * @param options.ignorePackage - Workspace package(s) to ignore mismatches for
26
+ * @param options.ignorePackagePattern - RegExp(s) of package names to ignore mismatches for
27
+ * @param options.ignorePath - Workspace-relative path(s) of packages to ignore mismatches for
28
+ * @param options.ignorePathPattern - RegExp(s) of workspace-relative path of packages to ignore mismatches for
29
+ */
30
+ constructor(path: string);
31
+ toMismatchSummary(): string;
32
+ getDependencies(): readonly Dependency[];
33
+ getDependency(name: string): Dependency;
34
+ get hasMismatchingDependencies(): boolean;
35
+ }
36
+ export {};
37
+ //# sourceMappingURL=check-dep-versions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-dep-versions.d.ts","sourceRoot":"","sources":["../src/check-dep-versions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkpBH,+CAA+C;AAC/C,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,SAAS;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,SAAS;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAC9C,EAAE,CAAA;CACJ,CAAA;AAED,qBAAa,IAAI;IACf,4GAA4G;IAC5G,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAE3C;;;;;;;;;;OAUG;gBACS,IAAI,EAAE,MAAM;IAKjB,iBAAiB,IAAI,MAAM;IAI3B,eAAe,IAAI,SAAS,UAAU,EAAE;IAMxC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAc9C,IAAW,0BAA0B,IAAI,OAAO,CAE/C;CACF"}
@@ -1,4 +1,3 @@
1
- import type { CDVC as Type } from 'check-dependency-version-consistency';
2
1
  export declare enum DEPENDENCY_TYPE {
3
2
  dependencies = "dependencies",
4
3
  devDependencies = "devDependencies",
@@ -16,5 +15,5 @@ export type Options = {
16
15
  ignorePath?: readonly string[];
17
16
  ignorePathPattern?: readonly string[];
18
17
  };
19
- export declare function checkDeps(root: string, options: Options): Promise<Type>;
18
+ export declare function checkDeps(root: string): Promise<void>;
20
19
  //# sourceMappingURL=checkDeps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkDeps.d.ts","sourceRoot":"","sources":["../src/checkDeps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,sCAAsC,CAAA;AAExE,oBAAY,eAAe;IACzB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAC7C,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;CAC5B;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,eAAe,EAAE,EAAE,CAAA;IACzC,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9B,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACtC,CAAA;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,iBAG7D"}
1
+ {"version":3,"file":"checkDeps.d.ts","sourceRoot":"","sources":["../src/checkDeps.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe;IACzB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAC7C,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;CAC5B;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,eAAe,EAAE,EAAE,CAAA;IACzC,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9B,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACtC,CAAA;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,iBAS3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"bundleConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/bundleConfig.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAKvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAK9C,KAAK,WAAW,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,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