Drops user `<script>` tags and shows a warning in AMP mode. Right now they are only dropped in production mode and left in dev mode so the validator shows its warning since it looks like conflicting props log messages are being cleared causing them to not show.
Closes: #6688
Update tests to setup webdriver stuff in `jest-environment` and re-use one browser session instead of spawning one for each webdriver call to prevent creating too many BrowserStack sessions.
* form handler example: Update deps and fix build from dep update
* Ran lint error fixers
* Fixes errors that occur when commit occurs
* Commit linter fixes
* Add default viewport meta tag (fixes#6698)
* Do not inject default viewport when rendering an AMP document
* Remove redundant viewport on error page
* Plumb withSideEffect() to pass through props, then use that for isAmp.
* Add tests for viewport meta tag.
* Fix linting
* Update dedupes test
The with-google-analytics example had the "routeChangeComplete" event listener set up in components/Page.js, but that the event listener would only be set up if the user visited a page using that component. From the example, it's not clear if google analytics can be used without making every page use a component like components/Page.js. Someone following the example may make pages that don't use components/Page.js and fail to have page views reported, or feel compelled to force a shared component into their design unnecessarily, or might even make a mistake by making multiple different components like Page.js which each add a new "routeChangeComplete" event listener, causing page views to be over-reported when the user navigates between pages using the different components.
This PR moves the "routeChangeComplete" event listener into _app.js, where it's guaranteed to be executed for every page and is more obviously decoupled from page-layout-related components.
This PR also fixes a React warning about the lack of an onChange handler on an input tag, and removes the unnecessary implementation of `getInitialProps` in _document.js (the default implementation is inherited if not present, there's nothing this example needs to do with `getInitialProps` specifically, and the body of the method seems to have been based on an old version of next's internal implementation).
This PR also fixes the url being passed to google tag manager incorrectly. It looks like page_path should be used instead of page_location because the `url` value only has the path, not the full url with the domain name, etc. (https://developers.google.com/analytics/devguides/collection/gtagjs/pages)
Minor changes to examples. Updating major semver updates with only `package.json` changes.
I've done my best to make sure that these packages.json files all have `latest` for the `nextjs` package, `cross-env` for those with `server.js` files, etc.
I also added a `package.json` to `with-dynamic-app-layout` (it was missing one previously)
Made sure to test all of these packages post-upgrade to ensure maintained functionality
* Add err.sh link and pool validation results
to wait to show error until export is finished
* Fix wording in amp-export-validation err.sh
* Update validation error message
Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
* Update ways to fix text
Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
* Update why the error occurred wording
Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
* Update wording some more
Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
* [WIP] Use a shared module cache
* ID modules in development
* Revert "ID modules in development"
This reverts commit 0613d92fa2c8c7fa11a5ff5b7770d784af1cec63.
* Remove context replacement
* Only enable shared runtime in prod
* Sort settings
* Add shared runtime experimental setting
* only enable shared runtime in serverless
wrapping `startClock` in `bindActionsCreator` there's no need to pass `dispatch` in:
```
this.props.startClock(dispatch)
```
Furthermore `bindActionsCreator` is not needed because following already bind actions:
```
const mapDispatchToProps = {
startClock
};
```
* Simplify getDisplayName
* Don’t use array for single file
* Add aliases, drop htmlescape as it’s not longer in the codebase
* Add correct path
* Use the correct router
* Remove dynamic for now
* Mark as external as the modules are directly called
* Add comment explaining what this does
Because Typescript output is turned to commonjs for these modules currently it’s better to do this. Also convert withRouter to typescript, making it smaller.