@expo/fingerprint 0.20.13 → 0.21.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.
Files changed (88) hide show
  1. package/build/Config.js +69 -44
  2. package/build/Config.js.map +1 -1
  3. package/build/Dedup.js +82 -36
  4. package/build/Dedup.js.map +1 -1
  5. package/build/ExpoConfig.d.ts +11 -2
  6. package/build/ExpoConfig.js +118 -34
  7. package/build/ExpoConfig.js.map +1 -1
  8. package/build/ExpoConfigLoader.d.ts +41 -0
  9. package/build/ExpoConfigLoader.js +185 -145
  10. package/build/ExpoConfigLoader.js.map +1 -1
  11. package/build/ExpoResolver.js +77 -43
  12. package/build/ExpoResolver.js.map +1 -1
  13. package/build/Fingerprint.js +67 -76
  14. package/build/Fingerprint.js.map +1 -1
  15. package/build/Fingerprint.types.d.ts +98 -5
  16. package/build/Fingerprint.types.js +6 -3
  17. package/build/Fingerprint.types.js.map +1 -1
  18. package/build/Options.d.ts +1 -2
  19. package/build/Options.js +101 -51
  20. package/build/Options.js.map +1 -1
  21. package/build/Presets.d.ts +26 -0
  22. package/build/Presets.js +50 -0
  23. package/build/Presets.js.map +1 -0
  24. package/build/ProjectWorkflow.js +129 -67
  25. package/build/ProjectWorkflow.js.map +1 -1
  26. package/build/Sort.js +30 -16
  27. package/build/Sort.js.map +1 -1
  28. package/build/hash/FileHookTransform.js +26 -20
  29. package/build/hash/FileHookTransform.js.map +1 -1
  30. package/build/hash/Hash.d.ts +8 -1
  31. package/build/hash/Hash.js +208 -116
  32. package/build/hash/Hash.js.map +1 -1
  33. package/build/hash/ReactImportsPatcher.js +39 -27
  34. package/build/hash/ReactImportsPatcher.js.map +1 -1
  35. package/build/index.js +40 -22
  36. package/build/index.js.map +1 -1
  37. package/build/sourcer/AutolinkingConfig.d.ts +19 -0
  38. package/build/sourcer/AutolinkingConfig.js +159 -0
  39. package/build/sourcer/AutolinkingConfig.js.map +1 -0
  40. package/build/sourcer/Bare.js +192 -94
  41. package/build/sourcer/Bare.js.map +1 -1
  42. package/build/sourcer/Expo.d.ts +3 -2
  43. package/build/sourcer/Expo.js +264 -121
  44. package/build/sourcer/Expo.js.map +1 -1
  45. package/build/sourcer/Packages.d.ts +4 -3
  46. package/build/sourcer/Packages.js +83 -23
  47. package/build/sourcer/Packages.js.map +1 -1
  48. package/build/sourcer/PatchPackage.js +32 -14
  49. package/build/sourcer/PatchPackage.js.map +1 -1
  50. package/build/sourcer/SourceSkips.d.ts +27 -2
  51. package/build/sourcer/SourceSkips.js +65 -48
  52. package/build/sourcer/SourceSkips.js.map +1 -1
  53. package/build/sourcer/Sourcer.js +57 -38
  54. package/build/sourcer/Sourcer.js.map +1 -1
  55. package/build/sourcer/Utils.d.ts +14 -0
  56. package/build/sourcer/Utils.js +113 -41
  57. package/build/sourcer/Utils.js.map +1 -1
  58. package/build/types/module.d.ts +7 -0
  59. package/build/utils/Concurrency.js +29 -22
  60. package/build/utils/Concurrency.js.map +1 -1
  61. package/build/utils/Path.d.ts +5 -0
  62. package/build/utils/Path.js +138 -75
  63. package/build/utils/Path.js.map +1 -1
  64. package/build/utils/Predicates.js +11 -3
  65. package/build/utils/Predicates.js.map +1 -1
  66. package/build/utils/Profile.js +29 -20
  67. package/build/utils/Profile.js.map +1 -1
  68. package/build/utils/SpawnIPC.js +41 -16
  69. package/build/utils/SpawnIPC.js.map +1 -1
  70. package/cli/build/cli.js +94 -60
  71. package/cli/build/cli.js.map +1 -0
  72. package/cli/build/commands/diffFingerprints.js +76 -53
  73. package/cli/build/commands/diffFingerprints.js.map +1 -0
  74. package/cli/build/commands/generateFingerprint.js +129 -72
  75. package/cli/build/commands/generateFingerprint.js.map +1 -0
  76. package/cli/build/runLegacyCLIAsync.js +31 -22
  77. package/cli/build/runLegacyCLIAsync.js.map +1 -0
  78. package/cli/build/utils/args.js +110 -67
  79. package/cli/build/utils/args.js.map +1 -0
  80. package/cli/build/utils/errors.js +49 -20
  81. package/cli/build/utils/errors.js.map +1 -0
  82. package/cli/build/utils/log.js +62 -20
  83. package/cli/build/utils/log.js.map +1 -0
  84. package/cli/build/utils/readFingerprintFileAsync.js +25 -9
  85. package/cli/build/utils/readFingerprintFileAsync.js.map +1 -0
  86. package/cli/build/utils/withConsoleDisabledAsync.js +16 -8
  87. package/cli/build/utils/withConsoleDisabledAsync.js.map +1 -0
  88. package/package.json +37 -31
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["utils/errors.ts"],"sourcesContent":[null],"names":["CommandError","logCmdError","ERROR_PREFIX","Error","name","isCommandError","code","message","startsWith","substring","length","error","AssertionError","exit","errorDetails","stack","chalk","gray","red","toString"],"mappings":";;;;;;;;;;;;;;;QAUaA;eAAAA;;QAmBGC;eAAAA;;;;yBA7Be;;;;;;;gEACb;;;;;;qBAEG;;;;;;AAErB,MAAMC,eAAe;AAKd,MAAMF,qBAAqBG;;IAChCC,OAAO,eAAe;IACbC,iBAAiB,KAAK;IAE/B,YACE,AAAOC,IAAY,EACnBC,UAAkB,EAAE,CACpB;QACA,KAAK,CAAC,UAHCD,OAAAA;QAIP,uEAAuE;QACvE,wBAAwB;QACxB,IAAIC,QAAQC,UAAU,CAACN,eAAe;YACpCK,UAAUA,QAAQE,SAAS,CAACP,aAAaQ,MAAM;QACjD;QAEA,IAAI,CAACH,OAAO,GAAGA,WAAWD;IAC5B;AACF;AAEO,SAASL,YAAYU,KAAU;IACpC,IAAI,CAAEA,CAAAA,iBAAiBR,KAAI,GAAI;QAC7B,MAAMQ;IACR;IAEA,IAAIA,iBAAiBX,gBAAgBW,iBAAiBC,wBAAc,EAAE;QACpE,4CAA4C;QAC5CC,IAAAA,SAAI,EAACF;IACP;IAEA,MAAMG,eAAeH,MAAMI,KAAK,GAAG,OAAOC,gBAAK,CAACC,IAAI,CAACN,MAAMI,KAAK,IAAI;IAEpEF,IAAAA,SAAI,EAACG,gBAAK,CAACE,GAAG,CAACP,MAAMQ,QAAQ,MAAML;AACrC"}
@@ -1,17 +1,61 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.time = time;
7
- exports.timeEnd = timeEnd;
8
- exports.error = error;
9
- exports.exception = exception;
10
- exports.warn = warn;
11
- exports.log = log;
12
- exports.clear = clear;
13
- exports.exit = exit;
14
- const chalk_1 = __importDefault(require("chalk"));
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ clear: null,
7
+ error: null,
8
+ exception: null,
9
+ exit: null,
10
+ log: null,
11
+ time: null,
12
+ timeEnd: null,
13
+ warn: null
14
+ });
15
+ function _export(target, all) {
16
+ for(var name in all)Object.defineProperty(target, name, {
17
+ enumerable: true,
18
+ get: Object.getOwnPropertyDescriptor(all, name).get
19
+ });
20
+ }
21
+ _export(exports, {
22
+ get clear () {
23
+ return clear;
24
+ },
25
+ get error () {
26
+ return error;
27
+ },
28
+ get exception () {
29
+ return exception;
30
+ },
31
+ get exit () {
32
+ return exit;
33
+ },
34
+ get log () {
35
+ return log;
36
+ },
37
+ get time () {
38
+ return time;
39
+ },
40
+ get timeEnd () {
41
+ return timeEnd;
42
+ },
43
+ get warn () {
44
+ return warn;
45
+ }
46
+ });
47
+ function _chalk() {
48
+ const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
49
+ _chalk = function() {
50
+ return data;
51
+ };
52
+ return data;
53
+ }
54
+ function _interop_require_default(obj) {
55
+ return obj && obj.__esModule ? obj : {
56
+ default: obj
57
+ };
58
+ }
15
59
  function time(label) {
16
60
  console.time(label);
17
61
  }
@@ -21,21 +65,18 @@ function timeEnd(label) {
21
65
  function error(...message) {
22
66
  console.error(...message);
23
67
  }
24
- /** Print an error and provide additional info (the stack trace) in debug mode. */
25
68
  function exception(e) {
26
- error(chalk_1.default.red(e.toString()) + (process.env.EXPO_DEBUG ? '\n' + chalk_1.default.gray(e.stack) : ''));
69
+ error(_chalk().default.red(e.toString()) + (process.env.EXPO_DEBUG ? '\n' + _chalk().default.gray(e.stack) : ''));
27
70
  }
28
71
  function warn(...message) {
29
- console.warn(...message.map((value) => chalk_1.default.yellow(value)));
72
+ console.warn(...message.map((value)=>_chalk().default.yellow(value)));
30
73
  }
31
74
  function log(...message) {
32
75
  console.log(...message);
33
76
  }
34
- /** Clear the terminal of all text. */
35
77
  function clear() {
36
78
  process.stdout.write(process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H');
37
79
  }
38
- /** Log a message and exit the current process. If the `code` is non-zero then `console.error` will be used instead of `console.log`. */
39
80
  function exit(message, code = 1) {
40
81
  if (message instanceof Error) {
41
82
  exception(message);
@@ -44,10 +85,11 @@ function exit(message, code = 1) {
44
85
  if (message) {
45
86
  if (code === 0) {
46
87
  log(message);
47
- }
48
- else {
88
+ } else {
49
89
  error(message);
50
90
  }
51
91
  }
52
92
  process.exit(code);
53
93
  }
94
+
95
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["utils/log.ts"],"sourcesContent":[null],"names":["clear","error","exception","exit","log","time","timeEnd","warn","label","console","message","e","chalk","red","toString","process","env","EXPO_DEBUG","gray","stack","map","value","yellow","stdout","write","platform","code","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;QA4BgBA;eAAAA;;QAlBAC;eAAAA;;QAKAC;eAAAA;;QAkBAC;eAAAA;;QAVAC;eAAAA;;QArBAC;eAAAA;;QAIAC;eAAAA;;QAaAC;eAAAA;;;;gEAnBE;;;;;;;;;;;AAEX,SAASF,KAAKG,KAAc;IACjCC,QAAQJ,IAAI,CAACG;AACf;AAEO,SAASF,QAAQE,KAAc;IACpCC,QAAQH,OAAO,CAACE;AAClB;AAEO,SAASP,MAAM,GAAGS,OAAiB;IACxCD,QAAQR,KAAK,IAAIS;AACnB;AAGO,SAASR,UAAUS,CAAQ;IAChCV,MAAMW,gBAAK,CAACC,GAAG,CAACF,EAAEG,QAAQ,MAAOC,CAAAA,QAAQC,GAAG,CAACC,UAAU,GAAG,OAAOL,gBAAK,CAACM,IAAI,CAACP,EAAEQ,KAAK,IAAI,EAAC;AAC1F;AAEO,SAASZ,KAAK,GAAGG,OAAiB;IACvCD,QAAQF,IAAI,IAAIG,QAAQU,GAAG,CAAC,CAACC,QAAUT,gBAAK,CAACU,MAAM,CAACD;AACtD;AAEO,SAASjB,IAAI,GAAGM,OAAiB;IACtCD,QAAQL,GAAG,IAAIM;AACjB;AAGO,SAASV;IACde,QAAQQ,MAAM,CAACC,KAAK,CAACT,QAAQU,QAAQ,KAAK,UAAU,mBAAmB;AACzE;AAGO,SAAStB,KAAKO,OAAuB,EAAEgB,OAAe,CAAC;IAC5D,IAAIhB,mBAAmBiB,OAAO;QAC5BzB,UAAUQ;QACVK,QAAQZ,IAAI,CAACuB;IACf;IAEA,IAAIhB,SAAS;QACX,IAAIgB,SAAS,GAAG;YACdtB,IAAIM;QACN,OAAO;YACLT,MAAMS;QACR;IACF;IAEAK,QAAQZ,IAAI,CAACuB;AACf"}
@@ -1,15 +1,31 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = readFingerprintFileAsync;
7
- const promises_1 = __importDefault(require("fs/promises"));
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return readFingerprintFileAsync;
9
+ }
10
+ });
11
+ function _promises() {
12
+ const data = /*#__PURE__*/ _interop_require_default(require("fs/promises"));
13
+ _promises = function() {
14
+ return data;
15
+ };
16
+ return data;
17
+ }
18
+ function _interop_require_default(obj) {
19
+ return obj && obj.__esModule ? obj : {
20
+ default: obj
21
+ };
22
+ }
8
23
  async function readFingerprintFileAsync(path) {
9
24
  try {
10
- return JSON.parse(await promises_1.default.readFile(path, 'utf-8'));
11
- }
12
- catch (e) {
25
+ return JSON.parse(await _promises().default.readFile(path, 'utf-8'));
26
+ } catch (e) {
13
27
  throw new Error(`Unable to read fingerprint file ${path}: ${e.message}`);
14
28
  }
15
29
  }
30
+
31
+ //# sourceMappingURL=readFingerprintFileAsync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["utils/readFingerprintFileAsync.ts"],"sourcesContent":[null],"names":["readFingerprintFileAsync","path","JSON","parse","fs","readFile","e","Error","message"],"mappings":";;;;+BAIA;;;eAA8BA;;;;gEAJf;;;;;;;;;;;AAIA,eAAeA,yBAAyBC,IAAY;IACjE,IAAI;QACF,OAAOC,KAAKC,KAAK,CAAC,MAAMC,mBAAE,CAACC,QAAQ,CAACJ,MAAM;IAC5C,EAAE,OAAOK,GAAQ;QACf,MAAM,IAAIC,MAAM,CAAC,gCAAgC,EAAEN,KAAK,EAAE,EAAEK,EAAEE,OAAO,EAAE;IACzE;AACF"}
@@ -1,23 +1,31 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withConsoleDisabledAsync = withConsoleDisabledAsync;
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "withConsoleDisabledAsync", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return withConsoleDisabledAsync;
9
+ }
10
+ });
4
11
  async function withConsoleDisabledAsync(block) {
5
12
  const loggingFunctions = {
6
13
  log: console.log,
7
14
  warn: console.warn,
8
- error: console.error,
15
+ error: console.error
9
16
  };
10
17
  // Disable logging for this command since the only thing printed to stdout should be the JSON output.
11
- console.log = function () { };
12
- console.warn = function () { };
13
- console.error = function () { };
18
+ console.log = function() {};
19
+ console.warn = function() {};
20
+ console.error = function() {};
14
21
  try {
15
22
  return await block();
16
- }
17
- finally {
23
+ } finally{
18
24
  // Re-enable logging functions for testing.
19
25
  console.log = loggingFunctions.log;
20
26
  console.warn = loggingFunctions.warn;
21
27
  console.error = loggingFunctions.error;
22
28
  }
23
29
  }
30
+
31
+ //# sourceMappingURL=withConsoleDisabledAsync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["utils/withConsoleDisabledAsync.ts"],"sourcesContent":[null],"names":["withConsoleDisabledAsync","block","loggingFunctions","log","console","warn","error"],"mappings":";;;;+BAAsBA;;;eAAAA;;;AAAf,eAAeA,yBAA4BC,KAAuB;IACvE,MAAMC,mBAAmB;QACvBC,KAAKC,QAAQD,GAAG;QAChBE,MAAMD,QAAQC,IAAI;QAClBC,OAAOF,QAAQE,KAAK;IACtB;IACA,qGAAqG;IACrGF,QAAQD,GAAG,GAAG,YAAa;IAC3BC,QAAQC,IAAI,GAAG,YAAa;IAC5BD,QAAQE,KAAK,GAAG,YAAa;IAE7B,IAAI;QACF,OAAO,MAAML;IACf,SAAU;QACR,2CAA2C;QAC3CG,QAAQD,GAAG,GAAGD,iBAAiBC,GAAG;QAClCC,QAAQC,IAAI,GAAGH,iBAAiBG,IAAI;QACpCD,QAAQE,KAAK,GAAGJ,iBAAiBI,KAAK;IACxC;AACF"}
package/package.json CHANGED
@@ -1,37 +1,37 @@
1
1
  {
2
2
  "name": "@expo/fingerprint",
3
- "version": "0.20.13",
3
+ "version": "0.21.1",
4
4
  "description": "A library to generate a fingerprint from a React Native project",
5
- "main": "build/index.js",
6
- "types": "build/index.d.ts",
7
- "bin": {
8
- "fingerprint": "bin/cli.js"
9
- },
10
- "files": [
11
- "bin",
12
- "build",
13
- "cli/build"
14
- ],
15
5
  "keywords": [
16
6
  "expo",
17
- "react-native",
18
7
  "fingerprint",
19
8
  "hash",
20
- "node"
9
+ "node",
10
+ "react-native"
21
11
  ],
12
+ "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/fingerprint#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/expo/expo/issues"
15
+ },
16
+ "license": "MIT",
17
+ "author": "650 Industries, Inc.",
22
18
  "repository": {
23
19
  "type": "git",
24
20
  "url": "https://github.com/expo/expo.git",
25
21
  "directory": "packages/@expo/fingerprint"
26
22
  },
27
- "bugs": {
28
- "url": "https://github.com/expo/expo/issues"
23
+ "bin": {
24
+ "fingerprint": "bin/cli.js"
29
25
  },
30
- "author": "650 Industries, Inc.",
31
- "license": "MIT",
32
- "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/fingerprint#readme",
26
+ "files": [
27
+ "bin",
28
+ "build",
29
+ "cli/build"
30
+ ],
31
+ "main": "build/index.js",
32
+ "types": "build/index.d.ts",
33
33
  "dependencies": {
34
- "@expo/env": "^2.4.3",
34
+ "@expo/env": "^2.5.0",
35
35
  "@expo/spawn-async": "^1.8.0",
36
36
  "arg": "^5.0.2",
37
37
  "chalk": "^4.1.2",
@@ -44,26 +44,32 @@
44
44
  "semver": "^7.6.0"
45
45
  },
46
46
  "devDependencies": {
47
+ "@expo/config": "~58.0.0",
48
+ "@expo/require-utils": "~58.0.0",
47
49
  "@types/debug": "^4.1.5",
48
50
  "@types/getenv": "^1.0.0",
49
- "@types/semver": "^7.5.8",
50
51
  "@types/node": "^22.14.0",
51
- "require-from-string": "^2.0.2",
52
- "temp-dir": "^2.0.0",
53
- "expo": "57.0.22",
52
+ "@types/require-from-string": "^1.2.3",
53
+ "@types/semver": "^7.5.8",
54
54
  "expo-module-scripts": "56.0.3",
55
- "expo-splash-screen": "57.0.9"
55
+ "expo-splash-screen": "58.0.0",
56
+ "memfs": "^3.2.0",
57
+ "require-from-string": "^2.0.2",
58
+ "temp-dir": "^2.0.0"
56
59
  },
57
- "gitHead": "9e5319c0f821a27b7924841903abae50e2b41790",
60
+ "gitHead": "313e67f5c9dfb16f9deca74a271cd1d4f33a6f82",
58
61
  "scripts": {
59
- "build": "expo-module build",
62
+ "build": "pnpm run build:lib && pnpm run build:cli",
63
+ "build:lib": "expo-build cjs:src",
64
+ "build:cli": "expo-build --base cli cjs:src",
60
65
  "clean": "expo-module clean",
61
- "lint": "expo-module lint",
62
- "test": "expo-module test",
66
+ "lint": "oxlint --config oxlint.config.mjs .",
67
+ "format": "expo-module format",
68
+ "test": "jest",
63
69
  "expo-module": "expo-module",
64
70
  "pretest:e2e": "expo-module prepublishOnly",
65
- "test:e2e": "expo-module test --config e2e/jest.config.js",
66
- "typecheck": "expo-module typecheck",
67
- "watch": "expo-module tsc --watch"
71
+ "test:e2e": "jest --config e2e/jest.config.js",
72
+ "depscheck": "expo-module depscheck",
73
+ "typecheck": "tsc -b tsconfig.all.json"
68
74
  }
69
75
  }