From 49b5e08f00de7827809471bd9eab29c0fd67bb1d Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 7 Apr 2021 17:43:44 +0200 Subject: [PATCH] build: update to latest @rollup/plugin-commonjs version Updates the project to the latest version of `@rollup/plugin-commonjs`. For this, `rollup` also needs to be updated as the peer dependency from the CommonJS plugin would not match otherwise. This results in a change in golden files as the rollup output is slightly different. We update the goldens as part of this commit. The update to the latest CommonJS rollup plugin version is in preparation of bundling the runfile helpers into a checked-in file. Since the runfile helpers use a dynamic import for loading the NodeJS patches script, the CommonJS rollup plugin needs to respect those. Currently the CommonJS plugin just invalidates the dynamic require, while the newer version allows us to preserve the dynamic CommonJS import as is. --- internal/node/node_patches.js | 157 +++++++++--------- package.json | 4 +- .../integration/golden.amd.js.map.sha256_ | 2 +- .../rollup/test/integration/golden.amd.js_ | 108 ++++++------ .../integration/golden.cjs.js.map.sha256_ | 2 +- .../rollup/test/integration/golden.cjs.js_ | 108 ++++++------ .../integration/golden.esm.js.map.sha256_ | 2 +- .../rollup/test/integration/golden.esm.js_ | 108 ++++++------ .../integration/golden.iife.js.map.sha256_ | 2 +- .../rollup/test/integration/golden.iife.js_ | 110 ++++++------ .../integration/golden.system.js.map.sha256_ | 2 +- .../rollup/test/integration/golden.system.js_ | 108 ++++++------ .../integration/golden.umd.js.map.sha256_ | 2 +- .../test/integration/golden.umd.js.sha256_ | 2 +- .../rollup/test/integration/golden.umd.js_ | 110 ++++++------ yarn.lock | 67 ++++---- 16 files changed, 452 insertions(+), 442 deletions(-) diff --git a/internal/node/node_patches.js b/internal/node/node_patches.js index fce861f9cf..2f8e35c661 100644 --- a/internal/node/node_patches.js +++ b/internal/node/node_patches.js @@ -1,29 +1,24 @@ // clang-format off 'use strict'; -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } +var path = require('path'); +var util = require('util'); +var fs$2 = require('fs'); -var path = _interopDefault(require('path')); -var util = _interopDefault(require('util')); -var fs$1 = _interopDefault(require('fs')); +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +var path__default = /*#__PURE__*/_interopDefaultLegacy(path); +var util__default = /*#__PURE__*/_interopDefaultLegacy(util); +var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$2); -function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; -} +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; } -var fs = createCommonjsModule(function (module, exports) { +var fs$1 = createCommonjsModule(function (module, exports) { /** * @license * Copyright 2019 The Bazel Authors. All rights reserved. @@ -67,8 +62,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); // es modules // tslint:disable-next-line:no-any -exports.patcher = (fs = fs$1, roots) => { - fs = fs || fs$1; +exports.patcher = (fs = fs__default['default'], roots) => { + fs = fs || fs__default['default']; roots = roots || []; roots = roots.filter(root => fs.existsSync(root)); if (!roots.length) { @@ -99,7 +94,7 @@ exports.patcher = (fs = fs$1, roots) => { args[args.length - 1] = (err, stats) => { if (err) return cb(err); - const linkPath = path.resolve(args[0]); + path__default['default'].resolve(args[0]); if (!stats.isSymbolicLink()) { return cb(null, stats); } @@ -120,7 +115,7 @@ exports.patcher = (fs = fs$1, roots) => { return cb(err); } } - str = path.resolve(path.dirname(args[0]), str); + str = path__default['default'].resolve(path__default['default'].dirname(args[0]), str); if (isEscape(str, args[0])) { // if it's an out link we have to return the original stat. return origStat(args[0], (err, plainStat) => { @@ -147,7 +142,7 @@ exports.patcher = (fs = fs$1, roots) => { if (err) return cb(err); if (isEscape(str, args[0])) { - cb(false, path.resolve(args[0])); + cb(false, path__default['default'].resolve(args[0])); } else { cb(false, str); @@ -165,7 +160,7 @@ exports.patcher = (fs = fs$1, roots) => { if (err) return cb(err); if (isEscape(str, args[0])) { - cb(false, path.resolve(args[0])); + cb(false, path__default['default'].resolve(args[0])); } else { cb(false, str); @@ -180,9 +175,9 @@ exports.patcher = (fs = fs$1, roots) => { if (cb) { cb = once(cb); args[args.length - 1] = (err, str) => { - args[0] = path.resolve(args[0]); + args[0] = path__default['default'].resolve(args[0]); if (str) - str = path.resolve(path.dirname(args[0]), str); + str = path__default['default'].resolve(path__default['default'].dirname(args[0]), str); if (err) return cb(err); if (isEscape(str, args[0])) { @@ -200,13 +195,13 @@ exports.patcher = (fs = fs$1, roots) => { // tslint:disable-next-line:no-any fs.lstatSync = (...args) => { const stats = origLstatSync(...args); - const linkPath = path.resolve(args[0]); + const linkPath = path__default['default'].resolve(args[0]); if (!stats.isSymbolicLink()) { return stats; } let linkTarget; try { - linkTarget = path.resolve(path.dirname(args[0]), origReadlinkSync(linkPath)); + linkTarget = path__default['default'].resolve(path__default['default'].dirname(args[0]), origReadlinkSync(linkPath)); } catch (e) { if (e.code === 'ENOENT') { @@ -232,7 +227,7 @@ exports.patcher = (fs = fs$1, roots) => { fs.realpathSync = (...args) => { const str = origRealpathSync(...args); if (isEscape(str, args[0])) { - return path.resolve(args[0]); + return path__default['default'].resolve(args[0]); } return str; }; @@ -240,14 +235,14 @@ exports.patcher = (fs = fs$1, roots) => { fs.realpathSync.native = (...args) => { const str = origRealpathSyncNative(...args); if (isEscape(str, args[0])) { - return path.resolve(args[0]); + return path__default['default'].resolve(args[0]); } return str; }; // tslint:disable-next-line:no-any fs.readlinkSync = (...args) => { - args[0] = path.resolve(args[0]); - const str = path.resolve(path.dirname(args[0]), origReadlinkSync(...args)); + args[0] = path__default['default'].resolve(args[0]); + const str = path__default['default'].resolve(path__default['default'].dirname(args[0]), origReadlinkSync(...args)); if (isEscape(str, args[0]) || str === args[0]) { const e = new Error('EINVAL: invalid argument, readlink \'' + args[0] + '\''); // tslint:disable-next-line:no-any @@ -258,7 +253,7 @@ exports.patcher = (fs = fs$1, roots) => { }; // tslint:disable-next-line:no-any fs.readdir = (...args) => { - const p = path.resolve(args[0]); + const p = path__default['default'].resolve(args[0]); let cb = args[args.length - 1]; if (typeof cb !== 'function') { // this will likely throw callback required error. @@ -288,7 +283,7 @@ exports.patcher = (fs = fs$1, roots) => { // tslint:disable-next-line:no-any fs.readdirSync = (...args) => { const res = origReaddirSync(...args); - const p = path.resolve(args[0]); + const p = path__default['default'].resolve(args[0]); // tslint:disable-next-line:no-any res.forEach((v) => { handleDirentSync(p, v); @@ -337,7 +332,7 @@ exports.patcher = (fs = fs$1, roots) => { }; } async function handleDir(dir) { - const p = path.resolve(dir.path); + const p = path__default['default'].resolve(dir.path); const origIterator = dir[Symbol.asyncIterator].bind(dir); // tslint:disable-next-line:no-any const origRead = dir.read.bind(dir); @@ -390,25 +385,25 @@ exports.patcher = (fs = fs$1, roots) => { handleCounter++; return new Promise((resolve, reject) => { if (fs.DEBUG) - console.error(handleCounter + ' opendir: found link? ', path.join(p, v.name), v.isSymbolicLink()); + console.error(handleCounter + ' opendir: found link? ', path__default['default'].join(p, v.name), v.isSymbolicLink()); if (!v.isSymbolicLink()) { return resolve(v); } - const linkName = path.join(p, v.name); + const linkName = path__default['default'].join(p, v.name); origReadlink(linkName, (err, target) => { if (err) { return reject(err); } if (fs.DEBUG) - console.error(handleCounter + ' opendir: escapes? [target]', path.resolve(target), '[link] ' + linkName, isEscape(path.resolve(target), linkName), roots); - if (!isEscape(path.resolve(target), linkName)) { + console.error(handleCounter + ' opendir: escapes? [target]', path__default['default'].resolve(target), '[link] ' + linkName, isEscape(path__default['default'].resolve(target), linkName), roots); + if (!isEscape(path__default['default'].resolve(target), linkName)) { return resolve(v); } fs.stat(target, (err, stat) => { if (err) { if (err.code === 'ENOENT') { if (fs.DEBUG) - console.error(handleCounter + ' opendir: broken link! resolving to link ', path.resolve(target)); + console.error(handleCounter + ' opendir: broken link! resolving to link ', path__default['default'].resolve(target)); // this is a broken symlink // even though this broken symlink points outside of the root // we'll return it. @@ -423,7 +418,7 @@ exports.patcher = (fs = fs$1, roots) => { return reject(err); } if (fs.DEBUG) - console.error(handleCounter + ' opendir: patching dirent to look like it\'s target', path.resolve(target)); + console.error(handleCounter + ' opendir: patching dirent to look like it\'s target', path__default['default'].resolve(target)); // add all stat is methods to Dirent instances with their result. patchDirent(v, stat); v.isSymbolicLink = () => false; @@ -436,8 +431,8 @@ exports.patcher = (fs = fs$1, roots) => { if (v && v.isSymbolicLink) { if (v.isSymbolicLink()) { // any errors thrown here are valid. things like transient fs errors - const target = path.resolve(p, origReadlinkSync(path.join(p, v.name))); - if (isEscape(target, path.join(p, v.name))) { + const target = path__default['default'].resolve(p, origReadlinkSync(path__default['default'].join(p, v.name))); + if (isEscape(target, path__default['default'].join(p, v.name))) { // Dirent exposes file type so if we want to hide that this is a link // we need to find out if it's a file or directory. v.isSymbolicLink = () => false; @@ -463,13 +458,13 @@ exports.patcher = (fs = fs$1, roots) => { if (promisePropertyDescriptor) { // tslint:disable-next-line:no-any const promises = {}; - promises.lstat = util.promisify(fs.lstat); + promises.lstat = util__default['default'].promisify(fs.lstat); // NOTE: node core uses the newer realpath function fs.promises.native instead of fs.realPath - promises.realpath = util.promisify(fs.realpath.native); - promises.readlink = util.promisify(fs.readlink); - promises.readdir = util.promisify(fs.readdir); + promises.realpath = util__default['default'].promisify(fs.realpath.native); + promises.readlink = util__default['default'].promisify(fs.readlink); + promises.readdir = util__default['default'].promisify(fs.readdir); if (fs.opendir) - promises.opendir = util.promisify(fs.opendir); + promises.opendir = util__default['default'].promisify(fs.opendir); // handle experimental api warnings. // only applies to version of node where promises is a getter property. if (promisePropertyDescriptor.get) { @@ -489,18 +484,18 @@ exports.patcher = (fs = fs$1, roots) => { } }; function isOutPath(root, str) { - return !root || (!str.startsWith(root + path.sep) && str !== root); + return !root || (!str.startsWith(root + path__default['default'].sep) && str !== root); } exports.isOutPath = isOutPath; exports.escapeFunction = (roots) => { // ensure roots are always absolute - roots = roots.map(root => path.resolve(root)); + roots = roots.map(root => path__default['default'].resolve(root)); function isEscape(linkTarget, linkPath) { - if (!path.isAbsolute(linkPath)) { - linkPath = path.resolve(linkPath); + if (!path__default['default'].isAbsolute(linkPath)) { + linkPath = path__default['default'].resolve(linkPath); } - if (!path.isAbsolute(linkTarget)) { - linkTarget = path.resolve(linkTarget); + if (!path__default['default'].isAbsolute(linkTarget)) { + linkTarget = path__default['default'].resolve(linkTarget); } for (const root of roots) { if (isOutPath(root, linkTarget) && !isOutPath(root, linkPath)) { @@ -535,18 +530,16 @@ function once(fn) { } }); -var subprocess = createCommonjsModule(function (module, exports) { -Object.defineProperty(exports, "__esModule", { value: true }); // this does not actually patch child_process // but adds support to ensure the registered loader is included in all nested executions of nodejs. -exports.patcher = (requireScriptName, nodeDir) => { - requireScriptName = path.resolve(requireScriptName); - nodeDir = nodeDir || path.join(path.dirname(requireScriptName), '_node_bin'); - const file = path.basename(requireScriptName); +var patcher = (requireScriptName, nodeDir) => { + requireScriptName = path__default['default'].resolve(requireScriptName); + nodeDir = nodeDir || path__default['default'].join(path__default['default'].dirname(requireScriptName), '_node_bin'); + const file = path__default['default'].basename(requireScriptName); try { - fs$1.mkdirSync(nodeDir, { recursive: true }); + fs__default['default'].mkdirSync(nodeDir, { recursive: true }); } catch (e) { // with node versions that don't have recursive mkdir this may throw an error. @@ -555,9 +548,9 @@ exports.patcher = (requireScriptName, nodeDir) => { } } if (process.platform == 'win32') { - const nodeEntry = path.join(nodeDir, 'node.bat'); - if (!fs$1.existsSync(nodeEntry)) { - fs$1.writeFileSync(nodeEntry, `@if not defined DEBUG_HELPER @ECHO OFF + const nodeEntry = path__default['default'].join(nodeDir, 'node.bat'); + if (!fs__default['default'].existsSync(nodeEntry)) { + fs__default['default'].writeFileSync(nodeEntry, `@if not defined DEBUG_HELPER @ECHO OFF set NP_SUBPROCESS_NODE_DIR=${nodeDir} set Path=${nodeDir};%Path% "${process.execPath}" ${process.env.NODE_REPOSITORY_ARGS} --require "${requireScriptName}" %* @@ -565,9 +558,9 @@ set Path=${nodeDir};%Path% } } else { - const nodeEntry = path.join(nodeDir, 'node'); - if (!fs$1.existsSync(nodeEntry)) { - fs$1.writeFileSync(nodeEntry, `#!/bin/bash + const nodeEntry = path__default['default'].join(nodeDir, 'node'); + if (!fs__default['default'].existsSync(nodeEntry)) { + fs__default['default'].writeFileSync(nodeEntry, `#!/bin/bash export NP_SUBPROCESS_NODE_DIR="${nodeDir}" export PATH="${nodeDir}":\$PATH if [[ ! "\${@}" =~ "${file}" ]]; then @@ -581,13 +574,13 @@ fi if (!process.env.PATH) { process.env.PATH = nodeDir; } - else if (process.env.PATH.indexOf(nodeDir + path.delimiter) === -1) { - process.env.PATH = nodeDir + path.delimiter + process.env.PATH; + else if (process.env.PATH.indexOf(nodeDir + path__default['default'].delimiter) === -1) { + process.env.PATH = nodeDir + path__default['default'].delimiter + process.env.PATH; } // fix execPath so folks use the proxy node if (process.platform == 'win32') ; else { - process.argv[0] = process.execPath = path.join(nodeDir, 'node'); + process.argv[0] = process.execPath = path__default['default'].join(nodeDir, 'node'); } // replace any instances of require script in execArgv with the absolute path to the script. // example: bazel-require-script.js @@ -598,10 +591,11 @@ fi return v; }); }; -}); -var src = createCommonjsModule(function (module, exports) { -Object.defineProperty(exports, "__esModule", { value: true }); +var subprocess$1 = /*#__PURE__*/Object.defineProperty({ + patcher: patcher +}, '__esModule', {value: true}); + /** * @license * Copyright 2019 The Bazel Authors. All rights reserved. @@ -620,9 +614,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); */ -exports.fs = fs.patcher; -exports.subprocess = subprocess.patcher; -}); +var fs = fs$1.patcher; +var subprocess = subprocess$1.patcher; + +var src = /*#__PURE__*/Object.defineProperty({ + fs: fs, + subprocess: subprocess +}, '__esModule', {value: true}); /** * @license @@ -640,6 +638,7 @@ exports.subprocess = subprocess.patcher; * See the License for the specific language governing permissions and * limitations under the License. */ + /** * @fileoverview Description of this file. */ @@ -649,10 +648,16 @@ if (BAZEL_PATCH_ROOTS) { const roots = BAZEL_PATCH_ROOTS ? BAZEL_PATCH_ROOTS.split(',') : []; if (VERBOSE_LOGS) console.error(`bazel node patches enabled. roots: ${roots} symlinks in these directories will not escape`); - const fs = fs$1; + const fs = fs__default['default']; src.fs(fs, roots); } else if (VERBOSE_LOGS) { console.error(`bazel node patches disabled. set environment BAZEL_PATCH_ROOTS`); } src.subprocess(__filename, NP_SUBPROCESS_NODE_DIR); + +var register = { + +}; + +module.exports = register; diff --git a/package.json b/package.json index 88ed37c8ec..498a5ac3fd 100644 --- a/package.json +++ b/package.json @@ -75,9 +75,9 @@ "protobufjs": "6.8.8", "protractor": "^5.4.2", "requirejs": "2.3.6", - "rollup": "2.3.4", + "rollup": "2.44.0", "rollup-plugin-amd": "4.0.0", - "@rollup/plugin-commonjs": "14.0.0", + "@rollup/plugin-commonjs": "18.0.0", "@rollup/plugin-json": "4.1.0", "@rollup/plugin-node-resolve": "8.4.0", "rxjs": "^6.5.2", diff --git a/packages/rollup/test/integration/golden.amd.js.map.sha256_ b/packages/rollup/test/integration/golden.amd.js.map.sha256_ index 171382c002..eabab1f10e 100644 --- a/packages/rollup/test/integration/golden.amd.js.map.sha256_ +++ b/packages/rollup/test/integration/golden.amd.js.map.sha256_ @@ -1 +1 @@ -c924104f49b195bc75b35b75e0b2ef151c06d920a7fbef8788dff3af1ee673df \ No newline at end of file +67c2d1c41362085ed0cdf54cf039cbe8f8e70dbbfad49b2e26d5ca33bf6af406 \ No newline at end of file diff --git a/packages/rollup/test/integration/golden.amd.js_ b/packages/rollup/test/integration/golden.amd.js_ index 5a610f29ab..13252317fe 100644 --- a/packages/rollup/test/integration/golden.amd.js_ +++ b/packages/rollup/test/integration/golden.amd.js_ @@ -9,7 +9,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var far_a_b_c = `@far/a/b/c`; - var MILLISECONDS_IN_MINUTE = 60000; + var MILLISECONDS_IN_MINUTE$6 = 60000; /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. @@ -26,9 +26,9 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var date = new Date(dirtyDate.getTime()); var baseTimezoneOffset = date.getTimezoneOffset(); date.setSeconds(0, 0); - var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE; + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE$6; - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE$6 + millisecondsPartOfTimezoneOffset }; /** @@ -52,8 +52,8 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var is_date = isDate; - var MILLISECONDS_IN_HOUR = 3600000; - var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_MINUTE$5 = 60000; var DEFAULT_ADDITIONAL_DIGITS = 2; var parseTokenDateTimeDelimeter = /[T ]/; @@ -159,7 +159,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us } if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$1; + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$5; } else { var fullTime = timestamp + time; var fullTimeDate = new Date(fullTime); @@ -315,7 +315,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us token = parseTokenHH.exec(timeString); if (token) { hours = parseFloat(token[1].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + return (hours % 24) * MILLISECONDS_IN_HOUR$2 } // hh:mm or hhmm @@ -323,8 +323,8 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us if (token) { hours = parseInt(token[1], 10); minutes = parseFloat(token[2].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 } // hh:mm:ss or hhmmss @@ -333,8 +333,8 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us hours = parseInt(token[1], 10); minutes = parseInt(token[2], 10); var seconds = parseFloat(token[3].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 + seconds * 1000 } @@ -614,8 +614,8 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var start_of_day = startOfDay; - var MILLISECONDS_IN_MINUTE$2 = 60000; - var MILLISECONDS_IN_DAY = 86400000; + var MILLISECONDS_IN_MINUTE$4 = 60000; + var MILLISECONDS_IN_DAY$1 = 86400000; /** * @category Day Helpers @@ -642,14 +642,14 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var startOfDayRight = start_of_day(dirtyDateRight); var timestampLeft = startOfDayLeft.getTime() - - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; var timestampRight = startOfDayRight.getTime() - - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; // Round the number of days to the nearest integer // because the number of milliseconds in a day is not constant // (e.g. it's different in the day of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$1) } var difference_in_calendar_days = differenceInCalendarDays; @@ -1127,8 +1127,8 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var compare_desc = compareDesc; - var MILLISECONDS_IN_MINUTE$4 = 60000; - var MILLISECONDS_IN_WEEK = 604800000; + var MILLISECONDS_IN_MINUTE$2 = 60000; + var MILLISECONDS_IN_WEEK$3 = 604800000; /** * @category ISO Week Helpers @@ -1156,14 +1156,14 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var startOfISOWeekRight = start_of_iso_week(dirtyDateRight); var timestampLeft = startOfISOWeekLeft.getTime() - - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; var timestampRight = startOfISOWeekRight.getTime() - - startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$3) } var difference_in_calendar_iso_weeks = differenceInCalendarISOWeeks; @@ -1280,8 +1280,8 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var difference_in_calendar_quarters = differenceInCalendarQuarters; - var MILLISECONDS_IN_MINUTE$5 = 60000; - var MILLISECONDS_IN_WEEK$1 = 604800000; + var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_WEEK$2 = 604800000; /** * @category Week Helpers @@ -1319,14 +1319,14 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var startOfWeekRight = start_of_week(dirtyDateRight, dirtyOptions); var timestampLeft = startOfWeekLeft.getTime() - - startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; var timestampRight = startOfWeekRight.getTime() - - startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$1) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$2) } var difference_in_calendar_weeks = differenceInCalendarWeeks; @@ -1423,7 +1423,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var difference_in_milliseconds = differenceInMilliseconds; - var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_HOUR = 3600000; /** * @category Hour Helpers @@ -1445,7 +1445,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us * //=> 12 */ function differenceInHours (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR$2; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1514,7 +1514,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var difference_in_iso_years = differenceInISOYears; - var MILLISECONDS_IN_MINUTE$6 = 60000; + var MILLISECONDS_IN_MINUTE = 60000; /** * @category Minute Helpers @@ -1536,7 +1536,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us * //=> 12 */ function differenceInMinutes (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE$6; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1916,9 +1916,9 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us format: build_format_locale() }; - var MINUTES_IN_DAY = 1440; + var MINUTES_IN_DAY$1 = 1440; var MINUTES_IN_ALMOST_TWO_DAYS = 2520; - var MINUTES_IN_MONTH = 43200; + var MINUTES_IN_MONTH$1 = 43200; var MINUTES_IN_TWO_MONTHS = 86400; /** @@ -2066,7 +2066,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us return localize('aboutXHours', 1, localizeOptions) // 1.5 hrs up to 24 hrs - } else if (minutes < MINUTES_IN_DAY) { + } else if (minutes < MINUTES_IN_DAY$1) { var hours = Math.round(minutes / 60); return localize('aboutXHours', hours, localizeOptions) @@ -2075,13 +2075,13 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us return localize('xDays', 1, localizeOptions) // 1.75 days up to 30 days - } else if (minutes < MINUTES_IN_MONTH) { - var days = Math.round(minutes / MINUTES_IN_DAY); + } else if (minutes < MINUTES_IN_MONTH$1) { + var days = Math.round(minutes / MINUTES_IN_DAY$1); return localize('xDays', days, localizeOptions) // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { - months = Math.round(minutes / MINUTES_IN_MONTH); + months = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('aboutXMonths', months, localizeOptions) } @@ -2089,7 +2089,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us // 2 months up to 12 months if (months < 12) { - var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('xMonths', nearestMonth, localizeOptions) // 1 year up to max Date @@ -2114,8 +2114,8 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var distance_in_words = distanceInWords; - var MINUTES_IN_DAY$1 = 1440; - var MINUTES_IN_MONTH$1 = 43200; + var MINUTES_IN_DAY = 1440; + var MINUTES_IN_MONTH = 43200; var MINUTES_IN_YEAR = 525600; /** @@ -2241,9 +2241,9 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us unit = 's'; } else if (minutes < 60) { unit = 'm'; - } else if (minutes < MINUTES_IN_DAY$1) { + } else if (minutes < MINUTES_IN_DAY) { unit = 'h'; - } else if (minutes < MINUTES_IN_MONTH$1) { + } else if (minutes < MINUTES_IN_MONTH) { unit = 'd'; } else if (minutes < MINUTES_IN_YEAR) { unit = 'M'; @@ -2267,12 +2267,12 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us // 1 up to 30 days } else if (unit === 'd') { - days = mathPartial(minutes / MINUTES_IN_DAY$1); + days = mathPartial(minutes / MINUTES_IN_DAY); return localize('xDays', days, localizeOptions) // 1 up to 12 months } else if (unit === 'M') { - months = mathPartial(minutes / MINUTES_IN_MONTH$1); + months = mathPartial(minutes / MINUTES_IN_MONTH); return localize('xMonths', months, localizeOptions) // 1 year up to max Date @@ -2816,7 +2816,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var get_day_of_year = getDayOfYear; - var MILLISECONDS_IN_WEEK$2 = 604800000; + var MILLISECONDS_IN_WEEK$1 = 604800000; /** * @category ISO Week Helpers @@ -2842,7 +2842,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$2) + 1 + return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1 } var get_iso_week = getISOWeek; @@ -3347,7 +3347,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var get_iso_day = getISODay; - var MILLISECONDS_IN_WEEK$3 = 604800000; + var MILLISECONDS_IN_WEEK = 604800000; /** * @category ISO Week-Numbering Year Helpers @@ -3373,7 +3373,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us // Round the number of weeks to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$3) + return Math.round(diff / MILLISECONDS_IN_WEEK) } var get_iso_weeks_in_year = getISOWeeksInYear; @@ -3447,7 +3447,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var get_month = getMonth; - var MILLISECONDS_IN_DAY$1 = 24 * 60 * 60 * 1000; + var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; /** * @category Range Helpers @@ -3503,7 +3503,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us var differenceInMs = overlapEndDate - overlapStartDate; - return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY$1) + return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY) } var get_overlapping_days_in_ranges = getOverlappingDaysInRanges; @@ -5643,14 +5643,14 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us const user = "user"; - const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo = `Sunnyvale ${user} ${date}`; + const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo$2 = `Sunnyvale ${user} ${date$2}`; const date$1 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); const foo$1 = `@foo/lib/a ${date$1}`; - const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo$2 = `@foo/lib/a/a/a ${date$2}`; + const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo = `@foo/lib/a/a/a ${date}`; const fum = 'Wonderland'; @@ -5661,7 +5661,7 @@ define(['exports', 'some_global_var'], function (exports, some_global_var) { 'us const json_key = "json_value"; console.log( - `${hello}, ${name} in ${fum} ${foo} ${foo$1} ${foo$2} ${far_a} ${far_a_b_c} ${json_key}`); + `${hello}, ${name} in ${fum} ${foo$2} ${foo$1} ${foo} ${far_a} ${far_a_b_c} ${json_key}`); // Test for sequences = false class A { diff --git a/packages/rollup/test/integration/golden.cjs.js.map.sha256_ b/packages/rollup/test/integration/golden.cjs.js.map.sha256_ index 13fb35c366..4a1b5a1fdf 100644 --- a/packages/rollup/test/integration/golden.cjs.js.map.sha256_ +++ b/packages/rollup/test/integration/golden.cjs.js.map.sha256_ @@ -1 +1 @@ -86daf398a91b909de1ba663bad9aeff0373fa7e859c304308d6e98d341c7bbc1 \ No newline at end of file +7968687ed52c81d2622e22e914927b8acacf641b10097bdf7ca2dedbbc361f26 \ No newline at end of file diff --git a/packages/rollup/test/integration/golden.cjs.js_ b/packages/rollup/test/integration/golden.cjs.js_ index da9d771c12..ed017ef339 100644 --- a/packages/rollup/test/integration/golden.cjs.js_ +++ b/packages/rollup/test/integration/golden.cjs.js_ @@ -13,7 +13,7 @@ var far_a = `@far/a`; var far_a_b_c = `@far/a/b/c`; -var MILLISECONDS_IN_MINUTE = 60000; +var MILLISECONDS_IN_MINUTE$6 = 60000; /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. @@ -30,9 +30,9 @@ var getTimezoneOffsetInMilliseconds = function getTimezoneOffsetInMilliseconds ( var date = new Date(dirtyDate.getTime()); var baseTimezoneOffset = date.getTimezoneOffset(); date.setSeconds(0, 0); - var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE; + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE$6; - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE$6 + millisecondsPartOfTimezoneOffset }; /** @@ -56,8 +56,8 @@ function isDate (argument) { var is_date = isDate; -var MILLISECONDS_IN_HOUR = 3600000; -var MILLISECONDS_IN_MINUTE$1 = 60000; +var MILLISECONDS_IN_HOUR$2 = 3600000; +var MILLISECONDS_IN_MINUTE$5 = 60000; var DEFAULT_ADDITIONAL_DIGITS = 2; var parseTokenDateTimeDelimeter = /[T ]/; @@ -163,7 +163,7 @@ function parse (argument, dirtyOptions) { } if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$1; + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$5; } else { var fullTime = timestamp + time; var fullTimeDate = new Date(fullTime); @@ -319,7 +319,7 @@ function parseTime (timeString) { token = parseTokenHH.exec(timeString); if (token) { hours = parseFloat(token[1].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + return (hours % 24) * MILLISECONDS_IN_HOUR$2 } // hh:mm or hhmm @@ -327,8 +327,8 @@ function parseTime (timeString) { if (token) { hours = parseInt(token[1], 10); minutes = parseFloat(token[2].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 } // hh:mm:ss or hhmmss @@ -337,8 +337,8 @@ function parseTime (timeString) { hours = parseInt(token[1], 10); minutes = parseInt(token[2], 10); var seconds = parseFloat(token[3].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 + seconds * 1000 } @@ -618,8 +618,8 @@ function startOfDay (dirtyDate) { var start_of_day = startOfDay; -var MILLISECONDS_IN_MINUTE$2 = 60000; -var MILLISECONDS_IN_DAY = 86400000; +var MILLISECONDS_IN_MINUTE$4 = 60000; +var MILLISECONDS_IN_DAY$1 = 86400000; /** * @category Day Helpers @@ -646,14 +646,14 @@ function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) { var startOfDayRight = start_of_day(dirtyDateRight); var timestampLeft = startOfDayLeft.getTime() - - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; var timestampRight = startOfDayRight.getTime() - - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; // Round the number of days to the nearest integer // because the number of milliseconds in a day is not constant // (e.g. it's different in the day of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$1) } var difference_in_calendar_days = differenceInCalendarDays; @@ -1131,8 +1131,8 @@ function compareDesc (dirtyDateLeft, dirtyDateRight) { var compare_desc = compareDesc; -var MILLISECONDS_IN_MINUTE$4 = 60000; -var MILLISECONDS_IN_WEEK = 604800000; +var MILLISECONDS_IN_MINUTE$2 = 60000; +var MILLISECONDS_IN_WEEK$3 = 604800000; /** * @category ISO Week Helpers @@ -1160,14 +1160,14 @@ function differenceInCalendarISOWeeks (dirtyDateLeft, dirtyDateRight) { var startOfISOWeekRight = start_of_iso_week(dirtyDateRight); var timestampLeft = startOfISOWeekLeft.getTime() - - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; var timestampRight = startOfISOWeekRight.getTime() - - startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$3) } var difference_in_calendar_iso_weeks = differenceInCalendarISOWeeks; @@ -1284,8 +1284,8 @@ function differenceInCalendarQuarters (dirtyDateLeft, dirtyDateRight) { var difference_in_calendar_quarters = differenceInCalendarQuarters; -var MILLISECONDS_IN_MINUTE$5 = 60000; -var MILLISECONDS_IN_WEEK$1 = 604800000; +var MILLISECONDS_IN_MINUTE$1 = 60000; +var MILLISECONDS_IN_WEEK$2 = 604800000; /** * @category Week Helpers @@ -1323,14 +1323,14 @@ function differenceInCalendarWeeks (dirtyDateLeft, dirtyDateRight, dirtyOptions) var startOfWeekRight = start_of_week(dirtyDateRight, dirtyOptions); var timestampLeft = startOfWeekLeft.getTime() - - startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; var timestampRight = startOfWeekRight.getTime() - - startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$1) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$2) } var difference_in_calendar_weeks = differenceInCalendarWeeks; @@ -1427,7 +1427,7 @@ function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) { var difference_in_milliseconds = differenceInMilliseconds; -var MILLISECONDS_IN_HOUR$2 = 3600000; +var MILLISECONDS_IN_HOUR = 3600000; /** * @category Hour Helpers @@ -1449,7 +1449,7 @@ var MILLISECONDS_IN_HOUR$2 = 3600000; * //=> 12 */ function differenceInHours (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR$2; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1518,7 +1518,7 @@ function differenceInISOYears (dirtyDateLeft, dirtyDateRight) { var difference_in_iso_years = differenceInISOYears; -var MILLISECONDS_IN_MINUTE$6 = 60000; +var MILLISECONDS_IN_MINUTE = 60000; /** * @category Minute Helpers @@ -1540,7 +1540,7 @@ var MILLISECONDS_IN_MINUTE$6 = 60000; * //=> 12 */ function differenceInMinutes (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE$6; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1920,9 +1920,9 @@ var en = { format: build_format_locale() }; -var MINUTES_IN_DAY = 1440; +var MINUTES_IN_DAY$1 = 1440; var MINUTES_IN_ALMOST_TWO_DAYS = 2520; -var MINUTES_IN_MONTH = 43200; +var MINUTES_IN_MONTH$1 = 43200; var MINUTES_IN_TWO_MONTHS = 86400; /** @@ -2070,7 +2070,7 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { return localize('aboutXHours', 1, localizeOptions) // 1.5 hrs up to 24 hrs - } else if (minutes < MINUTES_IN_DAY) { + } else if (minutes < MINUTES_IN_DAY$1) { var hours = Math.round(minutes / 60); return localize('aboutXHours', hours, localizeOptions) @@ -2079,13 +2079,13 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { return localize('xDays', 1, localizeOptions) // 1.75 days up to 30 days - } else if (minutes < MINUTES_IN_MONTH) { - var days = Math.round(minutes / MINUTES_IN_DAY); + } else if (minutes < MINUTES_IN_MONTH$1) { + var days = Math.round(minutes / MINUTES_IN_DAY$1); return localize('xDays', days, localizeOptions) // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { - months = Math.round(minutes / MINUTES_IN_MONTH); + months = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('aboutXMonths', months, localizeOptions) } @@ -2093,7 +2093,7 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { // 2 months up to 12 months if (months < 12) { - var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('xMonths', nearestMonth, localizeOptions) // 1 year up to max Date @@ -2118,8 +2118,8 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { var distance_in_words = distanceInWords; -var MINUTES_IN_DAY$1 = 1440; -var MINUTES_IN_MONTH$1 = 43200; +var MINUTES_IN_DAY = 1440; +var MINUTES_IN_MONTH = 43200; var MINUTES_IN_YEAR = 525600; /** @@ -2245,9 +2245,9 @@ function distanceInWordsStrict (dirtyDateToCompare, dirtyDate, dirtyOptions) { unit = 's'; } else if (minutes < 60) { unit = 'm'; - } else if (minutes < MINUTES_IN_DAY$1) { + } else if (minutes < MINUTES_IN_DAY) { unit = 'h'; - } else if (minutes < MINUTES_IN_MONTH$1) { + } else if (minutes < MINUTES_IN_MONTH) { unit = 'd'; } else if (minutes < MINUTES_IN_YEAR) { unit = 'M'; @@ -2271,12 +2271,12 @@ function distanceInWordsStrict (dirtyDateToCompare, dirtyDate, dirtyOptions) { // 1 up to 30 days } else if (unit === 'd') { - days = mathPartial(minutes / MINUTES_IN_DAY$1); + days = mathPartial(minutes / MINUTES_IN_DAY); return localize('xDays', days, localizeOptions) // 1 up to 12 months } else if (unit === 'M') { - months = mathPartial(minutes / MINUTES_IN_MONTH$1); + months = mathPartial(minutes / MINUTES_IN_MONTH); return localize('xMonths', months, localizeOptions) // 1 year up to max Date @@ -2820,7 +2820,7 @@ function getDayOfYear (dirtyDate) { var get_day_of_year = getDayOfYear; -var MILLISECONDS_IN_WEEK$2 = 604800000; +var MILLISECONDS_IN_WEEK$1 = 604800000; /** * @category ISO Week Helpers @@ -2846,7 +2846,7 @@ function getISOWeek (dirtyDate) { // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$2) + 1 + return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1 } var get_iso_week = getISOWeek; @@ -3351,7 +3351,7 @@ function getISODay (dirtyDate) { var get_iso_day = getISODay; -var MILLISECONDS_IN_WEEK$3 = 604800000; +var MILLISECONDS_IN_WEEK = 604800000; /** * @category ISO Week-Numbering Year Helpers @@ -3377,7 +3377,7 @@ function getISOWeeksInYear (dirtyDate) { // Round the number of weeks to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$3) + return Math.round(diff / MILLISECONDS_IN_WEEK) } var get_iso_weeks_in_year = getISOWeeksInYear; @@ -3451,7 +3451,7 @@ function getMonth (dirtyDate) { var get_month = getMonth; -var MILLISECONDS_IN_DAY$1 = 24 * 60 * 60 * 1000; +var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; /** * @category Range Helpers @@ -3507,7 +3507,7 @@ function getOverlappingDaysInRanges (dirtyInitialRangeStartDate, dirtyInitialRan var differenceInMs = overlapEndDate - overlapStartDate; - return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY$1) + return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY) } var get_overlapping_days_in_ranges = getOverlappingDaysInRanges; @@ -5647,14 +5647,14 @@ var dateFns = { const user = "user"; -const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); -const foo = `Sunnyvale ${user} ${date}`; +const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); +const foo$2 = `Sunnyvale ${user} ${date$2}`; const date$1 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); const foo$1 = `@foo/lib/a ${date$1}`; -const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); -const foo$2 = `@foo/lib/a/a/a ${date$2}`; +const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); +const foo = `@foo/lib/a/a/a ${date}`; const fum = 'Wonderland'; @@ -5665,7 +5665,7 @@ const name = 'Alice'; const json_key = "json_value"; console.log( - `${hello}, ${name} in ${fum} ${foo} ${foo$1} ${foo$2} ${far_a} ${far_a_b_c} ${json_key}`); + `${hello}, ${name} in ${fum} ${foo$2} ${foo$1} ${foo} ${far_a} ${far_a_b_c} ${json_key}`); // Test for sequences = false class A { diff --git a/packages/rollup/test/integration/golden.esm.js.map.sha256_ b/packages/rollup/test/integration/golden.esm.js.map.sha256_ index 317b7a9970..83557aadbc 100644 --- a/packages/rollup/test/integration/golden.esm.js.map.sha256_ +++ b/packages/rollup/test/integration/golden.esm.js.map.sha256_ @@ -1 +1 @@ -9fe0f43821c5735b20edad3f95d2e2c26d9d495ad94831cbb1cf7a73642cde8c \ No newline at end of file +a0ed85689082060843a42b518e03c7e64c656f6a6e05d34f3a466ba53816e27c \ No newline at end of file diff --git a/packages/rollup/test/integration/golden.esm.js_ b/packages/rollup/test/integration/golden.esm.js_ index 90d879cd83..a0ffa8c409 100644 --- a/packages/rollup/test/integration/golden.esm.js_ +++ b/packages/rollup/test/integration/golden.esm.js_ @@ -9,7 +9,7 @@ var far_a = `@far/a`; var far_a_b_c = `@far/a/b/c`; -var MILLISECONDS_IN_MINUTE = 60000; +var MILLISECONDS_IN_MINUTE$6 = 60000; /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. @@ -26,9 +26,9 @@ var getTimezoneOffsetInMilliseconds = function getTimezoneOffsetInMilliseconds ( var date = new Date(dirtyDate.getTime()); var baseTimezoneOffset = date.getTimezoneOffset(); date.setSeconds(0, 0); - var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE; + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE$6; - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE$6 + millisecondsPartOfTimezoneOffset }; /** @@ -52,8 +52,8 @@ function isDate (argument) { var is_date = isDate; -var MILLISECONDS_IN_HOUR = 3600000; -var MILLISECONDS_IN_MINUTE$1 = 60000; +var MILLISECONDS_IN_HOUR$2 = 3600000; +var MILLISECONDS_IN_MINUTE$5 = 60000; var DEFAULT_ADDITIONAL_DIGITS = 2; var parseTokenDateTimeDelimeter = /[T ]/; @@ -159,7 +159,7 @@ function parse (argument, dirtyOptions) { } if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$1; + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$5; } else { var fullTime = timestamp + time; var fullTimeDate = new Date(fullTime); @@ -315,7 +315,7 @@ function parseTime (timeString) { token = parseTokenHH.exec(timeString); if (token) { hours = parseFloat(token[1].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + return (hours % 24) * MILLISECONDS_IN_HOUR$2 } // hh:mm or hhmm @@ -323,8 +323,8 @@ function parseTime (timeString) { if (token) { hours = parseInt(token[1], 10); minutes = parseFloat(token[2].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 } // hh:mm:ss or hhmmss @@ -333,8 +333,8 @@ function parseTime (timeString) { hours = parseInt(token[1], 10); minutes = parseInt(token[2], 10); var seconds = parseFloat(token[3].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 + seconds * 1000 } @@ -614,8 +614,8 @@ function startOfDay (dirtyDate) { var start_of_day = startOfDay; -var MILLISECONDS_IN_MINUTE$2 = 60000; -var MILLISECONDS_IN_DAY = 86400000; +var MILLISECONDS_IN_MINUTE$4 = 60000; +var MILLISECONDS_IN_DAY$1 = 86400000; /** * @category Day Helpers @@ -642,14 +642,14 @@ function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) { var startOfDayRight = start_of_day(dirtyDateRight); var timestampLeft = startOfDayLeft.getTime() - - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; var timestampRight = startOfDayRight.getTime() - - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; // Round the number of days to the nearest integer // because the number of milliseconds in a day is not constant // (e.g. it's different in the day of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$1) } var difference_in_calendar_days = differenceInCalendarDays; @@ -1127,8 +1127,8 @@ function compareDesc (dirtyDateLeft, dirtyDateRight) { var compare_desc = compareDesc; -var MILLISECONDS_IN_MINUTE$4 = 60000; -var MILLISECONDS_IN_WEEK = 604800000; +var MILLISECONDS_IN_MINUTE$2 = 60000; +var MILLISECONDS_IN_WEEK$3 = 604800000; /** * @category ISO Week Helpers @@ -1156,14 +1156,14 @@ function differenceInCalendarISOWeeks (dirtyDateLeft, dirtyDateRight) { var startOfISOWeekRight = start_of_iso_week(dirtyDateRight); var timestampLeft = startOfISOWeekLeft.getTime() - - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; var timestampRight = startOfISOWeekRight.getTime() - - startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$3) } var difference_in_calendar_iso_weeks = differenceInCalendarISOWeeks; @@ -1280,8 +1280,8 @@ function differenceInCalendarQuarters (dirtyDateLeft, dirtyDateRight) { var difference_in_calendar_quarters = differenceInCalendarQuarters; -var MILLISECONDS_IN_MINUTE$5 = 60000; -var MILLISECONDS_IN_WEEK$1 = 604800000; +var MILLISECONDS_IN_MINUTE$1 = 60000; +var MILLISECONDS_IN_WEEK$2 = 604800000; /** * @category Week Helpers @@ -1319,14 +1319,14 @@ function differenceInCalendarWeeks (dirtyDateLeft, dirtyDateRight, dirtyOptions) var startOfWeekRight = start_of_week(dirtyDateRight, dirtyOptions); var timestampLeft = startOfWeekLeft.getTime() - - startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; var timestampRight = startOfWeekRight.getTime() - - startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$1) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$2) } var difference_in_calendar_weeks = differenceInCalendarWeeks; @@ -1423,7 +1423,7 @@ function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) { var difference_in_milliseconds = differenceInMilliseconds; -var MILLISECONDS_IN_HOUR$2 = 3600000; +var MILLISECONDS_IN_HOUR = 3600000; /** * @category Hour Helpers @@ -1445,7 +1445,7 @@ var MILLISECONDS_IN_HOUR$2 = 3600000; * //=> 12 */ function differenceInHours (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR$2; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1514,7 +1514,7 @@ function differenceInISOYears (dirtyDateLeft, dirtyDateRight) { var difference_in_iso_years = differenceInISOYears; -var MILLISECONDS_IN_MINUTE$6 = 60000; +var MILLISECONDS_IN_MINUTE = 60000; /** * @category Minute Helpers @@ -1536,7 +1536,7 @@ var MILLISECONDS_IN_MINUTE$6 = 60000; * //=> 12 */ function differenceInMinutes (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE$6; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1916,9 +1916,9 @@ var en = { format: build_format_locale() }; -var MINUTES_IN_DAY = 1440; +var MINUTES_IN_DAY$1 = 1440; var MINUTES_IN_ALMOST_TWO_DAYS = 2520; -var MINUTES_IN_MONTH = 43200; +var MINUTES_IN_MONTH$1 = 43200; var MINUTES_IN_TWO_MONTHS = 86400; /** @@ -2066,7 +2066,7 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { return localize('aboutXHours', 1, localizeOptions) // 1.5 hrs up to 24 hrs - } else if (minutes < MINUTES_IN_DAY) { + } else if (minutes < MINUTES_IN_DAY$1) { var hours = Math.round(minutes / 60); return localize('aboutXHours', hours, localizeOptions) @@ -2075,13 +2075,13 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { return localize('xDays', 1, localizeOptions) // 1.75 days up to 30 days - } else if (minutes < MINUTES_IN_MONTH) { - var days = Math.round(minutes / MINUTES_IN_DAY); + } else if (minutes < MINUTES_IN_MONTH$1) { + var days = Math.round(minutes / MINUTES_IN_DAY$1); return localize('xDays', days, localizeOptions) // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { - months = Math.round(minutes / MINUTES_IN_MONTH); + months = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('aboutXMonths', months, localizeOptions) } @@ -2089,7 +2089,7 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { // 2 months up to 12 months if (months < 12) { - var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('xMonths', nearestMonth, localizeOptions) // 1 year up to max Date @@ -2114,8 +2114,8 @@ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { var distance_in_words = distanceInWords; -var MINUTES_IN_DAY$1 = 1440; -var MINUTES_IN_MONTH$1 = 43200; +var MINUTES_IN_DAY = 1440; +var MINUTES_IN_MONTH = 43200; var MINUTES_IN_YEAR = 525600; /** @@ -2241,9 +2241,9 @@ function distanceInWordsStrict (dirtyDateToCompare, dirtyDate, dirtyOptions) { unit = 's'; } else if (minutes < 60) { unit = 'm'; - } else if (minutes < MINUTES_IN_DAY$1) { + } else if (minutes < MINUTES_IN_DAY) { unit = 'h'; - } else if (minutes < MINUTES_IN_MONTH$1) { + } else if (minutes < MINUTES_IN_MONTH) { unit = 'd'; } else if (minutes < MINUTES_IN_YEAR) { unit = 'M'; @@ -2267,12 +2267,12 @@ function distanceInWordsStrict (dirtyDateToCompare, dirtyDate, dirtyOptions) { // 1 up to 30 days } else if (unit === 'd') { - days = mathPartial(minutes / MINUTES_IN_DAY$1); + days = mathPartial(minutes / MINUTES_IN_DAY); return localize('xDays', days, localizeOptions) // 1 up to 12 months } else if (unit === 'M') { - months = mathPartial(minutes / MINUTES_IN_MONTH$1); + months = mathPartial(minutes / MINUTES_IN_MONTH); return localize('xMonths', months, localizeOptions) // 1 year up to max Date @@ -2816,7 +2816,7 @@ function getDayOfYear (dirtyDate) { var get_day_of_year = getDayOfYear; -var MILLISECONDS_IN_WEEK$2 = 604800000; +var MILLISECONDS_IN_WEEK$1 = 604800000; /** * @category ISO Week Helpers @@ -2842,7 +2842,7 @@ function getISOWeek (dirtyDate) { // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$2) + 1 + return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1 } var get_iso_week = getISOWeek; @@ -3347,7 +3347,7 @@ function getISODay (dirtyDate) { var get_iso_day = getISODay; -var MILLISECONDS_IN_WEEK$3 = 604800000; +var MILLISECONDS_IN_WEEK = 604800000; /** * @category ISO Week-Numbering Year Helpers @@ -3373,7 +3373,7 @@ function getISOWeeksInYear (dirtyDate) { // Round the number of weeks to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$3) + return Math.round(diff / MILLISECONDS_IN_WEEK) } var get_iso_weeks_in_year = getISOWeeksInYear; @@ -3447,7 +3447,7 @@ function getMonth (dirtyDate) { var get_month = getMonth; -var MILLISECONDS_IN_DAY$1 = 24 * 60 * 60 * 1000; +var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; /** * @category Range Helpers @@ -3503,7 +3503,7 @@ function getOverlappingDaysInRanges (dirtyInitialRangeStartDate, dirtyInitialRan var differenceInMs = overlapEndDate - overlapStartDate; - return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY$1) + return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY) } var get_overlapping_days_in_ranges = getOverlappingDaysInRanges; @@ -5643,14 +5643,14 @@ var dateFns = { const user = "user"; -const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); -const foo = `Sunnyvale ${user} ${date}`; +const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); +const foo$2 = `Sunnyvale ${user} ${date$2}`; const date$1 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); const foo$1 = `@foo/lib/a ${date$1}`; -const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); -const foo$2 = `@foo/lib/a/a/a ${date$2}`; +const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); +const foo = `@foo/lib/a/a/a ${date}`; const fum = 'Wonderland'; @@ -5661,7 +5661,7 @@ const name = 'Alice'; const json_key = "json_value"; console.log( - `${hello}, ${name} in ${fum} ${foo} ${foo$1} ${foo$2} ${far_a} ${far_a_b_c} ${json_key}`); + `${hello}, ${name} in ${fum} ${foo$2} ${foo$1} ${foo} ${far_a} ${far_a_b_c} ${json_key}`); // Test for sequences = false class A { diff --git a/packages/rollup/test/integration/golden.iife.js.map.sha256_ b/packages/rollup/test/integration/golden.iife.js.map.sha256_ index 32365ad2d8..a390b1881f 100644 --- a/packages/rollup/test/integration/golden.iife.js.map.sha256_ +++ b/packages/rollup/test/integration/golden.iife.js.map.sha256_ @@ -1 +1 @@ -85c4599e6a6f490460e8fad9232da3ec58601e18e47e893c25515bb94b3f78c8 \ No newline at end of file +63b73c20a24b95236e87bd8c552976848cc581484dd053d27446ddd4fe006ab4 \ No newline at end of file diff --git a/packages/rollup/test/integration/golden.iife.js_ b/packages/rollup/test/integration/golden.iife.js_ index 6b52fc506f..94bef778f3 100644 --- a/packages/rollup/test/integration/golden.iife.js_ +++ b/packages/rollup/test/integration/golden.iife.js_ @@ -10,7 +10,7 @@ var bundle = (function (exports, some_global_var) { var far_a_b_c = `@far/a/b/c`; - var MILLISECONDS_IN_MINUTE = 60000; + var MILLISECONDS_IN_MINUTE$6 = 60000; /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. @@ -27,9 +27,9 @@ var bundle = (function (exports, some_global_var) { var date = new Date(dirtyDate.getTime()); var baseTimezoneOffset = date.getTimezoneOffset(); date.setSeconds(0, 0); - var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE; + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE$6; - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE$6 + millisecondsPartOfTimezoneOffset }; /** @@ -53,8 +53,8 @@ var bundle = (function (exports, some_global_var) { var is_date = isDate; - var MILLISECONDS_IN_HOUR = 3600000; - var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_MINUTE$5 = 60000; var DEFAULT_ADDITIONAL_DIGITS = 2; var parseTokenDateTimeDelimeter = /[T ]/; @@ -160,7 +160,7 @@ var bundle = (function (exports, some_global_var) { } if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$1; + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$5; } else { var fullTime = timestamp + time; var fullTimeDate = new Date(fullTime); @@ -316,7 +316,7 @@ var bundle = (function (exports, some_global_var) { token = parseTokenHH.exec(timeString); if (token) { hours = parseFloat(token[1].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + return (hours % 24) * MILLISECONDS_IN_HOUR$2 } // hh:mm or hhmm @@ -324,8 +324,8 @@ var bundle = (function (exports, some_global_var) { if (token) { hours = parseInt(token[1], 10); minutes = parseFloat(token[2].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 } // hh:mm:ss or hhmmss @@ -334,8 +334,8 @@ var bundle = (function (exports, some_global_var) { hours = parseInt(token[1], 10); minutes = parseInt(token[2], 10); var seconds = parseFloat(token[3].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 + seconds * 1000 } @@ -615,8 +615,8 @@ var bundle = (function (exports, some_global_var) { var start_of_day = startOfDay; - var MILLISECONDS_IN_MINUTE$2 = 60000; - var MILLISECONDS_IN_DAY = 86400000; + var MILLISECONDS_IN_MINUTE$4 = 60000; + var MILLISECONDS_IN_DAY$1 = 86400000; /** * @category Day Helpers @@ -643,14 +643,14 @@ var bundle = (function (exports, some_global_var) { var startOfDayRight = start_of_day(dirtyDateRight); var timestampLeft = startOfDayLeft.getTime() - - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; var timestampRight = startOfDayRight.getTime() - - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; // Round the number of days to the nearest integer // because the number of milliseconds in a day is not constant // (e.g. it's different in the day of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$1) } var difference_in_calendar_days = differenceInCalendarDays; @@ -1128,8 +1128,8 @@ var bundle = (function (exports, some_global_var) { var compare_desc = compareDesc; - var MILLISECONDS_IN_MINUTE$4 = 60000; - var MILLISECONDS_IN_WEEK = 604800000; + var MILLISECONDS_IN_MINUTE$2 = 60000; + var MILLISECONDS_IN_WEEK$3 = 604800000; /** * @category ISO Week Helpers @@ -1157,14 +1157,14 @@ var bundle = (function (exports, some_global_var) { var startOfISOWeekRight = start_of_iso_week(dirtyDateRight); var timestampLeft = startOfISOWeekLeft.getTime() - - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; var timestampRight = startOfISOWeekRight.getTime() - - startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$3) } var difference_in_calendar_iso_weeks = differenceInCalendarISOWeeks; @@ -1281,8 +1281,8 @@ var bundle = (function (exports, some_global_var) { var difference_in_calendar_quarters = differenceInCalendarQuarters; - var MILLISECONDS_IN_MINUTE$5 = 60000; - var MILLISECONDS_IN_WEEK$1 = 604800000; + var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_WEEK$2 = 604800000; /** * @category Week Helpers @@ -1320,14 +1320,14 @@ var bundle = (function (exports, some_global_var) { var startOfWeekRight = start_of_week(dirtyDateRight, dirtyOptions); var timestampLeft = startOfWeekLeft.getTime() - - startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; var timestampRight = startOfWeekRight.getTime() - - startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$1) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$2) } var difference_in_calendar_weeks = differenceInCalendarWeeks; @@ -1424,7 +1424,7 @@ var bundle = (function (exports, some_global_var) { var difference_in_milliseconds = differenceInMilliseconds; - var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_HOUR = 3600000; /** * @category Hour Helpers @@ -1446,7 +1446,7 @@ var bundle = (function (exports, some_global_var) { * //=> 12 */ function differenceInHours (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR$2; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1515,7 +1515,7 @@ var bundle = (function (exports, some_global_var) { var difference_in_iso_years = differenceInISOYears; - var MILLISECONDS_IN_MINUTE$6 = 60000; + var MILLISECONDS_IN_MINUTE = 60000; /** * @category Minute Helpers @@ -1537,7 +1537,7 @@ var bundle = (function (exports, some_global_var) { * //=> 12 */ function differenceInMinutes (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE$6; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1917,9 +1917,9 @@ var bundle = (function (exports, some_global_var) { format: build_format_locale() }; - var MINUTES_IN_DAY = 1440; + var MINUTES_IN_DAY$1 = 1440; var MINUTES_IN_ALMOST_TWO_DAYS = 2520; - var MINUTES_IN_MONTH = 43200; + var MINUTES_IN_MONTH$1 = 43200; var MINUTES_IN_TWO_MONTHS = 86400; /** @@ -2067,7 +2067,7 @@ var bundle = (function (exports, some_global_var) { return localize('aboutXHours', 1, localizeOptions) // 1.5 hrs up to 24 hrs - } else if (minutes < MINUTES_IN_DAY) { + } else if (minutes < MINUTES_IN_DAY$1) { var hours = Math.round(minutes / 60); return localize('aboutXHours', hours, localizeOptions) @@ -2076,13 +2076,13 @@ var bundle = (function (exports, some_global_var) { return localize('xDays', 1, localizeOptions) // 1.75 days up to 30 days - } else if (minutes < MINUTES_IN_MONTH) { - var days = Math.round(minutes / MINUTES_IN_DAY); + } else if (minutes < MINUTES_IN_MONTH$1) { + var days = Math.round(minutes / MINUTES_IN_DAY$1); return localize('xDays', days, localizeOptions) // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { - months = Math.round(minutes / MINUTES_IN_MONTH); + months = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('aboutXMonths', months, localizeOptions) } @@ -2090,7 +2090,7 @@ var bundle = (function (exports, some_global_var) { // 2 months up to 12 months if (months < 12) { - var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('xMonths', nearestMonth, localizeOptions) // 1 year up to max Date @@ -2115,8 +2115,8 @@ var bundle = (function (exports, some_global_var) { var distance_in_words = distanceInWords; - var MINUTES_IN_DAY$1 = 1440; - var MINUTES_IN_MONTH$1 = 43200; + var MINUTES_IN_DAY = 1440; + var MINUTES_IN_MONTH = 43200; var MINUTES_IN_YEAR = 525600; /** @@ -2242,9 +2242,9 @@ var bundle = (function (exports, some_global_var) { unit = 's'; } else if (minutes < 60) { unit = 'm'; - } else if (minutes < MINUTES_IN_DAY$1) { + } else if (minutes < MINUTES_IN_DAY) { unit = 'h'; - } else if (minutes < MINUTES_IN_MONTH$1) { + } else if (minutes < MINUTES_IN_MONTH) { unit = 'd'; } else if (minutes < MINUTES_IN_YEAR) { unit = 'M'; @@ -2268,12 +2268,12 @@ var bundle = (function (exports, some_global_var) { // 1 up to 30 days } else if (unit === 'd') { - days = mathPartial(minutes / MINUTES_IN_DAY$1); + days = mathPartial(minutes / MINUTES_IN_DAY); return localize('xDays', days, localizeOptions) // 1 up to 12 months } else if (unit === 'M') { - months = mathPartial(minutes / MINUTES_IN_MONTH$1); + months = mathPartial(minutes / MINUTES_IN_MONTH); return localize('xMonths', months, localizeOptions) // 1 year up to max Date @@ -2817,7 +2817,7 @@ var bundle = (function (exports, some_global_var) { var get_day_of_year = getDayOfYear; - var MILLISECONDS_IN_WEEK$2 = 604800000; + var MILLISECONDS_IN_WEEK$1 = 604800000; /** * @category ISO Week Helpers @@ -2843,7 +2843,7 @@ var bundle = (function (exports, some_global_var) { // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$2) + 1 + return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1 } var get_iso_week = getISOWeek; @@ -3348,7 +3348,7 @@ var bundle = (function (exports, some_global_var) { var get_iso_day = getISODay; - var MILLISECONDS_IN_WEEK$3 = 604800000; + var MILLISECONDS_IN_WEEK = 604800000; /** * @category ISO Week-Numbering Year Helpers @@ -3374,7 +3374,7 @@ var bundle = (function (exports, some_global_var) { // Round the number of weeks to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$3) + return Math.round(diff / MILLISECONDS_IN_WEEK) } var get_iso_weeks_in_year = getISOWeeksInYear; @@ -3448,7 +3448,7 @@ var bundle = (function (exports, some_global_var) { var get_month = getMonth; - var MILLISECONDS_IN_DAY$1 = 24 * 60 * 60 * 1000; + var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; /** * @category Range Helpers @@ -3504,7 +3504,7 @@ var bundle = (function (exports, some_global_var) { var differenceInMs = overlapEndDate - overlapStartDate; - return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY$1) + return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY) } var get_overlapping_days_in_ranges = getOverlappingDaysInRanges; @@ -5644,14 +5644,14 @@ var bundle = (function (exports, some_global_var) { const user = "user"; - const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo = `Sunnyvale ${user} ${date}`; + const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo$2 = `Sunnyvale ${user} ${date$2}`; const date$1 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); const foo$1 = `@foo/lib/a ${date$1}`; - const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo$2 = `@foo/lib/a/a/a ${date$2}`; + const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo = `@foo/lib/a/a/a ${date}`; const fum = 'Wonderland'; @@ -5662,7 +5662,7 @@ var bundle = (function (exports, some_global_var) { const json_key = "json_value"; console.log( - `${hello}, ${name} in ${fum} ${foo} ${foo$1} ${foo$2} ${far_a} ${far_a_b_c} ${json_key}`); + `${hello}, ${name} in ${fum} ${foo$2} ${foo$1} ${foo} ${far_a} ${far_a_b_c} ${json_key}`); // Test for sequences = false class A { @@ -5677,6 +5677,8 @@ var bundle = (function (exports, some_global_var) { exports.A = A; + Object.defineProperty(exports, '__esModule', { value: true }); + return exports; }({}, runtime_name_of_global_var)); diff --git a/packages/rollup/test/integration/golden.system.js.map.sha256_ b/packages/rollup/test/integration/golden.system.js.map.sha256_ index b5ea792fb3..d86f35cbc2 100644 --- a/packages/rollup/test/integration/golden.system.js.map.sha256_ +++ b/packages/rollup/test/integration/golden.system.js.map.sha256_ @@ -1 +1 @@ -b92a8678d60a94ecf3b0d87252547db66b6256db6c6437eb433530c3fdba019c \ No newline at end of file +2d18f75b03dbb3e5495b49050f0f2767e21bf8ce9495ed9d446c48f5e2081976 \ No newline at end of file diff --git a/packages/rollup/test/integration/golden.system.js_ b/packages/rollup/test/integration/golden.system.js_ index 6890a37a4f..69f36785a2 100644 --- a/packages/rollup/test/integration/golden.system.js_ +++ b/packages/rollup/test/integration/golden.system.js_ @@ -16,7 +16,7 @@ System.register('bundle', ['some_global_var'], function (exports) { var far_a_b_c = `@far/a/b/c`; - var MILLISECONDS_IN_MINUTE = 60000; + var MILLISECONDS_IN_MINUTE$6 = 60000; /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. @@ -33,9 +33,9 @@ System.register('bundle', ['some_global_var'], function (exports) { var date = new Date(dirtyDate.getTime()); var baseTimezoneOffset = date.getTimezoneOffset(); date.setSeconds(0, 0); - var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE; + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE$6; - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE$6 + millisecondsPartOfTimezoneOffset }; /** @@ -59,8 +59,8 @@ System.register('bundle', ['some_global_var'], function (exports) { var is_date = isDate; - var MILLISECONDS_IN_HOUR = 3600000; - var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_MINUTE$5 = 60000; var DEFAULT_ADDITIONAL_DIGITS = 2; var parseTokenDateTimeDelimeter = /[T ]/; @@ -166,7 +166,7 @@ System.register('bundle', ['some_global_var'], function (exports) { } if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$1; + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$5; } else { var fullTime = timestamp + time; var fullTimeDate = new Date(fullTime); @@ -322,7 +322,7 @@ System.register('bundle', ['some_global_var'], function (exports) { token = parseTokenHH.exec(timeString); if (token) { hours = parseFloat(token[1].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + return (hours % 24) * MILLISECONDS_IN_HOUR$2 } // hh:mm or hhmm @@ -330,8 +330,8 @@ System.register('bundle', ['some_global_var'], function (exports) { if (token) { hours = parseInt(token[1], 10); minutes = parseFloat(token[2].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 } // hh:mm:ss or hhmmss @@ -340,8 +340,8 @@ System.register('bundle', ['some_global_var'], function (exports) { hours = parseInt(token[1], 10); minutes = parseInt(token[2], 10); var seconds = parseFloat(token[3].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 + seconds * 1000 } @@ -621,8 +621,8 @@ System.register('bundle', ['some_global_var'], function (exports) { var start_of_day = startOfDay; - var MILLISECONDS_IN_MINUTE$2 = 60000; - var MILLISECONDS_IN_DAY = 86400000; + var MILLISECONDS_IN_MINUTE$4 = 60000; + var MILLISECONDS_IN_DAY$1 = 86400000; /** * @category Day Helpers @@ -649,14 +649,14 @@ System.register('bundle', ['some_global_var'], function (exports) { var startOfDayRight = start_of_day(dirtyDateRight); var timestampLeft = startOfDayLeft.getTime() - - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; var timestampRight = startOfDayRight.getTime() - - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; // Round the number of days to the nearest integer // because the number of milliseconds in a day is not constant // (e.g. it's different in the day of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$1) } var difference_in_calendar_days = differenceInCalendarDays; @@ -1134,8 +1134,8 @@ System.register('bundle', ['some_global_var'], function (exports) { var compare_desc = compareDesc; - var MILLISECONDS_IN_MINUTE$4 = 60000; - var MILLISECONDS_IN_WEEK = 604800000; + var MILLISECONDS_IN_MINUTE$2 = 60000; + var MILLISECONDS_IN_WEEK$3 = 604800000; /** * @category ISO Week Helpers @@ -1163,14 +1163,14 @@ System.register('bundle', ['some_global_var'], function (exports) { var startOfISOWeekRight = start_of_iso_week(dirtyDateRight); var timestampLeft = startOfISOWeekLeft.getTime() - - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; var timestampRight = startOfISOWeekRight.getTime() - - startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$3) } var difference_in_calendar_iso_weeks = differenceInCalendarISOWeeks; @@ -1287,8 +1287,8 @@ System.register('bundle', ['some_global_var'], function (exports) { var difference_in_calendar_quarters = differenceInCalendarQuarters; - var MILLISECONDS_IN_MINUTE$5 = 60000; - var MILLISECONDS_IN_WEEK$1 = 604800000; + var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_WEEK$2 = 604800000; /** * @category Week Helpers @@ -1326,14 +1326,14 @@ System.register('bundle', ['some_global_var'], function (exports) { var startOfWeekRight = start_of_week(dirtyDateRight, dirtyOptions); var timestampLeft = startOfWeekLeft.getTime() - - startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; var timestampRight = startOfWeekRight.getTime() - - startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$1) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$2) } var difference_in_calendar_weeks = differenceInCalendarWeeks; @@ -1430,7 +1430,7 @@ System.register('bundle', ['some_global_var'], function (exports) { var difference_in_milliseconds = differenceInMilliseconds; - var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_HOUR = 3600000; /** * @category Hour Helpers @@ -1452,7 +1452,7 @@ System.register('bundle', ['some_global_var'], function (exports) { * //=> 12 */ function differenceInHours (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR$2; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1521,7 +1521,7 @@ System.register('bundle', ['some_global_var'], function (exports) { var difference_in_iso_years = differenceInISOYears; - var MILLISECONDS_IN_MINUTE$6 = 60000; + var MILLISECONDS_IN_MINUTE = 60000; /** * @category Minute Helpers @@ -1543,7 +1543,7 @@ System.register('bundle', ['some_global_var'], function (exports) { * //=> 12 */ function differenceInMinutes (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE$6; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1923,9 +1923,9 @@ System.register('bundle', ['some_global_var'], function (exports) { format: build_format_locale() }; - var MINUTES_IN_DAY = 1440; + var MINUTES_IN_DAY$1 = 1440; var MINUTES_IN_ALMOST_TWO_DAYS = 2520; - var MINUTES_IN_MONTH = 43200; + var MINUTES_IN_MONTH$1 = 43200; var MINUTES_IN_TWO_MONTHS = 86400; /** @@ -2073,7 +2073,7 @@ System.register('bundle', ['some_global_var'], function (exports) { return localize('aboutXHours', 1, localizeOptions) // 1.5 hrs up to 24 hrs - } else if (minutes < MINUTES_IN_DAY) { + } else if (minutes < MINUTES_IN_DAY$1) { var hours = Math.round(minutes / 60); return localize('aboutXHours', hours, localizeOptions) @@ -2082,13 +2082,13 @@ System.register('bundle', ['some_global_var'], function (exports) { return localize('xDays', 1, localizeOptions) // 1.75 days up to 30 days - } else if (minutes < MINUTES_IN_MONTH) { - var days = Math.round(minutes / MINUTES_IN_DAY); + } else if (minutes < MINUTES_IN_MONTH$1) { + var days = Math.round(minutes / MINUTES_IN_DAY$1); return localize('xDays', days, localizeOptions) // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { - months = Math.round(minutes / MINUTES_IN_MONTH); + months = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('aboutXMonths', months, localizeOptions) } @@ -2096,7 +2096,7 @@ System.register('bundle', ['some_global_var'], function (exports) { // 2 months up to 12 months if (months < 12) { - var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('xMonths', nearestMonth, localizeOptions) // 1 year up to max Date @@ -2121,8 +2121,8 @@ System.register('bundle', ['some_global_var'], function (exports) { var distance_in_words = distanceInWords; - var MINUTES_IN_DAY$1 = 1440; - var MINUTES_IN_MONTH$1 = 43200; + var MINUTES_IN_DAY = 1440; + var MINUTES_IN_MONTH = 43200; var MINUTES_IN_YEAR = 525600; /** @@ -2248,9 +2248,9 @@ System.register('bundle', ['some_global_var'], function (exports) { unit = 's'; } else if (minutes < 60) { unit = 'm'; - } else if (minutes < MINUTES_IN_DAY$1) { + } else if (minutes < MINUTES_IN_DAY) { unit = 'h'; - } else if (minutes < MINUTES_IN_MONTH$1) { + } else if (minutes < MINUTES_IN_MONTH) { unit = 'd'; } else if (minutes < MINUTES_IN_YEAR) { unit = 'M'; @@ -2274,12 +2274,12 @@ System.register('bundle', ['some_global_var'], function (exports) { // 1 up to 30 days } else if (unit === 'd') { - days = mathPartial(minutes / MINUTES_IN_DAY$1); + days = mathPartial(minutes / MINUTES_IN_DAY); return localize('xDays', days, localizeOptions) // 1 up to 12 months } else if (unit === 'M') { - months = mathPartial(minutes / MINUTES_IN_MONTH$1); + months = mathPartial(minutes / MINUTES_IN_MONTH); return localize('xMonths', months, localizeOptions) // 1 year up to max Date @@ -2823,7 +2823,7 @@ System.register('bundle', ['some_global_var'], function (exports) { var get_day_of_year = getDayOfYear; - var MILLISECONDS_IN_WEEK$2 = 604800000; + var MILLISECONDS_IN_WEEK$1 = 604800000; /** * @category ISO Week Helpers @@ -2849,7 +2849,7 @@ System.register('bundle', ['some_global_var'], function (exports) { // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$2) + 1 + return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1 } var get_iso_week = getISOWeek; @@ -3354,7 +3354,7 @@ System.register('bundle', ['some_global_var'], function (exports) { var get_iso_day = getISODay; - var MILLISECONDS_IN_WEEK$3 = 604800000; + var MILLISECONDS_IN_WEEK = 604800000; /** * @category ISO Week-Numbering Year Helpers @@ -3380,7 +3380,7 @@ System.register('bundle', ['some_global_var'], function (exports) { // Round the number of weeks to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$3) + return Math.round(diff / MILLISECONDS_IN_WEEK) } var get_iso_weeks_in_year = getISOWeeksInYear; @@ -3454,7 +3454,7 @@ System.register('bundle', ['some_global_var'], function (exports) { var get_month = getMonth; - var MILLISECONDS_IN_DAY$1 = 24 * 60 * 60 * 1000; + var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; /** * @category Range Helpers @@ -3510,7 +3510,7 @@ System.register('bundle', ['some_global_var'], function (exports) { var differenceInMs = overlapEndDate - overlapStartDate; - return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY$1) + return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY) } var get_overlapping_days_in_ranges = getOverlappingDaysInRanges; @@ -5650,14 +5650,14 @@ System.register('bundle', ['some_global_var'], function (exports) { const user = "user"; - const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo = `Sunnyvale ${user} ${date}`; + const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo$2 = `Sunnyvale ${user} ${date$2}`; const date$1 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); const foo$1 = `@foo/lib/a ${date$1}`; - const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo$2 = `@foo/lib/a/a/a ${date$2}`; + const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo = `@foo/lib/a/a/a ${date}`; const fum = 'Wonderland'; @@ -5668,7 +5668,7 @@ System.register('bundle', ['some_global_var'], function (exports) { const json_key = "json_value"; console.log( - `${hello}, ${name} in ${fum} ${foo} ${foo$1} ${foo$2} ${far_a} ${far_a_b_c} ${json_key}`); + `${hello}, ${name} in ${fum} ${foo$2} ${foo$1} ${foo} ${far_a} ${far_a_b_c} ${json_key}`); // Test for sequences = false class A { diff --git a/packages/rollup/test/integration/golden.umd.js.map.sha256_ b/packages/rollup/test/integration/golden.umd.js.map.sha256_ index bfb3f70a96..64cafd13f6 100644 --- a/packages/rollup/test/integration/golden.umd.js.map.sha256_ +++ b/packages/rollup/test/integration/golden.umd.js.map.sha256_ @@ -1 +1 @@ -735d657abe96a1ea940285eda0bef75fe15d0a86db9bd11bef0301d14c9ebaff \ No newline at end of file +15c50b14ddd8d514fd28c5a16cef55a5e5a8b1d949ba1d2f264895f8371fe5f5 \ No newline at end of file diff --git a/packages/rollup/test/integration/golden.umd.js.sha256_ b/packages/rollup/test/integration/golden.umd.js.sha256_ index 32e35431d2..8614fb143c 100755 --- a/packages/rollup/test/integration/golden.umd.js.sha256_ +++ b/packages/rollup/test/integration/golden.umd.js.sha256_ @@ -1 +1 @@ -a8cc9e8325019de8db9839ad0f1a8658157de44eafbde34034912b3ad3c40c9a \ No newline at end of file +05b3f5575394321c22d04cea5d9fa8fe53f5ea06d686f05f7b5275016821d9cc \ No newline at end of file diff --git a/packages/rollup/test/integration/golden.umd.js_ b/packages/rollup/test/integration/golden.umd.js_ index 55a5e4d538..30c8b0924d 100644 --- a/packages/rollup/test/integration/golden.umd.js_ +++ b/packages/rollup/test/integration/golden.umd.js_ @@ -6,14 +6,14 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('some_global_var')) : typeof define === 'function' && define.amd ? define(['exports', 'some_global_var'], factory) : - (global = global || self, factory(global.bundle = {}, global.runtime_name_of_global_var)); + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bundle = {}, global.runtime_name_of_global_var)); }(this, (function (exports, some_global_var) { 'use strict'; var far_a = `@far/a`; var far_a_b_c = `@far/a/b/c`; - var MILLISECONDS_IN_MINUTE = 60000; + var MILLISECONDS_IN_MINUTE$6 = 60000; /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. @@ -30,9 +30,9 @@ var date = new Date(dirtyDate.getTime()); var baseTimezoneOffset = date.getTimezoneOffset(); date.setSeconds(0, 0); - var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE; + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE$6; - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE$6 + millisecondsPartOfTimezoneOffset }; /** @@ -56,8 +56,8 @@ var is_date = isDate; - var MILLISECONDS_IN_HOUR = 3600000; - var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_MINUTE$5 = 60000; var DEFAULT_ADDITIONAL_DIGITS = 2; var parseTokenDateTimeDelimeter = /[T ]/; @@ -163,7 +163,7 @@ } if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$1; + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$5; } else { var fullTime = timestamp + time; var fullTimeDate = new Date(fullTime); @@ -319,7 +319,7 @@ token = parseTokenHH.exec(timeString); if (token) { hours = parseFloat(token[1].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + return (hours % 24) * MILLISECONDS_IN_HOUR$2 } // hh:mm or hhmm @@ -327,8 +327,8 @@ if (token) { hours = parseInt(token[1], 10); minutes = parseFloat(token[2].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 } // hh:mm:ss or hhmmss @@ -337,8 +337,8 @@ hours = parseInt(token[1], 10); minutes = parseInt(token[2], 10); var seconds = parseFloat(token[3].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + + return (hours % 24) * MILLISECONDS_IN_HOUR$2 + + minutes * MILLISECONDS_IN_MINUTE$5 + seconds * 1000 } @@ -618,8 +618,8 @@ var start_of_day = startOfDay; - var MILLISECONDS_IN_MINUTE$2 = 60000; - var MILLISECONDS_IN_DAY = 86400000; + var MILLISECONDS_IN_MINUTE$4 = 60000; + var MILLISECONDS_IN_DAY$1 = 86400000; /** * @category Day Helpers @@ -646,14 +646,14 @@ var startOfDayRight = start_of_day(dirtyDateRight); var timestampLeft = startOfDayLeft.getTime() - - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; var timestampRight = startOfDayRight.getTime() - - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; + startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; // Round the number of days to the nearest integer // because the number of milliseconds in a day is not constant // (e.g. it's different in the day of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$1) } var difference_in_calendar_days = differenceInCalendarDays; @@ -1131,8 +1131,8 @@ var compare_desc = compareDesc; - var MILLISECONDS_IN_MINUTE$4 = 60000; - var MILLISECONDS_IN_WEEK = 604800000; + var MILLISECONDS_IN_MINUTE$2 = 60000; + var MILLISECONDS_IN_WEEK$3 = 604800000; /** * @category ISO Week Helpers @@ -1160,14 +1160,14 @@ var startOfISOWeekRight = start_of_iso_week(dirtyDateRight); var timestampLeft = startOfISOWeekLeft.getTime() - - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; var timestampRight = startOfISOWeekRight.getTime() - - startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$4; + startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$3) } var difference_in_calendar_iso_weeks = differenceInCalendarISOWeeks; @@ -1284,8 +1284,8 @@ var difference_in_calendar_quarters = differenceInCalendarQuarters; - var MILLISECONDS_IN_MINUTE$5 = 60000; - var MILLISECONDS_IN_WEEK$1 = 604800000; + var MILLISECONDS_IN_MINUTE$1 = 60000; + var MILLISECONDS_IN_WEEK$2 = 604800000; /** * @category Week Helpers @@ -1323,14 +1323,14 @@ var startOfWeekRight = start_of_week(dirtyDateRight, dirtyOptions); var timestampLeft = startOfWeekLeft.getTime() - - startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; var timestampRight = startOfWeekRight.getTime() - - startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$5; + startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$1; // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$1) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$2) } var difference_in_calendar_weeks = differenceInCalendarWeeks; @@ -1427,7 +1427,7 @@ var difference_in_milliseconds = differenceInMilliseconds; - var MILLISECONDS_IN_HOUR$2 = 3600000; + var MILLISECONDS_IN_HOUR = 3600000; /** * @category Hour Helpers @@ -1449,7 +1449,7 @@ * //=> 12 */ function differenceInHours (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR$2; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1518,7 +1518,7 @@ var difference_in_iso_years = differenceInISOYears; - var MILLISECONDS_IN_MINUTE$6 = 60000; + var MILLISECONDS_IN_MINUTE = 60000; /** * @category Minute Helpers @@ -1540,7 +1540,7 @@ * //=> 12 */ function differenceInMinutes (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE$6; + var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE; return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } @@ -1920,9 +1920,9 @@ format: build_format_locale() }; - var MINUTES_IN_DAY = 1440; + var MINUTES_IN_DAY$1 = 1440; var MINUTES_IN_ALMOST_TWO_DAYS = 2520; - var MINUTES_IN_MONTH = 43200; + var MINUTES_IN_MONTH$1 = 43200; var MINUTES_IN_TWO_MONTHS = 86400; /** @@ -2070,7 +2070,7 @@ return localize('aboutXHours', 1, localizeOptions) // 1.5 hrs up to 24 hrs - } else if (minutes < MINUTES_IN_DAY) { + } else if (minutes < MINUTES_IN_DAY$1) { var hours = Math.round(minutes / 60); return localize('aboutXHours', hours, localizeOptions) @@ -2079,13 +2079,13 @@ return localize('xDays', 1, localizeOptions) // 1.75 days up to 30 days - } else if (minutes < MINUTES_IN_MONTH) { - var days = Math.round(minutes / MINUTES_IN_DAY); + } else if (minutes < MINUTES_IN_MONTH$1) { + var days = Math.round(minutes / MINUTES_IN_DAY$1); return localize('xDays', days, localizeOptions) // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { - months = Math.round(minutes / MINUTES_IN_MONTH); + months = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('aboutXMonths', months, localizeOptions) } @@ -2093,7 +2093,7 @@ // 2 months up to 12 months if (months < 12) { - var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH$1); return localize('xMonths', nearestMonth, localizeOptions) // 1 year up to max Date @@ -2118,8 +2118,8 @@ var distance_in_words = distanceInWords; - var MINUTES_IN_DAY$1 = 1440; - var MINUTES_IN_MONTH$1 = 43200; + var MINUTES_IN_DAY = 1440; + var MINUTES_IN_MONTH = 43200; var MINUTES_IN_YEAR = 525600; /** @@ -2245,9 +2245,9 @@ unit = 's'; } else if (minutes < 60) { unit = 'm'; - } else if (minutes < MINUTES_IN_DAY$1) { + } else if (minutes < MINUTES_IN_DAY) { unit = 'h'; - } else if (minutes < MINUTES_IN_MONTH$1) { + } else if (minutes < MINUTES_IN_MONTH) { unit = 'd'; } else if (minutes < MINUTES_IN_YEAR) { unit = 'M'; @@ -2271,12 +2271,12 @@ // 1 up to 30 days } else if (unit === 'd') { - days = mathPartial(minutes / MINUTES_IN_DAY$1); + days = mathPartial(minutes / MINUTES_IN_DAY); return localize('xDays', days, localizeOptions) // 1 up to 12 months } else if (unit === 'M') { - months = mathPartial(minutes / MINUTES_IN_MONTH$1); + months = mathPartial(minutes / MINUTES_IN_MONTH); return localize('xMonths', months, localizeOptions) // 1 year up to max Date @@ -2820,7 +2820,7 @@ var get_day_of_year = getDayOfYear; - var MILLISECONDS_IN_WEEK$2 = 604800000; + var MILLISECONDS_IN_WEEK$1 = 604800000; /** * @category ISO Week Helpers @@ -2846,7 +2846,7 @@ // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$2) + 1 + return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1 } var get_iso_week = getISOWeek; @@ -3351,7 +3351,7 @@ var get_iso_day = getISODay; - var MILLISECONDS_IN_WEEK$3 = 604800000; + var MILLISECONDS_IN_WEEK = 604800000; /** * @category ISO Week-Numbering Year Helpers @@ -3377,7 +3377,7 @@ // Round the number of weeks to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK$3) + return Math.round(diff / MILLISECONDS_IN_WEEK) } var get_iso_weeks_in_year = getISOWeeksInYear; @@ -3451,7 +3451,7 @@ var get_month = getMonth; - var MILLISECONDS_IN_DAY$1 = 24 * 60 * 60 * 1000; + var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; /** * @category Range Helpers @@ -3507,7 +3507,7 @@ var differenceInMs = overlapEndDate - overlapStartDate; - return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY$1) + return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY) } var get_overlapping_days_in_ranges = getOverlappingDaysInRanges; @@ -5647,14 +5647,14 @@ const user = "user"; - const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo = `Sunnyvale ${user} ${date}`; + const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo$2 = `Sunnyvale ${user} ${date$2}`; const date$1 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); const foo$1 = `@foo/lib/a ${date$1}`; - const date$2 = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); - const foo$2 = `@foo/lib/a/a/a ${date$2}`; + const date = dateFns.format(new Date(2019, 4, 7), 'MMMM D, YYYY'); + const foo = `@foo/lib/a/a/a ${date}`; const fum = 'Wonderland'; @@ -5665,7 +5665,7 @@ const json_key = "json_value"; console.log( - `${hello}, ${name} in ${fum} ${foo} ${foo$1} ${foo$2} ${far_a} ${far_a_b_c} ${json_key}`); + `${hello}, ${name} in ${fum} ${foo$2} ${foo$1} ${foo} ${far_a} ${far_a_b_c} ${json_key}`); // Test for sequences = false class A { diff --git a/yarn.lock b/yarn.lock index 264b7f25db..b809040aa4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1439,18 +1439,18 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@rollup/plugin-commonjs@14.0.0": - version "14.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-14.0.0.tgz#4285f9ec2db686a31129e5a2b415c94aa1f836f0" - integrity sha512-+PSmD9ePwTAeU106i9FRdc+Zb3XUWyW26mo5Atr2mk82hor8+nPwkztEjFo8/B1fJKfaQDg9aM2bzQkjhi7zOw== +"@rollup/plugin-commonjs@18.0.0": + version "18.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-18.0.0.tgz#50dc7518b5aa9e66a270e529ea85115d269825c4" + integrity sha512-fj92shhg8luw7XbA0HowAqz90oo7qtLGwqTKbyZ8pmOyH8ui5e+u0wPEgeHLH3djcVma6gUCUrjY6w5R2o1u6g== dependencies: - "@rollup/pluginutils" "^3.0.8" + "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" - estree-walker "^1.0.1" - glob "^7.1.2" - is-reference "^1.1.2" - magic-string "^0.25.2" - resolve "^1.11.0" + estree-walker "^2.0.1" + glob "^7.1.6" + is-reference "^1.2.1" + magic-string "^0.25.7" + resolve "^1.17.0" "@rollup/plugin-json@4.1.0": version "4.1.0" @@ -3859,6 +3859,11 @@ estree-walker@^1.0.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== +estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -4335,6 +4340,11 @@ fsevents@^2.1.2, fsevents@~2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== +fsevents@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -4540,7 +4550,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -5299,7 +5309,7 @@ is-redirect@^1.0.0: resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= -is-reference@^1.1.2: +is-reference@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== @@ -6571,20 +6581,13 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -magic-string@^0.25.0: +magic-string@^0.25.0, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== dependencies: sourcemap-codec "^1.4.4" -magic-string@^0.25.2: - version "0.25.3" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" - integrity sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA== - dependencies: - sourcemap-codec "^1.4.4" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -8616,13 +8619,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: dependencies: path-parse "^1.0.6" -resolve@^1.11.0, resolve@^1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - resolve@^1.15.1: version "1.15.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" @@ -8630,6 +8626,13 @@ resolve@^1.15.1: dependencies: path-parse "^1.0.6" +resolve@^1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -8684,12 +8687,12 @@ rollup-pluginutils@^2.3.3: dependencies: estree-walker "^0.6.1" -rollup@2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.3.4.tgz#979e461f8cab1a71aec2d37ce2a434052ae70223" - integrity sha512-8U9x54RCVhrUEV1zon4Pp8kokg1HM0fwzf5vkwe2/rOfyTClarx5e27kFlaoZ7ofJiazWkNQ+dgdG4HuZxkQ9A== +rollup@2.44.0: + version "2.44.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.44.0.tgz#8da324d1c4fd12beef9ae6e12f4068265b6d95eb" + integrity sha512-rGSF4pLwvuaH/x4nAS+zP6UNn5YUDWf/TeEU5IoXSZKBbKRNTCI3qMnYXKZgrC0D2KzS2baiOZt1OlqhMu5rnQ== optionalDependencies: - fsevents "~2.1.2" + fsevents "~2.3.1" rsvp@^4.8.4: version "4.8.5"