mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: generate version range for deprecated versions (#7927)
This commit is contained in:
parent
be3fce5f9d
commit
acac3b3e32
@ -282,7 +282,7 @@ The following steps are needed to update the Chromium version.
|
||||
Not all revisions have builds for all platforms, so we need to find one that does.
|
||||
To do so, run `utils/check_availability.js -rd` to find the latest suitable `dev` Chromium revision (see `utils/check_availability.js -help` for more options).
|
||||
1. Update `src/revisions.ts` with the found revision number.
|
||||
1. Update `versions.js` with the new Chromium-to-Puppeteer version mapping.
|
||||
1. Update `versions.js` with the new Chromium-to-Puppeteer version mapping and update `lastMaintainedChromiumVersion` with the latest stable Chrome version.
|
||||
1. Run `npm run ensure-correct-devtools-protocol-revision`.
|
||||
If it fails, update `package.json` with the expected `devtools-protocol` version.
|
||||
1. Run `npm run tsc` and `npm install`.
|
||||
|
@ -38,7 +38,7 @@ async function run() {
|
||||
let changedFiles = false;
|
||||
|
||||
if (IS_RELEASE) {
|
||||
const versions = await Source.readFile(
|
||||
const { versionsPerRelease: versions } = await Source.readFile(
|
||||
path.join(PROJECT_DIR, 'versions.js')
|
||||
);
|
||||
versions.setText(
|
||||
|
@ -151,7 +151,7 @@ function generateTableOfContents(mdText) {
|
||||
}
|
||||
|
||||
const generateVersionsPerRelease = () => {
|
||||
const versionsPerRelease = require('../../../versions.js');
|
||||
const { versionsPerRelease } = require('../../../versions.js');
|
||||
const buffer = ['- Releases per Chromium version:'];
|
||||
for (const [chromiumVersion, puppeteerVersion] of versionsPerRelease) {
|
||||
if (puppeteerVersion === 'NEXT') continue;
|
||||
|
27
utils/get_deprecated_version_range.js
Normal file
27
utils/get_deprecated_version_range.js
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright 2022 Google Inc. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const {
|
||||
versionsPerRelease,
|
||||
lastMaintainedChromiumVersion,
|
||||
} = require('../versions.js');
|
||||
const version = versionsPerRelease.get(lastMaintainedChromiumVersion);
|
||||
if (version.toLowerCase() === 'next') {
|
||||
console.error('Unexpected NEXT Puppeteer version in versions.js');
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('< ' + version);
|
||||
process.exit(0);
|
14
versions.js
14
versions.js
@ -42,4 +42,16 @@ const versionsPerRelease = new Map([
|
||||
['73.0.3679.0', 'v1.12.2'],
|
||||
]);
|
||||
|
||||
module.exports = versionsPerRelease;
|
||||
// The same major version as the current Chrome Stable per https://chromestatus.com/roadmap.
|
||||
const lastMaintainedChromiumVersion = '97.0.4692.0';
|
||||
|
||||
if (!versionsPerRelease.has(lastMaintainedChromiumVersion)) {
|
||||
throw new Error(
|
||||
'lastMaintainedChromiumVersion is missing from versionsPerRelease'
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
versionsPerRelease,
|
||||
lastMaintainedChromiumVersion,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user