Replace direct puppeteer dependency with wrapper #134
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
All released versions of the website-scraper-puppeteer module adhere to a specific major version of Puppeteer. Puppeteer releases versions quickly, and the current version of the module(v1.1.0) uses puppeteer
20.2.*
which is deprecated and unsupportedSolutions
To handle this problem, 2 possible solutions were proposed
Solution 1
Release a new version of
website-scraper-puppeteer
every timepuppeteer
is released.Solution 2
Introduce a separate wrapper module that will cover dependency updates on its own, without requiring releases of this module.
Decision
Solution 2 was chosen to solve the problem.
It's done by introducing the separate wrapper module (@website-scraper/puppeteer-version-wrapper), which automatically releases a new minor version with updated puppeteer dependency after the tests pass.
Details
website-scraper-puppeteer
will depend on@website-scraper/puppeteer-version-wrapper@^1.0
.@website-scraper/puppeteer-version-wrapper
will automatically check for the new versions ofpuppeteer
using the Dependabot. PR is automatically merged after the tests are green.Merging to the main will trigger the publishing of the new version of the wrapper module on NPM.
It allows us to be sure that the module works properly with the latest versions of
puppeteer
What if tests fail?
In case tests fail and the BC-compatible fix could be implemented, it will be done within 1.x versions of the wrapper module.
In case a BC-compatible fix cannot be released, the next major version of the wrapper module will be released, and the requirement will be bumped in this module.