Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-script): Script component duplicate script warning #35610

Closed
wants to merge 70 commits into from

Conversation

marvinjude
Copy link
Contributor

@marvinjude marvinjude commented May 9, 2022

Description

Show warning when the same script is loaded with different strategy

Related Issues

[sc-48844]

tyhopp and others added 21 commits May 9, 2022 10:47
* test(gatsby-script): e2e test scaffolding

* test(gatsby-script): Test pre-hydrate strategy

* test(gatsby-script): Refactor resource record command

* test(gatsby-script): Test post-hydrate strategy

* test(gatsby-script): Test idle strategy

* test(gatsby-script): Update readme, npm scripts

* test(gatsby-script): Remove unnecessary dev Cypress config

* test(gatsby-script): DRY middleware intercepts

* chore(gatsby-script): e2e circle ci config

* chore(gatsby-script): Add e2e to circle ci jobs

* chore(gatsby-script): Use published package so e2e tests can resolve it

* test(gatsby-script): Add missing network waits to e2e tests
* feat(gatsby-script): Implement inline scripts

* test(gatsby-script): Inline scripts unit tests

* test(gatsby-script): Set up for e2e tests

* test(gatsby-script): Display scripts with sources strategy

* test(gatsby-script): dangerouslySetInnerHTML e2e tests

* test(gatsby-script): Template literals e2e tests

* chore(gatsby-script): Update package readme

* chore(gatsby-script): Install latest canary to run in CI

* chore(gatsby-script): Try waitForRouteChange to fix inconsistent Cypress network waits

* chore(gatsby-script): Try delaying responses so Cypress has time to set up network waits

* chore(gatsby-script): Try increasing network response delay even further

* chore(gatsby-script): Remove unreliable Cypress network waits entirely
* feat(gatsby-script): Normal attribute implementation

* chore(gatsby-script): Bump default command timeout
* feat(gatsy-script): Initial on load callback implementation

* test(gatsby-script): Refactor e2e test structure

* refactor(gatsby-script): Fix eslint, ts errors

* feat(gatsby-script): Handle edge cases from Gatsby link navigation

* test(gatsby-script): Adjust e2e tests so they run successfully again

* feat(gatsby-script): On load callback e2e tests

* test(gatsby-script): Scripts with sources navigation e2e tests

* test(gatsby-script): Inline scripts navigation e2e tests

* test(gatsby-script): Adjust e2e tests, add comment on edge case

* test(gatsby-script): Fix unit tests
* feat(gatsby-script): On error callback

* test(gatsby-script): Update on error callback e2e test logic

* chore(gatsby-script): Skip inline scripts gatsby link nav test
* feat(gatsby-script): Partytown internal plugin

* feat(gatsby-script): Collect forward props

* chore(gatsby-script): Update e2e test to import from gatsby core

* chore(gatsby-script): Remove alpha version in core package json

* chore(gatsby-script): Define latest gatsby-script in package.json instead

* chore(gatsby-script): Lock gatsby-script dep to specific version

* refactor(gatsby-script): Do not pass collected scripts to avoid re-renders in SSR

* feat(gatsby-script): Collect scripts per page

* chore(gatsby-script): Bump alpha

* feat(gatsby-script): Proxy Partytown src urls

* chore(gatsby-script): Bump alpha

* chore(gatsby-script): Test redirects

* feat(gatsby-script): Conditionally inject Partytown snippet

* feat(gatsby-script): Gatsby serve support

* chore(gatsby-script): Remove test redirect
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 9, 2022
@marvinjude marvinjude force-pushed the script-component-same-script-warning branch from 6708675 to b5ef811 Compare May 9, 2022 05:18
@marvinjude marvinjude marked this pull request as draft May 9, 2022 05:21
@marvinjude marvinjude force-pushed the script-component-same-script-warning branch from 6c23fd9 to 9200820 Compare May 16, 2022 09:22
@marvinjude marvinjude added this to the Script Component milestone May 16, 2022
@tyhopp tyhopp marked this pull request as draft May 19, 2022 08:06
@tyhopp tyhopp force-pushed the script-component-same-script-warning branch from 9200820 to 55d5650 Compare May 19, 2022 08:07
Base automatically changed from feat-script-component to master May 19, 2022 13:01
@tyhopp
Copy link
Contributor

tyhopp commented May 20, 2022

Closing this to avoid a nasty rebase and use #35708 as a foundation for tests. Will mark Jude as a co-author for warning functionality

@tyhopp tyhopp closed this May 20, 2022
@tyhopp tyhopp removed this from the Script Component milestone May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants