Skip to content

Commit

Permalink
V11 update 10 13 (#4257)
Browse files Browse the repository at this point in the history
* backport #3911

* backport #3906

* backport #3837

* backport #3908

* backport #3904

* backport #3905

* backport #3898

* backport #3910

* backport #3948

* backport #3941

* backport #3945

* backport #3919

* backport #3922

* backport #3921

* backport #3903

* fix lint

* update more

* debug
  • Loading branch information
JoviDeCroock committed Jan 16, 2024
1 parent 36ef4e8 commit 4601cf3
Show file tree
Hide file tree
Showing 119 changed files with 34,837 additions and 33,127 deletions.
7 changes: 2 additions & 5 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.3/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "preactjs/preact" }
],
"changelog": ["@changesets/changelog-github", { "repo": "preactjs/preact" }],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "v11",
"updateInternalDependencies": "patch",
"ignore": []
}
}
2 changes: 1 addition & 1 deletion .changeset/little-melons-crash.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'preact': minor
---

Move `createPortal` to the core package
Move `createPortal` to the core package
20 changes: 10 additions & 10 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

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

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

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

- [ ] Check if updating to the latest Preact version resolves the issue
Expand All @@ -17,6 +16,7 @@ A clear and concise description of what the bug is.
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

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. See error
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

**Describe the feature you'd love to see**
Expand Down
26 changes: 26 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.DS_Store
node_modules
npm-debug.log
dist
*/package-lock.json
yarn.lock
.vscode
.idea
test/ts/**/*.js
coverage
*.sw[op]
*.log
package/
preact-*.tgz
preact.tgz

# Copied from benches/.gitignore so prettier can ignore these paths too
benches/dist/
benches/results/
benches/logs/
benches/logs-saved/
benches/node_modules/
benches/proxy-packages/*/package-lock.json

package-lock.json
mangle.json
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

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

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

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities

Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@ A quick overview of our repository:
src/ # Source code of the compat addon
test/ # Tests related to the compat addon
dist/ # Build artifacts for publishing on npm (may not be present)

# Sub-package, can be imported via `preact/hooks` by users.
# The hooks API is an effect based API to deal with component lifcycles.
# It's similar to hooks in React
hooks/
src/ # Source code of the hooks addon
test/ # Tests related to the hooks addon
dist/ # Build artifacts for publishing on npm (may not be present)

# Sub-package, can be imported via `preact/debug` by users.
# Includes debugging warnings and error messages for common mistakes found
# in Preact application. Also hosts the devtools bridge
debug/
src/ # Source code of the debug addon
test/ # Tests related to the debug addon
dist/ # Build artifacts for publishing on npm (may not be present)

# Sub-package, can be imported via `preact/test-utils` by users.
# Provides helpers to make testing Preact applications easier
test-utils/
src/ # Source code of the test-utils addon
test/ # Tests related to the test-utils addon
dist/ # Build artifacts for publishing on npm (may not be present)

# A demo application that we use to debug tricky errors and play with new
# features.
demo/

# Contains build scripts and dependencies for development
package.json
```
Expand Down
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<a href="https://preactjs.com" target="_blank">

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

</a>
</p>
Expand All @@ -18,7 +18,6 @@

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


<table border="0">
<tbody>
<tr>
Expand All @@ -32,6 +31,7 @@
[![coveralls](https://img.shields.io/coveralls/preactjs/preact/master.svg)](https://coveralls.io/github/preactjs/preact)
[![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)
[![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)

</td>
<td>

Expand All @@ -42,7 +42,6 @@
</tbody>
</table>


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

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

// create our tree and append it to document.body:
render(<main><h1>Hello</h1></main>, document.body);
render(
<main>
<h1>Hello</h1>
</main>,
document.body
);

// update the tree in-place:
render(<main><h1>Hello World!</h1></main>, document.body);
render(
<main>
<h1>Hello World!</h1>
</main>,
document.body
);
// ^ this second invocation of render(...) will use a single DOM call to update the text of the <h1>
```

Expand All @@ -88,8 +97,8 @@ const App = () => {
<p>Do you agree to the statement: "Preact is awesome"?</p>
<input value={input} onChange={e => setInput(e.target.value)} />
</div>
)
}
);
};

render(<App />, document.body);
```
Expand Down Expand Up @@ -132,9 +141,8 @@ Support us with a monthly donation and help us continue our activities. [[Become
<a href="https://opencollective.com/preact/backer/29/website" target="_blank"><img src="https://opencollective.com/preact/backer/29/avatar.svg"></a>
<a href="https://github.com/guardian" target="_blank"><img src="https://github.com/guardian.png?size=64"></a>
## Sponsors
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)]
<a href="https://opencollective.com/preact/sponsor/0/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/0/avatar.svg"></a>
Expand Down Expand Up @@ -174,11 +182,8 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
MIT
[![Preact](https://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)
[preact/compat]: https://github.com/preactjs/preact/tree/master/compat
[hyperscript]: https://github.com/dominictarr/hyperscript
[DevTools]: https://github.com/preactjs/preact-devtools
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);

const noModules = String(process.env.BABEL_NO_MODULES) === 'true';
Expand Down
20 changes: 10 additions & 10 deletions benches/TODO.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
* Add `preact-release` proxy
- to capture slowdowns overtime
* Report `initial-run` metric to PR
- to capture unoptimized runtime which would be an important metric to understand perf characteristic before optimizations kick in
* Add warmup reporting to all benchmarks
* Add `preact-compat` proxy
* Add UIBench
* Add bench mimicking speedometer
* Add a realworld-like bench?
* Add a specialized bench that hits certain code paths other's miss (e.g. style attribute handling?)
- Add `preact-release` proxy
- to capture slowdowns overtime
- Report `initial-run` metric to PR
- to capture unoptimized runtime which would be an important metric to understand perf characteristic before optimizations kick in
- Add warmup reporting to all benchmarks
- Add `preact-compat` proxy
- Add UIBench
- Add bench mimicking speedometer
- Add a realworld-like bench?
- Add a specialized bench that hits certain code paths other's miss (e.g. style attribute handling?)
12 changes: 6 additions & 6 deletions benches/jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "es2020",
"checkJs": true,
"moduleResolution": "node"
},
"exclude": ["node_modules", "dist"]
"compilerOptions": {
"target": "es2020",
"checkJs": true,
"moduleResolution": "node"
},
"exclude": ["node_modules", "dist"]
}
56 changes: 28 additions & 28 deletions benches/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"name": "preact-benchmarks",
"private": true,
"version": "1.0.0",
"type": "module",
"description": "Benchmarks for Preact",
"scripts": {
"start": "node ./scripts config many_updates.html && tach --force-clean-npm-install --config dist/many_updates.config.json --manual",
"analyze": "node ./scripts analyze",
"bench": "node ./scripts bench",
"deopts": "node ./scripts deopts",
"help": "node ./scripts --help"
},
"license": "MIT",
"dependencies": {
"afterframe": "^1.0.2"
},
"devDependencies": {
"@kristoferbaxter/async": "^1.0.0",
"del": "^6.0.0",
"escalade": "^3.0.2",
"escape-string-regexp": "^4.0.0",
"globby": "^11.0.0",
"prompts": "^2.4.0",
"sade": "^1.7.3",
"strip-ansi": "^6.0.0",
"tachometer": "^0.5.10",
"v8-deopt-viewer": "^0.2.1"
}
"name": "preact-benchmarks",
"private": true,
"version": "1.0.0",
"type": "module",
"description": "Benchmarks for Preact",
"scripts": {
"start": "node ./scripts config many_updates.html && tach --force-clean-npm-install --config dist/many_updates.config.json --manual",
"analyze": "node ./scripts analyze",
"bench": "node ./scripts bench",
"deopts": "node ./scripts deopts",
"help": "node ./scripts --help"
},
"license": "MIT",
"dependencies": {
"afterframe": "^1.0.2"
},
"devDependencies": {
"@kristoferbaxter/async": "^1.0.0",
"del": "^6.0.0",
"escalade": "^3.0.2",
"escape-string-regexp": "^4.0.0",
"globby": "^11.0.0",
"prompts": "^2.4.0",
"sade": "^1.7.3",
"strip-ansi": "^6.0.0",
"tachometer": "^0.5.10",
"v8-deopt-viewer": "^0.2.1"
}
}
16 changes: 8 additions & 8 deletions benches/proxy-packages/preact-local-proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "preact-local-proxy",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "index.js",
"dependencies": {
"preact": "file:../../../"
}
"name": "preact-local-proxy",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "index.js",
"dependencies": {
"preact": "file:../../../"
}
}
Loading

0 comments on commit 4601cf3

Please sign in to comment.