aboutsummaryrefslogtreecommitdiff
path: root/preact/.github
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-08-23 16:46:06 -0300
committerSebastian <sebasjm@gmail.com>2021-08-23 16:48:30 -0300
commit38acabfa6089ab8ac469c12b5f55022fb96935e5 (patch)
tree453dbf70000cc5e338b06201af1eaca8343f8f73 /preact/.github
parentf26125e039143b92dc0d84e7775f508ab0cdcaa8 (diff)
downloadnode-vendor-38acabfa6089ab8ac469c12b5f55022fb96935e5.tar.gz
node-vendor-38acabfa6089ab8ac469c12b5f55022fb96935e5.tar.bz2
node-vendor-38acabfa6089ab8ac469c12b5f55022fb96935e5.zip
added web vendorsHEADmaster
Diffstat (limited to 'preact/.github')
-rw-r--r--preact/.github/CODE_OF_CONDUCT.md46
-rw-r--r--preact/.github/FUNDING.yml2
-rw-r--r--preact/.github/ISSUE_TEMPLATE/bug_report.md25
-rw-r--r--preact/.github/ISSUE_TEMPLATE/feature_request.md14
-rw-r--r--preact/.github/workflows/benchmarks.yml256
-rw-r--r--preact/.github/workflows/ci.yml57
-rw-r--r--preact/.github/workflows/pr-reporter.yml51
-rw-r--r--preact/.github/workflows/saucelabs.yml42
-rw-r--r--preact/.github/workflows/size.yml17
9 files changed, 510 insertions, 0 deletions
diff --git a/preact/.github/CODE_OF_CONDUCT.md b/preact/.github/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..9e81e67
--- /dev/null
+++ b/preact/.github/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+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
+
+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
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@preactjs.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/preact/.github/FUNDING.yml b/preact/.github/FUNDING.yml
new file mode 100644
index 0000000..bbe0c7d
--- /dev/null
+++ b/preact/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+github: [preactjs]
+open_collective: preact
diff --git a/preact/.github/ISSUE_TEMPLATE/bug_report.md b/preact/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..b0dd055
--- /dev/null
+++ b/preact/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,25 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+- [ ] Check if updating to the latest Preact version resolves the issue
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+
+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
+
+**Expected behavior**
+What should have happened when following the steps above?
diff --git a/preact/.github/ISSUE_TEMPLATE/feature_request.md b/preact/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..b289625
--- /dev/null
+++ b/preact/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,14 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: feature request
+assignees: ''
+
+---
+
+**Describe the feature you'd love to see**
+A clear and concise description of what you'd love to see added to Preact.
+
+**Additional context (optional)**
+Add any other context or screenshots about the feature request here.
diff --git a/preact/.github/workflows/benchmarks.yml b/preact/.github/workflows/benchmarks.yml
new file mode 100644
index 0000000..0cb6685
--- /dev/null
+++ b/preact/.github/workflows/benchmarks.yml
@@ -0,0 +1,256 @@
+name: Benchmarks
+
+on:
+ workflow_dispatch:
+ pull_request:
+ branches:
+ - '**'
+ paths:
+ - 'src/**.js'
+ push:
+ branches:
+ - master
+ - restructure
+ paths:
+ - 'src/**.js'
+
+jobs:
+ prepare:
+ name: Prepare benchmarks
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - name: Cache node modules
+ uses: actions/cache@v1
+ env:
+ cache-name: cache-node-modules
+ with:
+ path: ~/.npm
+ # This uses the same name as the build-action so we can share the caches.
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
+ - run: npm ci
+ - name: Package
+ # Use --ignore-scripts here to avoid re-building again before pack
+ run: |
+ npm pack --ignore-scripts
+ mv preact-*.tgz preact.tgz
+ tar -xzf preact.tgz
+ rm preact.tgz
+ - name: Upload build output
+ uses: actions/upload-artifact@v2
+ with:
+ name: build-output
+ path: package/
+ - uses: andrewiggins/download-base-artifact@v1
+ with:
+ artifact: npm-package
+ workflow: ci.yml
+ required: false
+ - name: Upload base preact package
+ uses: actions/upload-artifact@v2
+ with:
+ name: build-output
+ path: preact.tgz
+
+ bench_text_update:
+ name: Bench text_update
+ runs-on: ubuntu-latest
+ needs: prepare
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-output
+ - name: install & build
+ run: |
+ cd benches
+ npm ci
+ - name: bench
+ run: |
+ export CHROMEDRIVER_FILEPATH=$(which chromedriver)
+ cd benches
+ npm run bench text_update.html
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: results
+ path: benches/results/text_update.json
+
+ bench_many_updates:
+ name: Bench many_updates
+ runs-on: ubuntu-latest
+ needs: prepare
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-output
+ - name: install & build
+ run: |
+ cd benches
+ npm ci
+ - name: bench
+ run: |
+ export CHROMEDRIVER_FILEPATH=$(which chromedriver)
+ cd benches
+ npm run bench many_updates.html
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: results
+ path: benches/results/many_updates.json
+
+ bench_02_replace1k:
+ name: Bench 02_replace1k
+ runs-on: ubuntu-latest
+ needs: prepare
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-output
+ - name: install & build
+ run: |
+ cd benches
+ npm ci
+ - name: bench
+ run: |
+ export CHROMEDRIVER_FILEPATH=$(which chromedriver)
+ cd benches
+ npm run bench 02_replace1k.html
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: results
+ path: benches/results/02_replace1k.json
+
+ bench_03_update10th1k_x16:
+ name: Bench 03_update10th1k_x16
+ runs-on: ubuntu-latest
+ needs: prepare
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-output
+ - name: install & build
+ run: |
+ cd benches
+ npm ci
+ - name: bench
+ run: |
+ export CHROMEDRIVER_FILEPATH=$(which chromedriver)
+ cd benches
+ npm run bench 03_update10th1k_x16.html
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: results
+ path: benches/results/03_update10th1k_x16.json
+
+ bench_07_create10k:
+ name: Bench 07_create10k
+ runs-on: ubuntu-latest
+ needs: prepare
+ timeout-minutes: 20
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-output
+ - name: install & build
+ run: |
+ cd benches
+ npm ci
+ - name: bench
+ run: |
+ export CHROMEDRIVER_FILEPATH=$(which chromedriver)
+ cd benches
+ npm run bench 07_create10k.html
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: results
+ path: benches/results/07_create10k.json
+
+ bench_hydrate1k:
+ name: Bench hydrate1k
+ runs-on: ubuntu-latest
+ needs: prepare
+ timeout-minutes: 20
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-output
+ - name: install & build
+ run: |
+ cd benches
+ npm ci
+ - name: bench
+ run: |
+ export CHROMEDRIVER_FILEPATH=$(which chromedriver)
+ cd benches
+ npm run bench hydrate1k.html
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: results
+ path: benches/results/hydrate1k.json
+
+ bench_filter_list:
+ name: Bench filter_list
+ runs-on: ubuntu-latest
+ needs: prepare
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - uses: actions/download-artifact@v2
+ with:
+ name: build-output
+ - name: install & build
+ run: |
+ cd benches
+ npm ci
+ - name: bench
+ run: |
+ export CHROMEDRIVER_FILEPATH=$(which chromedriver)
+ cd benches
+ npm run bench filter_list.html
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: results
+ path: benches/results/filter_list.json
diff --git a/preact/.github/workflows/ci.yml b/preact/.github/workflows/ci.yml
new file mode 100644
index 0000000..80dcd86
--- /dev/null
+++ b/preact/.github/workflows/ci.yml
@@ -0,0 +1,57 @@
+name: CI
+
+on:
+ workflow_dispatch:
+ pull_request:
+ branches:
+ - '**'
+ push:
+ branches:
+ - master
+ - restructure
+
+jobs:
+ build_test:
+ name: Build & Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - name: Cache node modules
+ uses: actions/cache@v1
+ env:
+ cache-name: cache-node-modules
+ with:
+ path: ~/.npm
+ # This uses the same name as the build-action so we can share the caches.
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
+ - run: npm ci
+ - name: test
+ env:
+ CI: true
+ COVERAGE: true
+ FLAKEY: false
+ # Not using `npm test` since it rebuilds source which npm ci has already done
+ run: |
+ npm run lint
+ npm run test:unit
+ - name: Coveralls GitHub Action
+ uses: coverallsapp/github-action@v1.0.1
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Package
+ # Use --ignore-scripts here to avoid re-building again before pack
+ run: |
+ npm pack --ignore-scripts
+ mv preact-*.tgz preact.tgz
+ - name: Upload npm package
+ uses: actions/upload-artifact@v2
+ with:
+ name: npm-package
+ path: preact.tgz
diff --git a/preact/.github/workflows/pr-reporter.yml b/preact/.github/workflows/pr-reporter.yml
new file mode 100644
index 0000000..b5e2f1b
--- /dev/null
+++ b/preact/.github/workflows/pr-reporter.yml
@@ -0,0 +1,51 @@
+name: Report Results to PR
+
+on:
+ # The pull_request event can't write comments for PRs from forks so using this
+ # workflow_run workflow as a workaround
+ workflow_run:
+ workflows: ['Benchmarks']
+ branches: ['**']
+ types:
+ - completed
+ - requested
+
+jobs:
+ report_running:
+ name: Report benchmarks are in-progress
+ runs-on: ubuntu-latest
+ # Only add the "benchmarks are running" text when a workflow_run is
+ # requested (a.k.a starting)
+ if: ${{ github.event.action == 'requested' }}
+ steps:
+ - name: Report Tachometer Running
+ uses: andrewiggins/tachometer-reporter-action@v2
+ with:
+ # Set initialize to true so this action just creates the comment or
+ # adds the "benchmarks are running" text
+ initialize: true
+
+ report_results:
+ name: Report benchmark results
+ runs-on: ubuntu-latest
+ # Only run this job if the event action was "completed" and the triggering
+ # workflow_run was successful
+ if: ${{ github.event.action == 'completed' && github.event.workflow_run.conclusion == 'success' }}
+ steps:
+ # Download the artifact from the triggering workflow that contains the
+ # Tachometer results to report
+ - uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow.id }}
+ run_id: ${{ github.event.workflow_run.id }}
+ name: results
+ path: results
+
+ # Create/update the comment with the latest results
+ - name: Report Tachometer Results
+ uses: andrewiggins/tachometer-reporter-action@v2
+ with:
+ path: results/*.json
+ base-bench-name: preact-master
+ pr-bench-name: preact-local
+ summarize: 'duration, usedJSHeapSize'
diff --git a/preact/.github/workflows/saucelabs.yml b/preact/.github/workflows/saucelabs.yml
new file mode 100644
index 0000000..e26ae2b
--- /dev/null
+++ b/preact/.github/workflows/saucelabs.yml
@@ -0,0 +1,42 @@
+name: Saucelabs
+
+on:
+ push:
+ branches:
+ - master
+ - restructure
+
+jobs:
+ build_test:
+ name: Build & Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - name: Cache node modules
+ uses: actions/cache@v1
+ env:
+ cache-name: cache-node-modules
+ with:
+ path: ~/.npm
+ # This uses the same name as the build-action so we can share the caches.
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
+ - run: npm ci
+ - name: test
+ env:
+ CI: true
+ COVERAGE: true
+ FLAKEY: false
+ RUN_SAUCE_LABS: true
+ SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
+ SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
+ # Not using `npm test` since it rebuilds source which npm ci has already done
+ run: npm run test:unit
diff --git a/preact/.github/workflows/size.yml b/preact/.github/workflows/size.yml
new file mode 100644
index 0000000..f886534
--- /dev/null
+++ b/preact/.github/workflows/size.yml
@@ -0,0 +1,17 @@
+name: Compressed Size
+
+on:
+ pull_request:
+ branches:
+ - '**'
+ paths:
+ - '**/src/**.js'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: preactjs/compressed-size-action@v1
+ with:
+ repo-token: '${{ secrets.GITHUB_TOKEN }}'