@css-hooks/react 1.5.2 → 1.5.4

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/cjs/index.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.recommended = exports.createHooks = exports.stringifyValue = void 0;
7
7
  const core_1 = require("@css-hooks/core");
8
8
  Object.defineProperty(exports, "recommended", { enumerable: true, get: function () { return core_1.recommended; } });
9
- const isUnitlessNumber_1 = __importDefault(require("./isUnitlessNumber"));
9
+ const isUnitlessNumber_js_1 = __importDefault(require("./isUnitlessNumber.js"));
10
10
  /**
11
11
  * @internal
12
12
  *
@@ -19,7 +19,7 @@ function stringifyValue(propertyName, value) {
19
19
  return value;
20
20
  }
21
21
  if (typeof value === "number") {
22
- return `${value}${(0, isUnitlessNumber_1.default)(propertyName) ? "" : "px"}`;
22
+ return `${value}${(0, isUnitlessNumber_js_1.default)(propertyName) ? "" : "px"}`;
23
23
  }
24
24
  return null;
25
25
  }
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { buildHooksSystem, recommended } from "@css-hooks/core";
2
- import isUnitlessNumber from "./isUnitlessNumber";
2
+ import isUnitlessNumber from "./isUnitlessNumber.js";
3
3
  /**
4
4
  * @internal
5
5
  *
package/package.json CHANGED
@@ -1,21 +1,19 @@
1
1
  {
2
2
  "name": "@css-hooks/react",
3
3
  "description": "CSS Hooks for React",
4
- "version": "1.5.2",
4
+ "version": "1.5.4",
5
5
  "author": "Nick Saunders",
6
6
  "dependencies": {
7
- "@css-hooks/core": "^1.5.2"
7
+ "@css-hooks/core": "^1.5.4"
8
8
  },
9
9
  "devDependencies": {
10
10
  "@tsconfig/strictest": "^2.0.1",
11
- "@types/jest": "^29.5.3",
12
11
  "@types/react": "^18.2.20",
13
12
  "@typescript-eslint/eslint-plugin": "^6.7.2",
14
13
  "@typescript-eslint/parser": "^6.7.2",
15
14
  "eslint": "^8.50.0",
16
- "jest": "^29.6.2",
17
15
  "rimraf": "^5.0.1",
18
- "ts-jest": "^29.1.1",
16
+ "ts-watch": "^1.0.8",
19
17
  "typescript": "^5.1.6"
20
18
  },
21
19
  "files": [
@@ -26,8 +24,14 @@
26
24
  "license": "MIT",
27
25
  "main": "cjs",
28
26
  "module": "esm",
27
+ "type": "module",
29
28
  "peerDependencies": {
30
- "react": ">=16.14.0 <19"
29
+ "@types/react": ">=16 <19"
30
+ },
31
+ "peerDependenciesMeta": {
32
+ "@types/react": {
33
+ "optional": true
34
+ }
31
35
  },
32
36
  "private": false,
33
37
  "repository": {
@@ -36,12 +40,12 @@
36
40
  "directory": "packages/react"
37
41
  },
38
42
  "scripts": {
39
- "clean": "rimraf cjs esm types",
40
- "compile": "tsc",
41
- "lint": "eslint __tests__ src .*.*js *.*js",
43
+ "clean": "rimraf cjs esm out types",
44
+ "lint": "eslint src .*.*js *.*js",
42
45
  "postversion": "npm install @css-hooks/core@^$npm_package_version --force",
43
46
  "prepublishOnly": "tsc -p tsconfig.dist.json --outDir cjs --module commonjs && tsc -p tsconfig.dist.json --outDir esm --module es6 && tsc -p tsconfig.dist.json --declaration --emitDeclarationOnly --outDir types",
44
- "test": "jest"
47
+ "test": "tsc && node --test",
48
+ "test.watch": "tsc-watch --onSuccess 'node --test'"
45
49
  },
46
50
  "types": "types",
47
51
  "exports": {