|
1 | 1 | {
|
2 | 2 | "name": "@accessible/checkbox",
|
3 |
| - "version": "2.0.1", |
| 3 | + "version": "3.0.0", |
4 | 4 | "homepage": "https://github.com/accessible-ui/checkbox#readme",
|
5 | 5 | "repository": "github:accessible-ui/checkbox",
|
6 | 6 | "bugs": "https://github.com/accessible-ui/checkbox/issues",
|
|
19 | 19 | "react checkbox component",
|
20 | 20 | "react checkbox"
|
21 | 21 | ],
|
22 |
| - "main": "dist/cjs/index.js", |
23 |
| - "module": "dist/es/index.js", |
| 22 | + "main": "dist/main/index.js", |
| 23 | + "module": "dist/module/index.js", |
| 24 | + "source": "src/index.tsx", |
| 25 | + "types": "types/index.d.ts", |
24 | 26 | "files": [
|
25 |
| - "/dist" |
| 27 | + "/dist", |
| 28 | + "/src", |
| 29 | + "/types" |
26 | 30 | ],
|
| 31 | + "exports": { |
| 32 | + ".": { |
| 33 | + "browser": "./dist/module/index.js", |
| 34 | + "import": "./dist/esm/index.mjs", |
| 35 | + "require": "./dist/main/index.js", |
| 36 | + "source": "./src/index.tsx", |
| 37 | + "types": "./types/index.d.ts", |
| 38 | + "default": "./dist/main/index.js" |
| 39 | + }, |
| 40 | + "./package.json": "./package.json", |
| 41 | + "./": "./" |
| 42 | + }, |
27 | 43 | "sideEffects": false,
|
28 | 44 | "scripts": {
|
29 |
| - "build": "npm run build:cjs && npm run build:es && npm run build:types", |
30 |
| - "build:cjs": "babel src -d dist/cjs -x .ts,.tsx --ignore \"**/*.test.ts\",\"**/test.ts\",\"**/*.test.tsx\",\"**/test.tsx\" --delete-dir-on-start", |
31 |
| - "build:es": "cross-env BABEL_ENV=es babel src -d dist/es -x .ts,.tsx --ignore \"**/*.test.ts\",\"**/test.ts\",\"**/*.test.tsx\",\"**/test.tsx\" --delete-dir-on-start", |
32 |
| - "build:types": "tsc -p tsconfig.json -d --outDir dist/es --emitDeclarationOnly && mkdir -p dist/cjs && cp -R dist/es/**.d.ts dist/cjs && rimraf dist/**/*.test.d.ts", |
| 45 | + "build": "npm run build-esm && npm run build-main && npm run build-module && npm run build-types", |
| 46 | + "build-esm": "npm run compile -- -d dist/esm --env-name esm --out-file-extension .mjs", |
| 47 | + "build-main": "npm run compile -- -d dist/main --env-name main", |
| 48 | + "build-module": "npm run compile -- -d dist/module --env-name module", |
| 49 | + "build-types": "tsc -p tsconfig.json -d --outDir types --emitDeclarationOnly", |
33 | 50 | "check-types": "tsc --noEmit -p tsconfig.json",
|
34 |
| - "format": "prettier --write \"**/*.{ts,tsx,js,jsx,md,yml,json,babelrc,eslintrc,prettierrc}\"", |
| 51 | + "compile": "babel src -x .ts,.tsx --ignore \"**/*.test.ts\",\"**/*.test.tsx\" --delete-dir-on-start", |
| 52 | + "format": "prettier --write \"**/*.{ts,tsx,js,jsx,md,yml,json,eslintrc,prettierrc}\"", |
35 | 53 | "lint": "eslint . --ext .ts,.tsx",
|
36 | 54 | "prepublishOnly": "npm run lint && npm run test && npm run build && npm run format",
|
37 | 55 | "test": "jest",
|
38 | 56 | "validate": "npm run check-types && npm run lint && npm run test -- --coverage"
|
39 | 57 | },
|
40 | 58 | "husky": {
|
41 | 59 | "hooks": {
|
42 |
| - "pre-commit": "lint-staged && npm run build:types" |
| 60 | + "pre-commit": "npm run build-types && git add types && lint-staged" |
43 | 61 | }
|
44 | 62 | },
|
45 | 63 | "lint-staged": {
|
46 | 64 | "**/*.{ts,tsx,js,jsx}": [
|
47 | 65 | "eslint",
|
48 | 66 | "prettier --write"
|
49 | 67 | ],
|
50 |
| - "**/*.{md,yml,json,babelrc,eslintrc,prettierrc}": [ |
| 68 | + "**/*.{md,yml,json,eslintrc,prettierrc}": [ |
51 | 69 | "prettier --write"
|
52 | 70 | ]
|
53 | 71 | },
|
|
57 | 75 | "@testing-library/jest-dom": "latest",
|
58 | 76 | "@testing-library/react": "latest",
|
59 | 77 | "@testing-library/react-hooks": "latest",
|
| 78 | + "@testing-library/user-event": "latest", |
60 | 79 | "@types/jest": "latest",
|
61 | 80 | "@types/react": "latest",
|
62 | 81 | "@types/react-dom": "latest",
|
63 | 82 | "@typescript-eslint/eslint-plugin": "latest",
|
64 | 83 | "@typescript-eslint/parser": "latest",
|
65 |
| - "babel-plugin-optimize-react": "^0.0.4", |
66 |
| - "babel-plugin-typescript-to-proptypes": "^1.1.0", |
67 |
| - "cross-env": "latest", |
| 84 | + "babel-plugin-annotate-pure-calls": "latest", |
| 85 | + "babel-plugin-optimize-react": "latest", |
68 | 86 | "eslint": "latest",
|
69 | 87 | "eslint-import-resolver-jest": "latest",
|
70 | 88 | "eslint-plugin-jest": "latest",
|
|
77 | 95 | "react": "latest",
|
78 | 96 | "react-dom": "latest",
|
79 | 97 | "react-test-renderer": "latest",
|
80 |
| - "rimraf": "^2.6.3", |
81 | 98 | "ts-jest": "latest",
|
82 |
| - "typescript": "latest", |
83 |
| - "typescript-to-proptypes": "^1.4.0" |
| 99 | + "typescript": "latest" |
84 | 100 | },
|
85 | 101 | "dependencies": {
|
86 |
| - "@accessible/visually-hidden": "^1.0.1", |
87 |
| - "@react-hook/switch": "^1.0.4", |
88 |
| - "clsx": "^1.0.4" |
| 102 | + "@accessible/visually-hidden": "^1.1.0", |
| 103 | + "@react-hook/switch": "^1.1.0", |
| 104 | + "clsx": "^1.1.1" |
89 | 105 | },
|
90 | 106 | "peerDependencies": {
|
91 |
| - "prop-types": ">=15.7.2", |
92 | 107 | "react": ">=16.8",
|
93 | 108 | "react-dom": ">=16.8"
|
94 | 109 | }
|
|
0 commit comments