mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Include hash of minimum modern versions in autoupdate versions.
This commit is contained in:
@@ -95,6 +95,12 @@ function getCaller(calleeName) {
|
||||
Object.assign(exports, {
|
||||
isModern,
|
||||
setMinimumBrowserVersions,
|
||||
calculateHashOfMinimumVersions() {
|
||||
const { createHash } = require("crypto");
|
||||
return createHash("sha1").update(
|
||||
JSON.stringify(minimumVersions)
|
||||
).digest("hex");
|
||||
}
|
||||
});
|
||||
|
||||
// For making defensive copies of [major, minor, ...] version arrays, so
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: "modern-browsers",
|
||||
version: "0.1.1",
|
||||
version: "0.1.2",
|
||||
summary: "API for defining the boundary between modern and legacy " +
|
||||
"JavaScript clients",
|
||||
documentation: "README.md"
|
||||
|
||||
@@ -14,7 +14,10 @@ import query from "qs-middleware";
|
||||
import parseRequest from "parseurl";
|
||||
import basicAuth from "basic-auth-connect";
|
||||
import { lookup as lookupUserAgent } from "useragent";
|
||||
import { isModern } from "meteor/modern-browsers";
|
||||
import {
|
||||
isModern,
|
||||
calculateHashOfMinimumVersions,
|
||||
} from "meteor/modern-browsers";
|
||||
import send from "send";
|
||||
import {
|
||||
removeExistingSocketFile,
|
||||
@@ -641,7 +644,15 @@ function runWebAppServer() {
|
||||
|
||||
const { AUTOUPDATE_VERSION } = process.env;
|
||||
const { PUBLIC_SETTINGS } = __meteor_runtime_config__;
|
||||
const configOverrides = { PUBLIC_SETTINGS };
|
||||
const configOverrides = {
|
||||
PUBLIC_SETTINGS,
|
||||
// Since the minimum modern versions defined in the modern-versions
|
||||
// package affect which bundle a given client receives, any changes
|
||||
// in those versions should trigger a corresponding change in the
|
||||
// versions calculated below.
|
||||
minimumModernVersionsHash: calculateHashOfMinimumVersions(),
|
||||
};
|
||||
|
||||
const program = {
|
||||
format: "web-program-pre1",
|
||||
manifest: manifest,
|
||||
|
||||
Reference in New Issue
Block a user