isomorfeus-preact 10.6.2 → 10.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/lib/preact/version.rb +1 -1
  3. data/node_modules/.package-lock.json +3 -3
  4. data/node_modules/preact/LICENSE +21 -21
  5. data/node_modules/preact/README.md +187 -187
  6. data/node_modules/preact/compat/dist/compat.js +1 -1
  7. data/node_modules/preact/compat/dist/compat.js.map +1 -1
  8. data/node_modules/preact/compat/dist/compat.mjs +1 -1
  9. data/node_modules/preact/compat/dist/compat.module.js +1 -1
  10. data/node_modules/preact/compat/dist/compat.module.js.map +1 -1
  11. data/node_modules/preact/compat/dist/compat.umd.js +1 -1
  12. data/node_modules/preact/compat/dist/compat.umd.js.map +1 -1
  13. data/node_modules/preact/compat/jsx-dev-runtime.js +1 -1
  14. data/node_modules/preact/compat/jsx-dev-runtime.mjs +1 -1
  15. data/node_modules/preact/compat/jsx-runtime.js +1 -1
  16. data/node_modules/preact/compat/jsx-runtime.mjs +1 -1
  17. data/node_modules/preact/compat/package.json +19 -19
  18. data/node_modules/preact/compat/scheduler.js +15 -15
  19. data/node_modules/preact/compat/scheduler.mjs +23 -23
  20. data/node_modules/preact/compat/server.js +15 -15
  21. data/node_modules/preact/compat/server.mjs +4 -4
  22. data/node_modules/preact/compat/src/Children.js +21 -21
  23. data/node_modules/preact/compat/src/PureComponent.js +15 -15
  24. data/node_modules/preact/compat/src/forwardRef.js +51 -51
  25. data/node_modules/preact/compat/src/index.d.ts +141 -141
  26. data/node_modules/preact/compat/src/index.js +187 -187
  27. data/node_modules/preact/compat/src/internal.d.ts +47 -47
  28. data/node_modules/preact/compat/src/memo.js +34 -34
  29. data/node_modules/preact/compat/src/portals.js +80 -80
  30. data/node_modules/preact/compat/src/render.js +230 -226
  31. data/node_modules/preact/compat/src/suspense-list.d.ts +14 -14
  32. data/node_modules/preact/compat/src/suspense-list.js +126 -126
  33. data/node_modules/preact/compat/src/suspense.d.ts +15 -15
  34. data/node_modules/preact/compat/src/suspense.js +270 -270
  35. data/node_modules/preact/compat/src/util.js +28 -28
  36. data/node_modules/preact/compat/test-utils.js +1 -1
  37. data/node_modules/preact/debug/dist/debug.js.map +1 -1
  38. data/node_modules/preact/debug/dist/debug.module.js.map +1 -1
  39. data/node_modules/preact/debug/dist/debug.umd.js.map +1 -1
  40. data/node_modules/preact/debug/package.json +18 -18
  41. data/node_modules/preact/debug/src/check-props.js +54 -54
  42. data/node_modules/preact/debug/src/component-stack.js +146 -146
  43. data/node_modules/preact/debug/src/constants.js +3 -3
  44. data/node_modules/preact/debug/src/debug.js +442 -442
  45. data/node_modules/preact/debug/src/index.js +6 -6
  46. data/node_modules/preact/debug/src/internal.d.ts +82 -82
  47. data/node_modules/preact/debug/src/util.js +11 -11
  48. data/node_modules/preact/devtools/dist/devtools.js +1 -1
  49. data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
  50. data/node_modules/preact/devtools/dist/devtools.mjs +1 -1
  51. data/node_modules/preact/devtools/dist/devtools.module.js +1 -1
  52. data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
  53. data/node_modules/preact/devtools/dist/devtools.umd.js +1 -1
  54. data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
  55. data/node_modules/preact/devtools/package.json +16 -16
  56. data/node_modules/preact/devtools/src/devtools.js +10 -10
  57. data/node_modules/preact/devtools/src/index.d.ts +8 -8
  58. data/node_modules/preact/devtools/src/index.js +15 -15
  59. data/node_modules/preact/dist/preact.js.map +1 -1
  60. data/node_modules/preact/dist/preact.min.js.map +1 -1
  61. data/node_modules/preact/dist/preact.module.js.map +1 -1
  62. data/node_modules/preact/dist/preact.umd.js.map +1 -1
  63. data/node_modules/preact/hooks/dist/hooks.js +1 -1
  64. data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
  65. data/node_modules/preact/hooks/dist/hooks.mjs +1 -1
  66. data/node_modules/preact/hooks/dist/hooks.module.js +1 -1
  67. data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
  68. data/node_modules/preact/hooks/dist/hooks.umd.js +1 -1
  69. data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
  70. data/node_modules/preact/hooks/package.json +26 -26
  71. data/node_modules/preact/hooks/src/index.d.ts +139 -139
  72. data/node_modules/preact/hooks/src/index.js +388 -387
  73. data/node_modules/preact/hooks/src/internal.d.ts +75 -75
  74. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
  75. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
  76. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
  77. data/node_modules/preact/jsx-runtime/package.json +19 -19
  78. data/node_modules/preact/jsx-runtime/src/index.d.ts +50 -50
  79. data/node_modules/preact/jsx-runtime/src/index.js +77 -77
  80. data/node_modules/preact/package.json +287 -287
  81. data/node_modules/preact/src/cjs.js +3 -3
  82. data/node_modules/preact/src/clone-element.js +34 -34
  83. data/node_modules/preact/src/component.js +225 -225
  84. data/node_modules/preact/src/constants.js +3 -3
  85. data/node_modules/preact/src/create-context.js +68 -68
  86. data/node_modules/preact/src/create-element.js +98 -98
  87. data/node_modules/preact/src/diff/catch-error.js +38 -38
  88. data/node_modules/preact/src/diff/children.js +335 -335
  89. data/node_modules/preact/src/diff/index.js +516 -516
  90. data/node_modules/preact/src/diff/props.js +158 -158
  91. data/node_modules/preact/src/index.d.ts +310 -310
  92. data/node_modules/preact/src/index.js +13 -13
  93. data/node_modules/preact/src/internal.d.ts +146 -146
  94. data/node_modules/preact/src/jsx.d.ts +1005 -1005
  95. data/node_modules/preact/src/options.js +16 -16
  96. data/node_modules/preact/src/render.js +75 -75
  97. data/node_modules/preact/src/util.js +27 -27
  98. data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -1
  99. data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -1
  100. data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -1
  101. data/node_modules/preact/test-utils/package.json +19 -19
  102. data/node_modules/preact/test-utils/src/index.d.ts +3 -3
  103. data/node_modules/preact/test-utils/src/index.js +117 -117
  104. data/package.json +1 -1
  105. metadata +17 -37
  106. data/node_modules/preact/compat/dist/compat.mjs.map +0 -1
  107. data/node_modules/preact/compat/dist/compat.modern.js +0 -2
  108. data/node_modules/preact/compat/dist/compat.modern.js.map +0 -1
  109. data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
  110. data/node_modules/preact/debug/dist/debug.modern.js +0 -2
  111. data/node_modules/preact/debug/dist/debug.modern.js.map +0 -1
  112. data/node_modules/preact/devtools/dist/devtools.mjs.map +0 -1
  113. data/node_modules/preact/devtools/dist/devtools.modern.js +0 -2
  114. data/node_modules/preact/devtools/dist/devtools.modern.js.map +0 -1
  115. data/node_modules/preact/dist/index.d.ts +0 -1295
  116. data/node_modules/preact/dist/preact.mjs.map +0 -1
  117. data/node_modules/preact/hooks/dist/hooks.mjs.map +0 -1
  118. data/node_modules/preact/hooks/dist/hooks.modern.js +0 -2
  119. data/node_modules/preact/hooks/dist/hooks.modern.js.map +0 -1
  120. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs.map +0 -1
  121. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js +0 -2
  122. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js.map +0 -1
  123. data/node_modules/preact/test-utils/dist/testUtils.mjs.map +0 -1
  124. data/node_modules/preact/test-utils/dist/testUtils.modern.js +0 -2
  125. data/node_modules/preact/test-utils/dist/testUtils.modern.js.map +0 -1
@@ -1,287 +1,287 @@
1
- {
2
- "name": "preact",
3
- "amdName": "preact",
4
- "version": "10.6.2",
5
- "private": false,
6
- "description": "Fast 3kb React-compatible Virtual DOM library.",
7
- "main": "dist/preact.js",
8
- "module": "dist/preact.module.js",
9
- "umd:main": "dist/preact.umd.js",
10
- "unpkg": "dist/preact.min.js",
11
- "source": "src/index.js",
12
- "exports": {
13
- ".": {
14
- "browser": "./dist/preact.module.js",
15
- "umd": "./dist/preact.umd.js",
16
- "import": "./dist/preact.mjs",
17
- "require": "./dist/preact.js"
18
- },
19
- "./compat": {
20
- "browser": "./compat/dist/compat.module.js",
21
- "umd": "./compat/dist/compat.umd.js",
22
- "require": "./compat/dist/compat.js",
23
- "import": "./compat/dist/compat.mjs"
24
- },
25
- "./debug": {
26
- "browser": "./debug/dist/debug.module.js",
27
- "umd": "./debug/dist/debug.umd.js",
28
- "require": "./debug/dist/debug.js",
29
- "import": "./debug/dist/debug.mjs"
30
- },
31
- "./devtools": {
32
- "browser": "./devtools/dist/devtools.module.js",
33
- "umd": "./devtools/dist/devtools.umd.js",
34
- "require": "./devtools/dist/devtools.js",
35
- "import": "./devtools/dist/devtools.mjs"
36
- },
37
- "./hooks": {
38
- "browser": "./hooks/dist/hooks.module.js",
39
- "umd": "./hooks/dist/hooks.umd.js",
40
- "require": "./hooks/dist/hooks.js",
41
- "import": "./hooks/dist/hooks.mjs"
42
- },
43
- "./test-utils": {
44
- "browser": "./test-utils/dist/testUtils.module.js",
45
- "umd": "./test-utils/dist/testUtils.umd.js",
46
- "require": "./test-utils/dist/testUtils.js",
47
- "import": "./test-utils/dist/testUtils.mjs"
48
- },
49
- "./jsx-runtime": {
50
- "browser": "./jsx-runtime/dist/jsxRuntime.module.js",
51
- "umd": "./jsx-runtime/dist/jsxRuntime.umd.js",
52
- "require": "./jsx-runtime/dist/jsxRuntime.js",
53
- "import": "./jsx-runtime/dist/jsxRuntime.mjs"
54
- },
55
- "./jsx-dev-runtime": {
56
- "browser": "./jsx-runtime/dist/jsxRuntime.module.js",
57
- "umd": "./jsx-runtime/dist/jsxRuntime.umd.js",
58
- "require": "./jsx-runtime/dist/jsxRuntime.js",
59
- "import": "./jsx-runtime/dist/jsxRuntime.mjs"
60
- },
61
- "./compat/server": {
62
- "require": "./compat/server.js",
63
- "import": "./compat/server.mjs"
64
- },
65
- "./compat/jsx-runtime": {
66
- "require": "./compat/jsx-runtime.js",
67
- "import": "./compat/jsx-runtime.mjs"
68
- },
69
- "./compat/jsx-dev-runtime": {
70
- "require": "./compat/jsx-dev-runtime.js",
71
- "import": "./compat/jsx-dev-runtime.mjs"
72
- },
73
- "./compat/scheduler": {
74
- "require": "./compat/scheduler.js",
75
- "import": "./compat/scheduler.mjs"
76
- },
77
- "./package.json": "./package.json",
78
- "./compat/package.json": "./compat/package.json",
79
- "./debug/package.json": "./debug/package.json",
80
- "./devtools/package.json": "./devtools/package.json",
81
- "./hooks/package.json": "./hooks/package.json",
82
- "./test-utils/package.json": "./test-utils/package.json",
83
- "./jsx-runtime/package.json": "./jsx-runtime/package.json"
84
- },
85
- "license": "MIT",
86
- "funding": {
87
- "type": "opencollective",
88
- "url": "https://opencollective.com/preact"
89
- },
90
- "types": "src/index.d.ts",
91
- "scripts": {
92
- "prepare": "run-s build && check-export-map",
93
- "build": "npm-run-all --parallel build:*",
94
- "build:core": "microbundle build --raw",
95
- "build:core-min": "microbundle build --raw -f iife src/cjs.js -o dist/preact.min.js",
96
- "build:debug": "microbundle build --raw --cwd debug",
97
- "build:devtools": "microbundle build --raw --cwd devtools",
98
- "build:hooks": "microbundle build --raw --cwd hooks",
99
- "build:test-utils": "microbundle build --raw --cwd test-utils",
100
- "build:compat": "microbundle build src/index.js src/scheduler.js --raw --cwd compat --globals 'preact/hooks=preactHooks'",
101
- "build:jsx": "microbundle build --raw --cwd jsx-runtime",
102
- "postbuild": "node ./config/node-13-exports.js && node ./config/compat-entries.js",
103
- "dev": "microbundle watch --raw --format cjs",
104
- "dev:hooks": "microbundle watch --raw --format cjs --cwd hooks",
105
- "dev:compat": "microbundle watch --raw --format cjs --cwd compat --globals 'preact/hooks=preactHooks'",
106
- "test": "npm-run-all build lint test:unit",
107
- "test:unit": "run-p test:mocha test:karma:minify test:ts",
108
- "test:ts": "run-p test:ts:*",
109
- "test:ts:core": "tsc -p test/ts/ && mocha --require \"@babel/register\" test/ts/**/*-test.js",
110
- "test:ts:compat": "tsc -p compat/test/ts/",
111
- "test:mocha": "mocha --recursive --require \"@babel/register\" test/shared test/node",
112
- "test:mocha:watch": "npm run test:mocha -- --watch",
113
- "test:karma": "cross-env COVERAGE=true BABEL_NO_MODULES=true karma start karma.conf.js --single-run",
114
- "test:karma:minify": "cross-env COVERAGE=true MINIFY=true BABEL_NO_MODULES=true karma start karma.conf.js --single-run",
115
- "test:karma:watch": "cross-env BABEL_NO_MODULES=true karma start karma.conf.js --no-single-run",
116
- "test:karma:hooks": "cross-env COVERAGE=false BABEL_NO_MODULES=true karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run",
117
- "test:karma:test-utils": "cross-env PERFORMANCE=false COVERAGE=false BABEL_NO_MODULES=true karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run",
118
- "test:karma:bench": "cross-env PERFORMANCE=true COVERAGE=false BABEL_NO_MODULES=true karma start karma.conf.js --grep=test/benchmarks/**.js --single-run",
119
- "benchmark": "npm run test:karma:bench -- no-single-run",
120
- "lint": "eslint src test debug compat hooks test-utils"
121
- },
122
- "eslintConfig": {
123
- "extends": [
124
- "developit",
125
- "prettier"
126
- ],
127
- "settings": {
128
- "react": {
129
- "pragma": "createElement"
130
- }
131
- },
132
- "rules": {
133
- "camelcase": [
134
- 1,
135
- {
136
- "allow": [
137
- "__test__*",
138
- "unstable_*",
139
- "UNSAFE_*"
140
- ]
141
- }
142
- ],
143
- "no-unused-vars": [
144
- 2,
145
- {
146
- "args": "none",
147
- "varsIgnorePattern": "^h|React$"
148
- }
149
- ],
150
- "prefer-rest-params": 0,
151
- "prefer-spread": 0,
152
- "no-cond-assign": 0,
153
- "react/jsx-no-bind": 0,
154
- "react/no-danger": "off",
155
- "react/prefer-stateless-function": 0,
156
- "react/sort-comp": 0,
157
- "jest/valid-expect": 0,
158
- "jest/no-disabled-tests": 0,
159
- "jest/no-test-callback": 0,
160
- "jest/expect-expect": 0,
161
- "jest/no-standalone-expect": 0,
162
- "jest/no-export": 0,
163
- "react/no-find-dom-node": 0
164
- }
165
- },
166
- "eslintIgnore": [
167
- "test/fixtures",
168
- "test/ts/",
169
- "*.ts",
170
- "dist"
171
- ],
172
- "prettier": {
173
- "singleQuote": true,
174
- "trailingComma": "none",
175
- "useTabs": true,
176
- "tabWidth": 2
177
- },
178
- "lint-staged": {
179
- "**/*.{js,jsx,ts,tsx,yml}": [
180
- "prettier --write"
181
- ]
182
- },
183
- "husky": {
184
- "hooks": {
185
- "pre-commit": "lint-staged"
186
- }
187
- },
188
- "files": [
189
- "src",
190
- "dist",
191
- "compat/dist",
192
- "compat/src",
193
- "compat/server.js",
194
- "compat/server.mjs",
195
- "compat/scheduler.js",
196
- "compat/scheduler.mjs",
197
- "compat/test-utils.js",
198
- "compat/jsx-runtime.js",
199
- "compat/jsx-runtime.mjs",
200
- "compat/jsx-dev-runtime.js",
201
- "compat/jsx-dev-runtime.mjs",
202
- "compat/package.json",
203
- "debug/dist",
204
- "debug/src",
205
- "debug/package.json",
206
- "devtools/dist",
207
- "devtools/src",
208
- "devtools/package.json",
209
- "hooks/dist",
210
- "hooks/src",
211
- "hooks/package.json",
212
- "jsx-runtime/dist",
213
- "jsx-runtime/src",
214
- "jsx-runtime/package.json",
215
- "test-utils/src",
216
- "test-utils/package.json",
217
- "test-utils/dist"
218
- ],
219
- "keywords": [
220
- "preact",
221
- "react",
222
- "ui",
223
- "user interface",
224
- "virtual dom",
225
- "vdom",
226
- "components",
227
- "dom diff",
228
- "front-end",
229
- "framework"
230
- ],
231
- "authors": [
232
- "The Preact Authors (https://github.com/preactjs/preact/contributors)"
233
- ],
234
- "repository": "preactjs/preact",
235
- "bugs": "https://github.com/preactjs/preact/issues",
236
- "homepage": "https://preactjs.com",
237
- "devDependencies": {
238
- "@babel/core": "^7.7.0",
239
- "@babel/plugin-proposal-object-rest-spread": "^7.6.2",
240
- "@babel/plugin-transform-react-jsx": "^7.7.0",
241
- "@babel/plugin-transform-react-jsx-source": "^7.7.4",
242
- "@babel/preset-env": "^7.7.1",
243
- "@babel/register": "^7.7.0",
244
- "@types/chai": "^4.1.2",
245
- "@types/mocha": "^5.0.0",
246
- "@types/node": "^14.14.10",
247
- "babel-plugin-istanbul": "^6.0.0",
248
- "babel-plugin-transform-async-to-promises": "^0.8.15",
249
- "babel-plugin-transform-rename-properties": "0.1.0",
250
- "benchmark": "^2.1.4",
251
- "chai": "^4.1.2",
252
- "check-export-map": "^1.2.0",
253
- "coveralls": "^3.0.0",
254
- "cross-env": "^7.0.2",
255
- "csstype": "^3.0.5",
256
- "diff": "^5.0.0",
257
- "errorstacks": "^2.3.0",
258
- "esbuild": "^0.12.24",
259
- "eslint": "5.15.1",
260
- "eslint-config-developit": "^1.1.1",
261
- "eslint-config-prettier": "^6.5.0",
262
- "eslint-plugin-react": "7.12.4",
263
- "husky": "^4.3.0",
264
- "karma": "^6.3.4",
265
- "karma-chai-sinon": "^0.1.5",
266
- "karma-chrome-launcher": "^3.1.0",
267
- "karma-coverage": "^2.0.3",
268
- "karma-esbuild": "^2.2.0",
269
- "karma-mocha": "^2.0.1",
270
- "karma-mocha-reporter": "^2.2.5",
271
- "karma-sauce-launcher": "^4.3.4",
272
- "karma-sinon": "^1.0.5",
273
- "karma-sourcemap-loader": "^0.3.7",
274
- "kolorist": "^1.2.10",
275
- "lint-staged": "^10.5.2",
276
- "lodash": "^4.17.20",
277
- "microbundle": "^0.11.0",
278
- "mocha": "^8.2.1",
279
- "npm-merge-driver-install": "^1.1.1",
280
- "npm-run-all": "^4.0.0",
281
- "prettier": "^1.18.2",
282
- "prop-types": "^15.7.2",
283
- "sinon": "^9.2.3",
284
- "sinon-chai": "^3.5.0",
285
- "typescript": "4.4.2"
286
- }
287
- }
1
+ {
2
+ "name": "preact",
3
+ "amdName": "preact",
4
+ "version": "10.6.4",
5
+ "private": false,
6
+ "description": "Fast 3kb React-compatible Virtual DOM library.",
7
+ "main": "dist/preact.js",
8
+ "module": "dist/preact.module.js",
9
+ "umd:main": "dist/preact.umd.js",
10
+ "unpkg": "dist/preact.min.js",
11
+ "source": "src/index.js",
12
+ "exports": {
13
+ ".": {
14
+ "browser": "./dist/preact.module.js",
15
+ "umd": "./dist/preact.umd.js",
16
+ "import": "./dist/preact.mjs",
17
+ "require": "./dist/preact.js"
18
+ },
19
+ "./compat": {
20
+ "browser": "./compat/dist/compat.module.js",
21
+ "umd": "./compat/dist/compat.umd.js",
22
+ "require": "./compat/dist/compat.js",
23
+ "import": "./compat/dist/compat.mjs"
24
+ },
25
+ "./debug": {
26
+ "browser": "./debug/dist/debug.module.js",
27
+ "umd": "./debug/dist/debug.umd.js",
28
+ "require": "./debug/dist/debug.js",
29
+ "import": "./debug/dist/debug.mjs"
30
+ },
31
+ "./devtools": {
32
+ "browser": "./devtools/dist/devtools.module.js",
33
+ "umd": "./devtools/dist/devtools.umd.js",
34
+ "require": "./devtools/dist/devtools.js",
35
+ "import": "./devtools/dist/devtools.mjs"
36
+ },
37
+ "./hooks": {
38
+ "browser": "./hooks/dist/hooks.module.js",
39
+ "umd": "./hooks/dist/hooks.umd.js",
40
+ "require": "./hooks/dist/hooks.js",
41
+ "import": "./hooks/dist/hooks.mjs"
42
+ },
43
+ "./test-utils": {
44
+ "browser": "./test-utils/dist/testUtils.module.js",
45
+ "umd": "./test-utils/dist/testUtils.umd.js",
46
+ "require": "./test-utils/dist/testUtils.js",
47
+ "import": "./test-utils/dist/testUtils.mjs"
48
+ },
49
+ "./jsx-runtime": {
50
+ "browser": "./jsx-runtime/dist/jsxRuntime.module.js",
51
+ "umd": "./jsx-runtime/dist/jsxRuntime.umd.js",
52
+ "require": "./jsx-runtime/dist/jsxRuntime.js",
53
+ "import": "./jsx-runtime/dist/jsxRuntime.mjs"
54
+ },
55
+ "./jsx-dev-runtime": {
56
+ "browser": "./jsx-runtime/dist/jsxRuntime.module.js",
57
+ "umd": "./jsx-runtime/dist/jsxRuntime.umd.js",
58
+ "require": "./jsx-runtime/dist/jsxRuntime.js",
59
+ "import": "./jsx-runtime/dist/jsxRuntime.mjs"
60
+ },
61
+ "./compat/server": {
62
+ "require": "./compat/server.js",
63
+ "import": "./compat/server.mjs"
64
+ },
65
+ "./compat/jsx-runtime": {
66
+ "require": "./compat/jsx-runtime.js",
67
+ "import": "./compat/jsx-runtime.mjs"
68
+ },
69
+ "./compat/jsx-dev-runtime": {
70
+ "require": "./compat/jsx-dev-runtime.js",
71
+ "import": "./compat/jsx-dev-runtime.mjs"
72
+ },
73
+ "./compat/scheduler": {
74
+ "require": "./compat/scheduler.js",
75
+ "import": "./compat/scheduler.mjs"
76
+ },
77
+ "./package.json": "./package.json",
78
+ "./compat/package.json": "./compat/package.json",
79
+ "./debug/package.json": "./debug/package.json",
80
+ "./devtools/package.json": "./devtools/package.json",
81
+ "./hooks/package.json": "./hooks/package.json",
82
+ "./test-utils/package.json": "./test-utils/package.json",
83
+ "./jsx-runtime/package.json": "./jsx-runtime/package.json"
84
+ },
85
+ "license": "MIT",
86
+ "funding": {
87
+ "type": "opencollective",
88
+ "url": "https://opencollective.com/preact"
89
+ },
90
+ "types": "src/index.d.ts",
91
+ "scripts": {
92
+ "prepare": "run-s build && check-export-map",
93
+ "build": "npm-run-all --parallel build:*",
94
+ "build:core": "microbundle build --raw",
95
+ "build:core-min": "microbundle build --raw -f iife src/cjs.js -o dist/preact.min.js",
96
+ "build:debug": "microbundle build --raw --cwd debug",
97
+ "build:devtools": "microbundle build --raw --cwd devtools",
98
+ "build:hooks": "microbundle build --raw --cwd hooks",
99
+ "build:test-utils": "microbundle build --raw --cwd test-utils",
100
+ "build:compat": "microbundle build src/index.js src/scheduler.js --raw --cwd compat --globals 'preact/hooks=preactHooks'",
101
+ "build:jsx": "microbundle build --raw --cwd jsx-runtime",
102
+ "postbuild": "node ./config/node-13-exports.js && node ./config/compat-entries.js",
103
+ "dev": "microbundle watch --raw --format cjs",
104
+ "dev:hooks": "microbundle watch --raw --format cjs --cwd hooks",
105
+ "dev:compat": "microbundle watch --raw --format cjs --cwd compat --globals 'preact/hooks=preactHooks'",
106
+ "test": "npm-run-all build lint test:unit",
107
+ "test:unit": "run-p test:mocha test:karma:minify test:ts",
108
+ "test:ts": "run-p test:ts:*",
109
+ "test:ts:core": "tsc -p test/ts/ && mocha --require \"@babel/register\" test/ts/**/*-test.js",
110
+ "test:ts:compat": "tsc -p compat/test/ts/",
111
+ "test:mocha": "mocha --recursive --require \"@babel/register\" test/shared test/node",
112
+ "test:mocha:watch": "npm run test:mocha -- --watch",
113
+ "test:karma": "cross-env COVERAGE=true BABEL_NO_MODULES=true karma start karma.conf.js --single-run",
114
+ "test:karma:minify": "cross-env COVERAGE=true MINIFY=true BABEL_NO_MODULES=true karma start karma.conf.js --single-run",
115
+ "test:karma:watch": "cross-env BABEL_NO_MODULES=true karma start karma.conf.js --no-single-run",
116
+ "test:karma:hooks": "cross-env COVERAGE=false BABEL_NO_MODULES=true karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run",
117
+ "test:karma:test-utils": "cross-env PERFORMANCE=false COVERAGE=false BABEL_NO_MODULES=true karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run",
118
+ "test:karma:bench": "cross-env PERFORMANCE=true COVERAGE=false BABEL_NO_MODULES=true karma start karma.conf.js --grep=test/benchmarks/**.js --single-run",
119
+ "benchmark": "npm run test:karma:bench -- no-single-run",
120
+ "lint": "eslint src test debug compat hooks test-utils"
121
+ },
122
+ "eslintConfig": {
123
+ "extends": [
124
+ "developit",
125
+ "prettier"
126
+ ],
127
+ "settings": {
128
+ "react": {
129
+ "pragma": "createElement"
130
+ }
131
+ },
132
+ "rules": {
133
+ "camelcase": [
134
+ 1,
135
+ {
136
+ "allow": [
137
+ "__test__*",
138
+ "unstable_*",
139
+ "UNSAFE_*"
140
+ ]
141
+ }
142
+ ],
143
+ "no-unused-vars": [
144
+ 2,
145
+ {
146
+ "args": "none",
147
+ "varsIgnorePattern": "^h|React$"
148
+ }
149
+ ],
150
+ "prefer-rest-params": 0,
151
+ "prefer-spread": 0,
152
+ "no-cond-assign": 0,
153
+ "react/jsx-no-bind": 0,
154
+ "react/no-danger": "off",
155
+ "react/prefer-stateless-function": 0,
156
+ "react/sort-comp": 0,
157
+ "jest/valid-expect": 0,
158
+ "jest/no-disabled-tests": 0,
159
+ "jest/no-test-callback": 0,
160
+ "jest/expect-expect": 0,
161
+ "jest/no-standalone-expect": 0,
162
+ "jest/no-export": 0,
163
+ "react/no-find-dom-node": 0
164
+ }
165
+ },
166
+ "eslintIgnore": [
167
+ "test/fixtures",
168
+ "test/ts/",
169
+ "*.ts",
170
+ "dist"
171
+ ],
172
+ "prettier": {
173
+ "singleQuote": true,
174
+ "trailingComma": "none",
175
+ "useTabs": true,
176
+ "tabWidth": 2
177
+ },
178
+ "lint-staged": {
179
+ "**/*.{js,jsx,ts,tsx,yml}": [
180
+ "prettier --write"
181
+ ]
182
+ },
183
+ "husky": {
184
+ "hooks": {
185
+ "pre-commit": "lint-staged"
186
+ }
187
+ },
188
+ "files": [
189
+ "src",
190
+ "dist",
191
+ "compat/dist",
192
+ "compat/src",
193
+ "compat/server.js",
194
+ "compat/server.mjs",
195
+ "compat/scheduler.js",
196
+ "compat/scheduler.mjs",
197
+ "compat/test-utils.js",
198
+ "compat/jsx-runtime.js",
199
+ "compat/jsx-runtime.mjs",
200
+ "compat/jsx-dev-runtime.js",
201
+ "compat/jsx-dev-runtime.mjs",
202
+ "compat/package.json",
203
+ "debug/dist",
204
+ "debug/src",
205
+ "debug/package.json",
206
+ "devtools/dist",
207
+ "devtools/src",
208
+ "devtools/package.json",
209
+ "hooks/dist",
210
+ "hooks/src",
211
+ "hooks/package.json",
212
+ "jsx-runtime/dist",
213
+ "jsx-runtime/src",
214
+ "jsx-runtime/package.json",
215
+ "test-utils/src",
216
+ "test-utils/package.json",
217
+ "test-utils/dist"
218
+ ],
219
+ "keywords": [
220
+ "preact",
221
+ "react",
222
+ "ui",
223
+ "user interface",
224
+ "virtual dom",
225
+ "vdom",
226
+ "components",
227
+ "dom diff",
228
+ "front-end",
229
+ "framework"
230
+ ],
231
+ "authors": [
232
+ "The Preact Authors (https://github.com/preactjs/preact/contributors)"
233
+ ],
234
+ "repository": "preactjs/preact",
235
+ "bugs": "https://github.com/preactjs/preact/issues",
236
+ "homepage": "https://preactjs.com",
237
+ "devDependencies": {
238
+ "@babel/core": "^7.7.0",
239
+ "@babel/plugin-proposal-object-rest-spread": "^7.6.2",
240
+ "@babel/plugin-transform-react-jsx": "^7.7.0",
241
+ "@babel/plugin-transform-react-jsx-source": "^7.7.4",
242
+ "@babel/preset-env": "^7.7.1",
243
+ "@babel/register": "^7.7.0",
244
+ "@types/chai": "^4.1.2",
245
+ "@types/mocha": "^5.0.0",
246
+ "@types/node": "^14.14.10",
247
+ "babel-plugin-istanbul": "^6.0.0",
248
+ "babel-plugin-transform-async-to-promises": "^0.8.15",
249
+ "babel-plugin-transform-rename-properties": "0.1.0",
250
+ "benchmark": "^2.1.4",
251
+ "chai": "^4.1.2",
252
+ "check-export-map": "^1.2.0",
253
+ "coveralls": "^3.0.0",
254
+ "cross-env": "^7.0.2",
255
+ "csstype": "^3.0.5",
256
+ "diff": "^5.0.0",
257
+ "errorstacks": "^2.3.0",
258
+ "esbuild": "^0.12.24",
259
+ "eslint": "5.15.1",
260
+ "eslint-config-developit": "^1.1.1",
261
+ "eslint-config-prettier": "^6.5.0",
262
+ "eslint-plugin-react": "7.12.4",
263
+ "husky": "^4.3.0",
264
+ "karma": "^6.3.4",
265
+ "karma-chai-sinon": "^0.1.5",
266
+ "karma-chrome-launcher": "^3.1.0",
267
+ "karma-coverage": "^2.0.3",
268
+ "karma-esbuild": "^2.2.0",
269
+ "karma-mocha": "^2.0.1",
270
+ "karma-mocha-reporter": "^2.2.5",
271
+ "karma-sauce-launcher": "^4.3.4",
272
+ "karma-sinon": "^1.0.5",
273
+ "karma-sourcemap-loader": "^0.3.7",
274
+ "kolorist": "^1.2.10",
275
+ "lint-staged": "^10.5.2",
276
+ "lodash": "^4.17.20",
277
+ "microbundle": "^0.11.0",
278
+ "mocha": "^8.2.1",
279
+ "npm-merge-driver-install": "^1.1.1",
280
+ "npm-run-all": "^4.0.0",
281
+ "prettier": "^1.18.2",
282
+ "prop-types": "^15.7.2",
283
+ "sinon": "^9.2.3",
284
+ "sinon-chai": "^3.5.0",
285
+ "typescript": "4.4.2"
286
+ }
287
+ }
@@ -1,3 +1,3 @@
1
- import * as preact from './index.js';
2
- if (typeof module < 'u') module.exports = preact;
3
- else self.preact = preact;
1
+ import * as preact from './index.js';
2
+ if (typeof module < 'u') module.exports = preact;
3
+ else self.preact = preact;
@@ -1,34 +1,34 @@
1
- import { assign, slice } from './util';
2
- import { createVNode } from './create-element';
3
-
4
- /**
5
- * Clones the given VNode, optionally adding attributes/props and replacing its children.
6
- * @param {import('./internal').VNode} vnode The virtual DOM element to clone
7
- * @param {object} props Attributes/props to add when cloning
8
- * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used as replacement children.
9
- * @returns {import('./internal').VNode}
10
- */
11
- export function cloneElement(vnode, props, children) {
12
- let normalizedProps = assign({}, vnode.props),
13
- key,
14
- ref,
15
- i;
16
- for (i in props) {
17
- if (i == 'key') key = props[i];
18
- else if (i == 'ref') ref = props[i];
19
- else normalizedProps[i] = props[i];
20
- }
21
-
22
- if (arguments.length > 2) {
23
- normalizedProps.children =
24
- arguments.length > 3 ? slice.call(arguments, 2) : children;
25
- }
26
-
27
- return createVNode(
28
- vnode.type,
29
- normalizedProps,
30
- key || vnode.key,
31
- ref || vnode.ref,
32
- null
33
- );
34
- }
1
+ import { assign, slice } from './util';
2
+ import { createVNode } from './create-element';
3
+
4
+ /**
5
+ * Clones the given VNode, optionally adding attributes/props and replacing its children.
6
+ * @param {import('./internal').VNode} vnode The virtual DOM element to clone
7
+ * @param {object} props Attributes/props to add when cloning
8
+ * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used as replacement children.
9
+ * @returns {import('./internal').VNode}
10
+ */
11
+ export function cloneElement(vnode, props, children) {
12
+ let normalizedProps = assign({}, vnode.props),
13
+ key,
14
+ ref,
15
+ i;
16
+ for (i in props) {
17
+ if (i == 'key') key = props[i];
18
+ else if (i == 'ref') ref = props[i];
19
+ else normalizedProps[i] = props[i];
20
+ }
21
+
22
+ if (arguments.length > 2) {
23
+ normalizedProps.children =
24
+ arguments.length > 3 ? slice.call(arguments, 2) : children;
25
+ }
26
+
27
+ return createVNode(
28
+ vnode.type,
29
+ normalizedProps,
30
+ key || vnode.key,
31
+ ref || vnode.ref,
32
+ null
33
+ );
34
+ }