Skip to content

Commit

Permalink
Merge branch 'master' into fix-for-frame-component
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed May 19, 2023
2 parents 6628056 + f5af720 commit f641c92
Show file tree
Hide file tree
Showing 134 changed files with 31,298 additions and 44,985 deletions.
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
npm run lint
npm run test:unit
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@1.1.3
uses: coverallsapp/github-action@v2.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Package
Expand Down
25 changes: 25 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.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
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
18 changes: 9 additions & 9 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 Expand Up @@ -174,13 +174,13 @@ rights to publish new releases on npm.
2. Wait until the PR is approved and merged.
3. Switch back to the `master` branch and pull the merged PR
4. Create and push a tag for the new version you want to publish:
1. `git tag 10.0.0`
2. `git push --tags`
1. `git tag 10.0.0`
2. `git push --tags`
5. Wait for the Release workflow to complete
- It'll create a draft release and upload the built npm package as an asset to the release
- It'll create a draft release and upload the built npm package as an asset to the release
6. [Fill in the release notes](#writing-release-notes) in GitHub and publish them
7. Run the publish script with the tag you created
1. `node ./scripts/release/publish.mjs 10.0.0`
1. `node ./scripts/release/publish.mjs 10.0.0`
2. Make sure you have 2FA enabled in npm, otherwise the above command will fail.
3. If you're doing a pre-release add `--npm-tag next` to the `publish.mjs` command to publish it under a different tag (default is `latest`)
8. Tweet it out
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,15 +97,16 @@ const App = () => {
<p>Do you agree to the statement: "Preact is awesome"?</p>
<input value={input} onInput={e => setInput(e.target.value)} />
</div>
)
}
);
};

render(<App />, document.body);
```
---
## 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 @@ -132,8 +142,6 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
<a href="https://opencollective.com/preact/sponsor/28/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/preact/sponsor/29/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/29/avatar.svg"></a>
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]
Expand Down Expand Up @@ -175,11 +183,8 @@ Support us with a monthly donation and help us continue our activities. [[Become
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"]
}
60 changes: 30 additions & 30 deletions benches/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"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.1"
},
"devDependencies": {
"@kristoferbaxter/async": "^1.0.0",
"del": "^7.0.0",
"escalade": "^3.1.1",
"escape-string-regexp": "^5.0.0",
"globby": "^13.1.2",
"prompts": "^2.4.2",
"sade": "^1.8.1",
"strip-ansi": "^7.0.1",
"tachometer": "^0.7.0",
"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.1"
},
"devDependencies": {
"@kristoferbaxter/async": "^1.0.0",
"del": "^7.0.0",
"escalade": "^3.1.1",
"escape-string-regexp": "^5.0.0",
"globby": "^13.1.2",
"prompts": "^2.4.2",
"sade": "^1.8.1",
"strip-ansi": "^7.0.1",
"tachometer": "^0.7.0",
"v8-deopt-viewer": "^0.2.1"
},
"volta": {
"extends": "../package.json"
}
"extends": "../package.json"
}
}
2 changes: 1 addition & 1 deletion benches/proxy-packages/preact-hooks-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"dependencies": {
"preact": "file:../../../"
}
}
}
2 changes: 1 addition & 1 deletion benches/proxy-packages/preact-local-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"dependencies": {
"preact": "file:../../../"
}
}
}
Loading

0 comments on commit f641c92

Please sign in to comment.