Skip to content

Commit

Permalink
Merge pull request #4056 from reduxjs/feature/4x-update-build-tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson authored Apr 2, 2021
2 parents c3cbe2e + 117be71 commit 82ad636
Show file tree
Hide file tree
Showing 84 changed files with 7,052 additions and 4,310 deletions.
7 changes: 7 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sandboxes": [
"vanilla",
"vanilla-ts"
],
"node": "14"
}
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: timdorr
39 changes: 33 additions & 6 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,41 @@ name: "\U0001F41BBug report"
about: Something is wrong with Redux.
---

**Do you want to request a _feature_ or report a _bug_?**
<!--
Thank you for contributing to open source!
(If this is a _usage question_, please **do not post it here**—post it on [Stack Overflow](http://stackoverflow.com/questions/tagged/redux) instead. If this is not a “feature” or a “bug”, or the phrase “How do I...?” applies, then it's probably a usage question.)
Do you need some help?
======================
**What is the current behavior?**
The issue tracker is meant for bug reports only. This isn't the best place for support or usage questions. Questions here don't have as much visibility as they do elsewhere. Before you ask a question, here are some resources to get help first:
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.**
- Read the docs: https://redux.js.org/
- Check out the troubleshooting guide: https://redux.js.org/troubleshooting
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/redux
- Ask in chat: https://www.reactiflux.com/
**What is the expected behavior?**
Think you found a bug?
======================
The best bug report is a failing test in the repository as a pull request. Otherwise, please use the template below.
**Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?**
-->

### Prior Issues

Are there any existing issues or PRs that relate to this problem? If so, link them here.

### What is the current behavior?

What does Redux do right now.

### Steps to Reproduce

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://codesandbox.io or similar.

### What is the expected behavior?

What should Redux be doing?

### Environment Details

Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/Custom.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: 👍 Feature Request
about: I'd like Redux to do something new.
---

<!--
Thank you for contributing to open source!
Do you need some help?
======================
The issue tracker is meant for feature requests and bug reports only. This isn't the best place for
support or usage questions. Questions here don't have as much visibility as they do elsewhere. Before
you ask a question, here are some resources to get help first:
- Read the docs: https://redux.js.org/
- Check out the troubleshooting guide: https://redux.js.org/troubleshooting
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/redux
- Ask in chat: https://www.reactiflux.com/
Have a feature request?
=======================
Remove the template from below and provide thoughtful commentary *and code samples* on what this
feature means for your product. What will it allow you to do that you can't do today? How will it
make current work-arounds straightforward? What potential bugs and edge cases does it help to
avoid? etc. Please keep it product-centric.
-->

## New Features

### What is the new or updated feature that you are suggesting?

### Why should this feature be included?

### What docs changes are needed to explain this?
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Questions and Help
url: https://redux.js.org/introduction/getting-started#help-and-discussion
about: This is a bug tracker, not a support system. For usage questions, please use our support resources.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "\U0001F4DD Documentation Fix"
about: Fixing a problem in an existing docs page
---

## What docs page needs to be fixed?

- **Section**:
- **Page**:

## What is the problem?

## What should be changed to fix the problem?
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "\U0001F4D6 New/Updated Documentation Content"
about: Adding a new docs page, or updating content in an existing docs page
---

## What docs page is being added or updated?

- **Section**:
- **Page**:

## For Adding New Content

### What kind of content category is this page (tutorial, how-to, explanation, reference)?

### Who is the intended target audience?

#### What knowledge are we assuming they have?

### What are the intended results or takeaways from reading this page?

### What is the most critical info they should learn?

## For Updating Existing Content

### What updates should be made to the page?

### Do these updates change any of the assumptions or target audience? If so, how do they change?
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Thanks for the PR!

To better assist you, please select the type of PR you want to create.

Click the "Preview" tab above, and click on the link for the PR type:

- [:bug: Bug fix or new feature](?template=bugfix.md)
- [:memo: Documentation Fix](?template=documentation-edit.md)
- [:book: New/Updated Documentation Content](?template=documentation-new.md)
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: :bug: Bug fix or new feature
about: Fixing a problem with Redux
---

## PR Type

### Does this PR add a new _feature_, or fix a _bug_?

### Why should this PR be included?

## Checklist

- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Is there an existing issue for this PR?
- _link issue here_
- [ ] Have the files been linted and formatted?
- [ ] Have the docs been updated to match the changes in the PR?
- [ ] Have the tests been updated to match the changes in the PR?
- [ ] Have you run the tests locally to confirm they pass?

## New Features

### What new capabilities does this PR add?

### What docs changes are needed to explain this?

## Bug Fixes

### What is the current behavior, and the steps to reproduce the issue?

### What is the expected behavior?

### How does this PR fix the problem?
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/documentation-edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: :memo: Documentation Fix
about: Fixing a problem in an existing docs page
---

## Checklist

- [ ] Is there an existing issue for this PR?
- _link issue here_
- [ ] Have the files been linted and formatted?

## What docs page needs to be fixed?

- **Section**:
- **Page**:

## What is the problem?

## What changes does this PR make to fix the problem?
37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/documentation-new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: :book: New/Updated Documentation Content
about: Adding a new docs page, or updating content in an existing docs page
---

## PR Type

**Does this PR add a _new_ page, or update an _existing_ page?**

## Checklist

- [ ] Is there an existing issue for this PR?
- _link issue here_
- [ ] Have the files been linted and formatted?

## What docs page is being added or updated?

- **Section**:
- **Page**:

## For Adding New Content

### What kind of content category is this page (tutorial, how-to, explanation, reference)?

### Who is the intended target audience?

#### What knowledge are we assuming they have?

### What are the intended results or takeaways from reading this page?

### What is the most critical info they should learn?

## For Updating Existing Content

### What updates should be made to the page?

### Do these updates change any of the assumptions or target audience? If so, how do they change?
17 changes: 17 additions & 0 deletions .github/workflows/size.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Bundle Size

on: [pull_request]

jobs:
build:
name: Check compressed size
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2-beta
with:
fetch-depth: 1
- uses: preactjs/compressed-size-action@v1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: './{dist,es,lib}/*.js'
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests

on:
push:
branches: [4.x]
pull_request:
branches: [4.x]

jobs:
build:
name: Test Suite
runs-on: ubuntu-latest

steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci

- name: Check formatting
run: npm run format:check

- name: Lint code
run: npm run lint

- name: Run test suite
run: npm test
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

18 changes: 9 additions & 9 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function todos(state = [], action) {
// Wrong! This mutates state
state.push({
text: action.text,
completed: false
completed: false,
})
return state
case 'COMPLETE_TODO':
Expand All @@ -55,16 +55,16 @@ function todos(state = [], action) {
...state,
{
text: action.text,
completed: false
}
completed: false,
},
]
case 'COMPLETE_TODO':
// Return a new array
return state.map((todo, index) => {
if (index === action.index) {
// Copy the object before mutating
return Object.assign({}, todo, {
completed: true
completed: true,
})
}
return todo
Expand All @@ -82,7 +82,7 @@ It's more code, but it's exactly what makes Redux predictable and efficient. If
return state.map((todo, index) => {
if (index === action.index) {
return Object.assign({}, todo, {
completed: true
completed: true,
})
}
return todo
Expand All @@ -92,9 +92,9 @@ return state.map((todo, index) => {
return update(state, {
[action.index]: {
completed: {
$set: true
}
}
$set: true,
},
},
})
```

Expand All @@ -109,7 +109,7 @@ You can also enable the [object spread operator proposal](recipes/UsingObjectSpr
return state.map((todo, index) => {
if (index === action.index) {
return Object.assign({}, todo, {
completed: true
completed: true,
})
}
return todo
Expand Down
Loading

0 comments on commit 82ad636

Please sign in to comment.