@procore/hammer-test-jest 0.11.0 → 1.0.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @procore/hammer-test-jest
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - d10edb3: First general release. No breaking changes from prior releases.
8
+
9
+ ### Patch Changes
10
+
11
+ - d6e8e38: Upgrades dependencies.
12
+ - Updated dependencies [d10edb3]
13
+ - @procore/hammer-types@1.0.0
14
+
15
+ ## 0.12.0
16
+
17
+ ### Minor Changes
18
+
19
+ - d6b682a: Added `--update` or `-u` flag to test command for updating snapshots.
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [31f3d8c]
24
+ - Updated dependencies [d6b682a]
25
+ - @procore/hammer-types@0.8.0
26
+
3
27
  ## 0.11.0
4
28
 
5
29
  ### Minor Changes
package/README.md CHANGED
@@ -4,7 +4,7 @@ The [jest][jest] implementation of the `test` commands.
4
4
 
5
5
  ## Quick Start
6
6
 
7
- Run `test` commands from the `hammer` command. If this package is not already installed, or is out-of-date, you will be prompted to install/upgrade.
7
+ Run the `test` command from the `hammer`. If this package is not already installed, or is out-of-date, you will be prompted to install/upgrade.
8
8
 
9
9
  Alternatively, you can install it directly:
10
10
 
@@ -12,6 +12,24 @@ Alternatively, you can install it directly:
12
12
  yarn add -D @procore/hammer-test-jest
13
13
  ```
14
14
 
15
+ ## Commands
16
+
17
+ `hammer test`
18
+
19
+ Run your projects unit tests
20
+
21
+ ## CLI Options
22
+
23
+ The plugin supports `@procore/hammer` CLI options, such as:
24
+
25
+ - `--watch` / `-w` - Watch files for changes and rerun tests
26
+ - `--coverage` - Collect and report test coverage information
27
+ - `--ci` - Run in CI environment mode
28
+ - `--silent` - Prevent tests from printing console messages
29
+ - `--serial` - Run tests serially in the current process
30
+ - `--debug` - Print debugging info about Jest configuration
31
+ - `--update` / `-u` - Update snapshots that are failing in this test run
32
+
15
33
  ## Configuration
16
34
 
17
35
  Custom configuration is done using the `hammer` configuration file. The customization key is `jestOverride`, and the configuration that should be returned should be compatible with the `jest` format.
package/dist/index.d.mts CHANGED
@@ -16,6 +16,7 @@ declare const test: (rootDir: string, config: HammerConfig, options: {
16
16
  silent: boolean;
17
17
  serial: boolean;
18
18
  debug: boolean;
19
+ update: boolean;
19
20
  fileFilters?: string[];
20
21
  }) => Promise<void>;
21
22
 
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ declare const test: (rootDir: string, config: HammerConfig, options: {
16
16
  silent: boolean;
17
17
  serial: boolean;
18
18
  debug: boolean;
19
+ update: boolean;
19
20
  fileFilters?: string[];
20
21
  }) => Promise<void>;
21
22
 
package/dist/index.js CHANGED
@@ -201,13 +201,16 @@ var allowedFlags = [
201
201
  "coverage",
202
202
  "ci",
203
203
  "silent",
204
- "debug"
204
+ "debug",
205
+ "update"
205
206
  ];
206
207
  function generateArgv(options) {
207
208
  const argv = [];
208
209
  for (const [key, value] of Object.entries(options)) {
209
210
  if (value && key === "serial") {
210
211
  argv.push(`--runInBand`);
212
+ } else if (value && key === "update") {
213
+ argv.push(`--updateSnapshot`);
211
214
  } else if (value && allowedFlags.includes(key)) {
212
215
  argv.push(`--${key}`);
213
216
  }
package/dist/index.mjs CHANGED
@@ -160,13 +160,16 @@ var allowedFlags = [
160
160
  "coverage",
161
161
  "ci",
162
162
  "silent",
163
- "debug"
163
+ "debug",
164
+ "update"
164
165
  ];
165
166
  function generateArgv(options) {
166
167
  const argv = [];
167
168
  for (const [key, value] of Object.entries(options)) {
168
169
  if (value && key === "serial") {
169
170
  argv.push(`--runInBand`);
171
+ } else if (value && key === "update") {
172
+ argv.push(`--updateSnapshot`);
170
173
  } else if (value && allowedFlags.includes(key)) {
171
174
  argv.push(`--${key}`);
172
175
  }
@@ -1835,7 +1835,7 @@ var require_dist = __commonJS({
1835
1835
  "../../node_modules/.store/expect-type-npm-1.2.1-5a68fc99bd/package/dist/index.js"(exports2) {
1836
1836
  "use strict";
1837
1837
  init_cjs_shims();
1838
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
1838
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1839
1839
  if (k2 === void 0) k2 = k;
1840
1840
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1841
1841
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1844,10 +1844,10 @@ var require_dist = __commonJS({
1844
1844
  } };
1845
1845
  }
1846
1846
  Object.defineProperty(o, k2, desc);
1847
- } : function(o, m2, k, k2) {
1847
+ }) : (function(o, m2, k, k2) {
1848
1848
  if (k2 === void 0) k2 = k;
1849
1849
  o[k2] = m2[k];
1850
- });
1850
+ }));
1851
1851
  var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
1852
1852
  for (var p3 in m2) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m2, p3);
1853
1853
  };
@@ -2486,7 +2486,7 @@ var hasRequiredReactIs_development$1;
2486
2486
  function requireReactIs_development$1() {
2487
2487
  if (hasRequiredReactIs_development$1) return reactIs_development$1;
2488
2488
  hasRequiredReactIs_development$1 = 1;
2489
- "production" !== process.env.NODE_ENV && function() {
2489
+ "production" !== process.env.NODE_ENV && (function() {
2490
2490
  function typeOf2(object2) {
2491
2491
  if ("object" === typeof object2 && null !== object2) {
2492
2492
  var $$typeof = object2.$$typeof;
@@ -2572,7 +2572,7 @@ function requireReactIs_development$1() {
2572
2572
  return "string" === typeof type3 || "function" === typeof type3 || type3 === REACT_FRAGMENT_TYPE || type3 === REACT_PROFILER_TYPE || type3 === REACT_STRICT_MODE_TYPE || type3 === REACT_SUSPENSE_TYPE || type3 === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type3 && null !== type3 && (type3.$$typeof === REACT_LAZY_TYPE || type3.$$typeof === REACT_MEMO_TYPE || type3.$$typeof === REACT_CONTEXT_TYPE || type3.$$typeof === REACT_CONSUMER_TYPE || type3.$$typeof === REACT_FORWARD_REF_TYPE || type3.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type3.getModuleId) ? true : false;
2573
2573
  };
2574
2574
  reactIs_development$1.typeOf = typeOf2;
2575
- }();
2575
+ })();
2576
2576
  return reactIs_development$1;
2577
2577
  }
2578
2578
  var hasRequiredReactIs$1;
@@ -16717,7 +16717,7 @@ function requireTypeDetect() {
16717
16717
  (function(module2, exports2) {
16718
16718
  (function(global3, factory) {
16719
16719
  module2.exports = factory();
16720
- })(typeDetect, function() {
16720
+ })(typeDetect, (function() {
16721
16721
  var promiseExists = typeof Promise === "function";
16722
16722
  var globalObject = typeof self === "object" ? self : commonjsGlobal;
16723
16723
  var symbolExists = typeof Symbol !== "undefined";
@@ -16826,7 +16826,7 @@ function requireTypeDetect() {
16826
16826
  return Object.prototype.toString.call(obj).slice(toStringLeftSliceLength, toStringRightSliceLength);
16827
16827
  }
16828
16828
  return typeDetect2;
16829
- });
16829
+ }));
16830
16830
  })(typeDetect$1);
16831
16831
  return typeDetect$1.exports;
16832
16832
  }
@@ -1836,7 +1836,7 @@ var require_dist = __commonJS({
1836
1836
  "../../node_modules/.store/expect-type-npm-1.2.1-5a68fc99bd/package/dist/index.js"(exports) {
1837
1837
  "use strict";
1838
1838
  init_esm_shims();
1839
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
1839
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1840
1840
  if (k2 === void 0) k2 = k;
1841
1841
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1842
1842
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1845,10 +1845,10 @@ var require_dist = __commonJS({
1845
1845
  } };
1846
1846
  }
1847
1847
  Object.defineProperty(o, k2, desc);
1848
- } : function(o, m2, k, k2) {
1848
+ }) : (function(o, m2, k, k2) {
1849
1849
  if (k2 === void 0) k2 = k;
1850
1850
  o[k2] = m2[k];
1851
- });
1851
+ }));
1852
1852
  var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
1853
1853
  for (var p3 in m2) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p3)) __createBinding(exports2, m2, p3);
1854
1854
  };
@@ -2487,7 +2487,7 @@ var hasRequiredReactIs_development$1;
2487
2487
  function requireReactIs_development$1() {
2488
2488
  if (hasRequiredReactIs_development$1) return reactIs_development$1;
2489
2489
  hasRequiredReactIs_development$1 = 1;
2490
- "production" !== process.env.NODE_ENV && function() {
2490
+ "production" !== process.env.NODE_ENV && (function() {
2491
2491
  function typeOf2(object2) {
2492
2492
  if ("object" === typeof object2 && null !== object2) {
2493
2493
  var $$typeof = object2.$$typeof;
@@ -2573,7 +2573,7 @@ function requireReactIs_development$1() {
2573
2573
  return "string" === typeof type3 || "function" === typeof type3 || type3 === REACT_FRAGMENT_TYPE || type3 === REACT_PROFILER_TYPE || type3 === REACT_STRICT_MODE_TYPE || type3 === REACT_SUSPENSE_TYPE || type3 === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type3 && null !== type3 && (type3.$$typeof === REACT_LAZY_TYPE || type3.$$typeof === REACT_MEMO_TYPE || type3.$$typeof === REACT_CONTEXT_TYPE || type3.$$typeof === REACT_CONSUMER_TYPE || type3.$$typeof === REACT_FORWARD_REF_TYPE || type3.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type3.getModuleId) ? true : false;
2574
2574
  };
2575
2575
  reactIs_development$1.typeOf = typeOf2;
2576
- }();
2576
+ })();
2577
2577
  return reactIs_development$1;
2578
2578
  }
2579
2579
  var hasRequiredReactIs$1;
@@ -16718,7 +16718,7 @@ function requireTypeDetect() {
16718
16718
  (function(module, exports) {
16719
16719
  (function(global3, factory) {
16720
16720
  module.exports = factory();
16721
- })(typeDetect, function() {
16721
+ })(typeDetect, (function() {
16722
16722
  var promiseExists = typeof Promise === "function";
16723
16723
  var globalObject = typeof self === "object" ? self : commonjsGlobal;
16724
16724
  var symbolExists = typeof Symbol !== "undefined";
@@ -16827,7 +16827,7 @@ function requireTypeDetect() {
16827
16827
  return Object.prototype.toString.call(obj).slice(toStringLeftSliceLength, toStringRightSliceLength);
16828
16828
  }
16829
16829
  return typeDetect2;
16830
- });
16830
+ }));
16831
16831
  })(typeDetect$1);
16832
16832
  return typeDetect$1.exports;
16833
16833
  }
@@ -1835,7 +1835,7 @@ var require_dist = __commonJS({
1835
1835
  "../../node_modules/.store/expect-type-npm-1.2.1-5a68fc99bd/package/dist/index.js"(exports2) {
1836
1836
  "use strict";
1837
1837
  init_cjs_shims();
1838
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
1838
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1839
1839
  if (k2 === void 0) k2 = k;
1840
1840
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1841
1841
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1844,10 +1844,10 @@ var require_dist = __commonJS({
1844
1844
  } };
1845
1845
  }
1846
1846
  Object.defineProperty(o, k2, desc);
1847
- } : function(o, m2, k, k2) {
1847
+ }) : (function(o, m2, k, k2) {
1848
1848
  if (k2 === void 0) k2 = k;
1849
1849
  o[k2] = m2[k];
1850
- });
1850
+ }));
1851
1851
  var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
1852
1852
  for (var p3 in m2) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m2, p3);
1853
1853
  };
@@ -2511,7 +2511,7 @@ var hasRequiredReactIs_development$1;
2511
2511
  function requireReactIs_development$1() {
2512
2512
  if (hasRequiredReactIs_development$1) return reactIs_development$1;
2513
2513
  hasRequiredReactIs_development$1 = 1;
2514
- "production" !== process.env.NODE_ENV && function() {
2514
+ "production" !== process.env.NODE_ENV && (function() {
2515
2515
  function typeOf2(object2) {
2516
2516
  if ("object" === typeof object2 && null !== object2) {
2517
2517
  var $$typeof = object2.$$typeof;
@@ -2597,7 +2597,7 @@ function requireReactIs_development$1() {
2597
2597
  return "string" === typeof type3 || "function" === typeof type3 || type3 === REACT_FRAGMENT_TYPE || type3 === REACT_PROFILER_TYPE || type3 === REACT_STRICT_MODE_TYPE || type3 === REACT_SUSPENSE_TYPE || type3 === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type3 && null !== type3 && (type3.$$typeof === REACT_LAZY_TYPE || type3.$$typeof === REACT_MEMO_TYPE || type3.$$typeof === REACT_CONTEXT_TYPE || type3.$$typeof === REACT_CONSUMER_TYPE || type3.$$typeof === REACT_FORWARD_REF_TYPE || type3.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type3.getModuleId) ? true : false;
2598
2598
  };
2599
2599
  reactIs_development$1.typeOf = typeOf2;
2600
- }();
2600
+ })();
2601
2601
  return reactIs_development$1;
2602
2602
  }
2603
2603
  var hasRequiredReactIs$1;
@@ -16742,7 +16742,7 @@ function requireTypeDetect() {
16742
16742
  (function(module2, exports2) {
16743
16743
  (function(global3, factory) {
16744
16744
  module2.exports = factory();
16745
- })(typeDetect, function() {
16745
+ })(typeDetect, (function() {
16746
16746
  var promiseExists = typeof Promise === "function";
16747
16747
  var globalObject = typeof self === "object" ? self : commonjsGlobal;
16748
16748
  var symbolExists = typeof Symbol !== "undefined";
@@ -16851,7 +16851,7 @@ function requireTypeDetect() {
16851
16851
  return Object.prototype.toString.call(obj).slice(toStringLeftSliceLength, toStringRightSliceLength);
16852
16852
  }
16853
16853
  return typeDetect2;
16854
- });
16854
+ }));
16855
16855
  })(typeDetect$1);
16856
16856
  return typeDetect$1.exports;
16857
16857
  }
@@ -1836,7 +1836,7 @@ var require_dist = __commonJS({
1836
1836
  "../../node_modules/.store/expect-type-npm-1.2.1-5a68fc99bd/package/dist/index.js"(exports) {
1837
1837
  "use strict";
1838
1838
  init_esm_shims();
1839
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
1839
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1840
1840
  if (k2 === void 0) k2 = k;
1841
1841
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1842
1842
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1845,10 +1845,10 @@ var require_dist = __commonJS({
1845
1845
  } };
1846
1846
  }
1847
1847
  Object.defineProperty(o, k2, desc);
1848
- } : function(o, m2, k, k2) {
1848
+ }) : (function(o, m2, k, k2) {
1849
1849
  if (k2 === void 0) k2 = k;
1850
1850
  o[k2] = m2[k];
1851
- });
1851
+ }));
1852
1852
  var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
1853
1853
  for (var p3 in m2) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p3)) __createBinding(exports2, m2, p3);
1854
1854
  };
@@ -2512,7 +2512,7 @@ var hasRequiredReactIs_development$1;
2512
2512
  function requireReactIs_development$1() {
2513
2513
  if (hasRequiredReactIs_development$1) return reactIs_development$1;
2514
2514
  hasRequiredReactIs_development$1 = 1;
2515
- "production" !== process.env.NODE_ENV && function() {
2515
+ "production" !== process.env.NODE_ENV && (function() {
2516
2516
  function typeOf2(object2) {
2517
2517
  if ("object" === typeof object2 && null !== object2) {
2518
2518
  var $$typeof = object2.$$typeof;
@@ -2598,7 +2598,7 @@ function requireReactIs_development$1() {
2598
2598
  return "string" === typeof type3 || "function" === typeof type3 || type3 === REACT_FRAGMENT_TYPE || type3 === REACT_PROFILER_TYPE || type3 === REACT_STRICT_MODE_TYPE || type3 === REACT_SUSPENSE_TYPE || type3 === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type3 && null !== type3 && (type3.$$typeof === REACT_LAZY_TYPE || type3.$$typeof === REACT_MEMO_TYPE || type3.$$typeof === REACT_CONTEXT_TYPE || type3.$$typeof === REACT_CONSUMER_TYPE || type3.$$typeof === REACT_FORWARD_REF_TYPE || type3.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type3.getModuleId) ? true : false;
2599
2599
  };
2600
2600
  reactIs_development$1.typeOf = typeOf2;
2601
- }();
2601
+ })();
2602
2602
  return reactIs_development$1;
2603
2603
  }
2604
2604
  var hasRequiredReactIs$1;
@@ -16743,7 +16743,7 @@ function requireTypeDetect() {
16743
16743
  (function(module, exports) {
16744
16744
  (function(global3, factory) {
16745
16745
  module.exports = factory();
16746
- })(typeDetect, function() {
16746
+ })(typeDetect, (function() {
16747
16747
  var promiseExists = typeof Promise === "function";
16748
16748
  var globalObject = typeof self === "object" ? self : commonjsGlobal;
16749
16749
  var symbolExists = typeof Symbol !== "undefined";
@@ -16852,7 +16852,7 @@ function requireTypeDetect() {
16852
16852
  return Object.prototype.toString.call(obj).slice(toStringLeftSliceLength, toStringRightSliceLength);
16853
16853
  }
16854
16854
  return typeDetect2;
16855
- });
16855
+ }));
16856
16856
  })(typeDetect$1);
16857
16857
  return typeDetect$1.exports;
16858
16858
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/hammer-test-jest",
3
- "version": "0.11.0",
3
+ "version": "1.0.0",
4
4
  "description": "Hammer test runner, jest",
5
5
  "author": "Procore Technologies, Inc",
6
6
  "homepage": "https://github.com/procore/hammer/packages/test-jest",
@@ -43,11 +43,11 @@
43
43
  "test:watch": "vitest"
44
44
  },
45
45
  "dependencies": {
46
- "@babel/core": "^7.28.0",
47
- "@babel/preset-env": "^7.28.0",
46
+ "@babel/core": "^7.28.4",
47
+ "@babel/preset-env": "^7.28.3",
48
48
  "@babel/preset-react": "^7.27.1",
49
49
  "@babel/preset-typescript": "^7.27.1",
50
- "@procore/hammer-types": "^0.7.0",
50
+ "@procore/hammer-types": "^1.0.0",
51
51
  "babel-jest": "^29.7.0",
52
52
  "identity-obj-proxy": "^3.0.0",
53
53
  "jest": "^29.7.0",
@@ -55,13 +55,13 @@
55
55
  "jest-watch-typeahead": "^2.2.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@procore/eslint-config": "^15.2.1",
58
+ "@procore/eslint-config": "^15.3.2",
59
59
  "@procore/prettier-config": "^1.1.1",
60
- "@procore/typescript-config": "^2.0.0",
61
- "@types/node": "^20.19.6",
60
+ "@procore/typescript-config": "^2.1.0",
61
+ "@types/node": "^20.19.13",
62
62
  "@vitest/coverage-v8": "^3.2.4",
63
63
  "del-cli": "^6.0.0",
64
- "eslint": "^9.31.0",
64
+ "eslint": "^9.35.0",
65
65
  "pathe": "^2.0.3",
66
66
  "prettier": "^3.6.2",
67
67
  "tsup": "^8.5.0",