Skip to content

Commit a45ac8a

Browse files
committed
backport #3945
1 parent 0f8a8cd commit a45ac8a

110 files changed

Lines changed: 33060 additions & 33027 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/config.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@1.6.3/schema.json",
3-
"changelog": [
4-
"@changesets/changelog-github",
5-
{ "repo": "preactjs/preact" }
6-
],
3+
"changelog": ["@changesets/changelog-github", { "repo": "preactjs/preact" }],
74
"commit": false,
85
"linked": [],
96
"access": "public",
107
"baseBranch": "v11",
118
"updateInternalDependencies": "patch",
129
"ignore": []
13-
}
10+
}

.changeset/little-melons-crash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'preact': minor
33
---
44

5-
Move `createPortal` to the core package
5+
Move `createPortal` to the core package

.github/CODE_OF_CONDUCT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2424

2525
## Our Responsibilities
2626

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Create a report to help us improve
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
- [ ] Check if updating to the latest Preact version resolves the issue
@@ -17,6 +16,7 @@ A clear and concise description of what the bug is.
1716
If possible, please provide a CodeSandbox/Codepen that demonstrates the issue. You can use the following template: https://codesandbox.io/s/preact-x-preact-cli-3-starter-vj285y2rn3
1817

1918
Steps to reproduce the behavior:
19+
2020
1. Go to '...'
2121
2. Click on '....'
2222
3. See error

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
44
title: ''
55
labels: feature request
66
assignees: ''
7-
87
---
98

109
**Describe the feature you'd love to see**

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2424

2525
## Our Responsibilities
2626

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,34 @@ A quick overview of our repository:
3030
src/ # Source code of the compat addon
3131
test/ # Tests related to the compat addon
3232
dist/ # Build artifacts for publishing on npm (may not be present)
33-
33+
3434
# Sub-package, can be imported via `preact/hooks` by users.
3535
# The hooks API is an effect based API to deal with component lifcycles.
3636
# It's similar to hooks in React
3737
hooks/
3838
src/ # Source code of the hooks addon
3939
test/ # Tests related to the hooks addon
4040
dist/ # Build artifacts for publishing on npm (may not be present)
41-
41+
4242
# Sub-package, can be imported via `preact/debug` by users.
4343
# Includes debugging warnings and error messages for common mistakes found
4444
# in Preact application. Also hosts the devtools bridge
4545
debug/
4646
src/ # Source code of the debug addon
4747
test/ # Tests related to the debug addon
4848
dist/ # Build artifacts for publishing on npm (may not be present)
49-
49+
5050
# Sub-package, can be imported via `preact/test-utils` by users.
5151
# Provides helpers to make testing Preact applications easier
5252
test-utils/
5353
src/ # Source code of the test-utils addon
5454
test/ # Tests related to the test-utils addon
5555
dist/ # Build artifacts for publishing on npm (may not be present)
56-
56+
5757
# A demo application that we use to debug tricky errors and play with new
5858
# features.
5959
demo/
60-
60+
6161
# Contains build scripts and dependencies for development
6262
package.json
6363
```

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<a href="https://preactjs.com" target="_blank">
33

4-
![Preact](https://raw.githubusercontent.com/preactjs/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true "Preact")
4+
![Preact](https://raw.githubusercontent.com/preactjs/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true 'Preact')
55

66
</a>
77
</p>
@@ -18,7 +18,6 @@
1818

1919
### 💁 More information at the [Preact Website ➞](https://preactjs.com)
2020

21-
2221
<table border="0">
2322
<tbody>
2423
<tr>
@@ -32,6 +31,7 @@
3231
[![coveralls](https://img.shields.io/coveralls/preactjs/preact/master.svg)](https://coveralls.io/github/preactjs/preact)
3332
[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip&label=gzip)](https://unpkg.com/preact/dist/preact.min.js)
3433
[![brotli size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=brotli&label=brotli)](https://unpkg.com/preact/dist/preact.min.js)
34+
3535
</td>
3636
<td>
3737

@@ -42,7 +42,6 @@
4242
</tbody>
4343
</table>
4444

45-
4645
You can find some awesome libraries in the [awesome-preact list](https://github.com/preactjs/awesome-preact) :sunglasses:
4746

4847
---
@@ -65,10 +64,20 @@ import { h, render } from 'preact';
6564
/** @jsx h */
6665

6766
// create our tree and append it to document.body:
68-
render(<main><h1>Hello</h1></main>, document.body);
67+
render(
68+
<main>
69+
<h1>Hello</h1>
70+
</main>,
71+
document.body
72+
);
6973

7074
// update the tree in-place:
71-
render(<main><h1>Hello World!</h1></main>, document.body);
75+
render(
76+
<main>
77+
<h1>Hello World!</h1>
78+
</main>,
79+
document.body
80+
);
7281
// ^ this second invocation of render(...) will use a single DOM call to update the text of the <h1>
7382
```
7483

@@ -88,8 +97,8 @@ const App = () => {
8897
<p>Do you agree to the statement: "Preact is awesome"?</p>
8998
<input value={input} onChange={e => setInput(e.target.value)} />
9099
</div>
91-
)
92-
}
100+
);
101+
};
93102

94103
render(<App />, document.body);
95104
```
@@ -132,9 +141,8 @@ Support us with a monthly donation and help us continue our activities. [[Become
132141
<a href="https://opencollective.com/preact/backer/29/website" target="_blank"><img src="https://opencollective.com/preact/backer/29/avatar.svg"></a>
133142
<a href="https://github.com/guardian" target="_blank"><img src="https://github.com/guardian.png?size=64"></a>
134143
135-
136-
137144
## Sponsors
145+
138146
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]
139147
140148
<a href="https://opencollective.com/preact/sponsor/0/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/0/avatar.svg"></a>
@@ -174,11 +182,8 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
174182
175183
MIT
176184
177-
178-
179185
[![Preact](https://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)
180186
181-
182187
[preact/compat]: https://github.com/preactjs/preact/tree/master/compat
183188
[hyperscript]: https://github.com/dominictarr/hyperscript
184189
[DevTools]: https://github.com/preactjs/preact-devtools

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = function(api) {
1+
module.exports = function (api) {
22
api.cache(true);
33

44
const noModules = String(process.env.BABEL_NO_MODULES) === 'true';

benches/TODO.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
* Add `preact-release` proxy
2-
- to capture slowdowns overtime
3-
* Report `initial-run` metric to PR
4-
- to capture unoptimized runtime which would be an important metric to understand perf characteristic before optimizations kick in
5-
* Add warmup reporting to all benchmarks
6-
* Add `preact-compat` proxy
7-
* Add UIBench
8-
* Add bench mimicking speedometer
9-
* Add a realworld-like bench?
10-
* Add a specialized bench that hits certain code paths other's miss (e.g. style attribute handling?)
1+
- Add `preact-release` proxy
2+
- to capture slowdowns overtime
3+
- Report `initial-run` metric to PR
4+
- to capture unoptimized runtime which would be an important metric to understand perf characteristic before optimizations kick in
5+
- Add warmup reporting to all benchmarks
6+
- Add `preact-compat` proxy
7+
- Add UIBench
8+
- Add bench mimicking speedometer
9+
- Add a realworld-like bench?
10+
- Add a specialized bench that hits certain code paths other's miss (e.g. style attribute handling?)

0 commit comments

Comments
 (0)