Skip to content

Commit

Permalink
Merge branch 'main' into gm/fix/merge-function-called-before-deepmerg…
Browse files Browse the repository at this point in the history
…e-sep202022
  • Loading branch information
gastonmorixe authored Mar 10, 2023
2 parents def116b + afccbdb commit 72b222e
Show file tree
Hide file tree
Showing 214 changed files with 26,780 additions and 9,558 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "apollographql/apollo-client" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/young-toes-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

`useQuery`: delay unsubscribe to fix race conditions
45 changes: 13 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,35 @@ version: 2
jobs:
Filesize:
docker:
- image: circleci/node:16.13.1
- image: cimg/node:19.7.0
steps:
- checkout
- run: npm run ci:precheck
- restore_cache:
keys:
# When lock file changes, use increasingly general patterns to
# restore cache
- npm-v3-{{ .Branch }}-{{ checksum "package-lock.json" }}
- npm-v3-{{ .Branch }}-
- npm-v3-
- run: npm version
- run: npm ci
- save_cache:
key: npm-v3-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
# This should cache the npm cache instead of node_modules, which is
# needed because npm ci actually removes node_modules before
# installing to guarantee a clean slate.
- ~/.npm
- run: npm run bundlesize

Lint:
docker:
- image: cimg/node:19.7.0
steps:
- checkout
- run: npm version
- run: npm ci
- run: npm run lint

Tests:
docker:
- image: circleci/node:16.13.1
- image: cimg/node:19.7.0
steps:
- checkout
- run: npm run ci:precheck
- restore_cache:
keys:
# When lock file changes, use increasingly general patterns to
# restore cache
- npm-v3-{{ .Branch }}-{{ checksum "package-lock.json" }}
- npm-v3-{{ .Branch }}-
- npm-v3-
- run: npm version
- run: npm ci
- save_cache:
key: npm-v3-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
# This should cache the npm cache instead of node_modules, which is
# needed because npm ci actually removes node_modules before
# installing to guarantee a clean slate.
- ~/.npm
- run:
name: Jest suite with coverage
command: npm run test:ci
environment:
JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml"
JEST_JUNIT_OUTPUT_FILE: "reports/junit/js-test-results.xml"
- store_test_results:
path: reports/junit
- store_artifacts:
Expand All @@ -63,3 +43,4 @@ workflows:
jobs:
- Filesize
- Tests
- Lint
21 changes: 21 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"env": {
"browser": true,
"node": true,
"es2021": true
},
"parserOptions": {
"ecmaVersion": "latest"
},
"overrides": [
{
"files": ["**/__tests__/**/*.[jt]sx", "**/?(*.)+(test).[jt]sx"],
"extends": ["plugin:testing-library/react"],
"rules": {
"testing-library/prefer-user-event": "error"
}
}
]
}
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Bug
description: File a bug report
body:
- type: markdown
attributes:
value: "Hello from the Apollo Client team! Hopefully we can help resolve your issue. To increase the chances of us being able to help, please take the time to fill out the form as completely as possible. A minimal, runnable reproduction is the best way to get us to help you quickly and in many cases we simply cannot help without one."
- type: textarea
attributes:
label: Issue Description
description: Describe the issue you are experiencing.
validations:
required: false
- type: input
attributes:
label: Link to Reproduction
description: A link with runnable reproduction. You can fork our `react-apollo-error-template` to create one via [GitHub repository](https://github.com/apollographql/react-apollo-error-template) or [CodeSandbox](https://codesandbox.io/s/github/apollographql/react-apollo-error-template). Make sure this includes everything necessary (`package.json`, `tsconfig.json`, etc.) so we don't have to guess anything!
validations:
required: true
- type: textarea
attributes:
label: Reproduction Steps
description: Please provide any additional non-trivial steps required to reproduce the issue.
validations:
required: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/question-discussion.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ about: Questions / discussions are best posted in our community forums or StackO

Need help or want to talk all things Apollo Client? Issues here are reserved for bugs, but one of the following resources should help:

* Apollo Discord server: https://discord.gg/graphos
* Apollo GraphQL community forums: https://community.apollographql.com
* StackOverflow (`apollo-client` tag): https://stackoverflow.com/questions/tagged/apollo-client
* Apollo Feature Request repo: https://github.com/apollographql/apollo-feature-requests
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@

### Checklist:

- [ ] If this PR contains changes to the library itself (not necessary for e.g. docs updates), please include a changeset (see [CONTRIBUTING.md](https://github.com/apollographql/apollo-client/blob/main/CONTRIBUTING.md#changesets))
- [ ] If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
- [ ] Make sure all of the significant new logic is covered by tests
179 changes: 179 additions & 0 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '15 5 * * *'

jobs:
stale:
# Prevents action from running on forks
if: github.repository == 'apollographql/apollo-client'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- name: Close Stale Issues
uses: actions/stale@v7.0.0
with:
# # Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
# repo-token: # optional, default is ${{ github.token }}

# # The message to post on the issue when tagging it. If none provided, will not mark issues stale.
#. stale-issue-message: # optional

# # The message to post on the pull request when tagging it. If none provided, will not mark pull requests stale.
# stale-pr-message: # optional

# The message to post on the issue when closing it. If none provided, will not comment when closing an issue.
close-issue-message: "We're closing this issue now but feel free to ping the maintainers or open a new issue if you still need support. Thank you!"

# # The message to post on the pull request when closing it. If none provided, will not comment when closing a pull requests.
# close-pr-message: # optional

# The number of days old an issue or a pull request can be before marking it stale. Set to -1 to never mark issues or pull requests as stale automatically.
days-before-stale: -1

# The number of days old an issue can be before marking it stale. Set to -1 to never mark issues as stale automatically. Override "days-before-stale" option regarding only the issues.
days-before-issue-stale: -1

# The number of days old a pull request can be before marking it stale. Set to -1 to never mark pull requests as stale automatically. Override "days-before-stale" option regarding only the pull requests.
days-before-pr-stale: -1

# The number of days to wait to close an issue or a pull request after it being marked stale. Set to -1 to never close stale issues or pull requests.
days-before-close: -1

# The number of days to wait to close an issue after it being marked stale. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the issues.
days-before-issue-close: 30

# The number of days to wait to close a pull request after it being marked stale. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding only the pull requests.
days-before-pr-close: -1

# The label to apply when an issue is stale.
stale-issue-label: "🏓 awaiting-contributor-response"

# # The label to apply when an issue is closed.
# close-issue-label: # optional

# # The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2").
# exempt-issue-labels: # optional, default is

# The reason to use when closing an issue.
close-issue-reason: not_planned

# # The label to apply when a pull request is stale.
# stale-pr-label: # optional, default is Stale

# # The label to apply when a pull request is closed.
# close-pr-label: # optional

# # The labels that mean a pull request is exempt from being marked as stale. Separate multiple labels with commas (eg. "label1,label2").
# exempt-pr-labels: # optional, default is

# # The milestones that mean an issue or a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2").
# exempt-milestones: # optional, default is

# # The milestones that mean an issue is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the issues.
# exempt-issue-milestones: # optional, default is

# # The milestones that mean a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the pull requests.
# exempt-pr-milestones: # optional, default is

# # Exempt all issues and pull requests with milestones from being marked as stale. Default to false.
# exempt-all-milestones: # optional, default is false

# # Exempt all issues with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the issues.
# exempt-all-issue-milestones: # optional, default is

# # Exempt all pull requests with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the pull requests.
# exempt-all-pr-milestones: # optional, default is

# # Only issues or pull requests with all of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels.
# only-labels: # optional, default is

# # Only issues or pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels.
# any-of-labels: # optional, default is

# Only issues with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the issues.
any-of-issue-labels: "🏓 awaiting-contributor-response"

# # Only pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the pull requests.
# any-of-pr-labels: # optional, default is

# # Only issues with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the issues.
# only-issue-labels: # optional, default is

# # Only pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the pull requests.
# only-pr-labels: # optional, default is

# The maximum number of operations per run, used to control rate limiting (GitHub API CRUD related).
operations-per-run: 500 # optional, default is 30

# Remove stale labels from issues and pull requests when they are updated or commented on.
remove-stale-when-updated: false

# Remove stale labels from issues when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the issues.
remove-issue-stale-when-updated: true

# Remove stale labels from pull requests when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the pull requests.
remove-pr-stale-when-updated: false

# Run the processor in debug mode without actually performing any operations on live issues.
debug-only: false

# # The order to get issues or pull requests. Defaults to false, which is descending.
# ascending: # optional, default is false

# Delete the git branch after closing a stale pull request.
delete-branch: false

# # The date used to skip the stale action on issue/pull request created before it (ISO 8601 or RFC 2822).
# start-date: # optional, default is

# # The assignees which exempt an issue or a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2").
# exempt-assignees: # optional, default is

# # The assignees which exempt an issue from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the issues.
# exempt-issue-assignees: # optional, default is

# # The assignees which exempt a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the pull requests.
# exempt-pr-assignees: # optional, default is

# # Exempt all issues and pull requests with assignees from being marked as stale. Default to false.
# exempt-all-assignees: # optional, default is false

# Exempt all issues with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the issues.
exempt-all-issue-assignees: true

# # Exempt all pull requests with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the pull requests.
# exempt-all-pr-assignees: # optional, default is

# # Exempt draft pull requests from being marked as stale. Default to false.
# exempt-draft-pr: # optional, default is false

# # Display some statistics at the end regarding the stale workflow (only when the logs are enabled).
enable-statistics: true

# # A comma delimited list of labels to add when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it.
# labels-to-add-when-unstale: # optional, default is

# A comma delimited list of labels to remove when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it.
labels-to-remove-when-unstale: "🏓 awaiting-contributor-response"

# Any update (update/comment) can reset the stale idle time on the issues and pull requests.
ignore-updates: false

# Any update (update/comment) can reset the stale idle time on the issues. Override "ignore-updates" option regarding only the issues.
ignore-issue-updates: false

# Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests.
ignore-pr-updates: false

# # Only the issues or the pull requests with an assignee will be marked as stale automatically.
# include-only-assigned: # optional, default is false
3 changes: 3 additions & 0 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
paths:
- docs/**

permissions:
contents: read

jobs:
publish:
uses: apollographql/docs/.github/workflows/publish.yml@main
Expand Down
Loading

0 comments on commit 72b222e

Please sign in to comment.