webpack 4.41.0 → 4.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,7 +38,7 @@ class RequestShortener {
38
38
  ? dirname.substr(0, dirname.length - 1)
39
39
  : dirname;
40
40
  if (parentDirectory && parentDirectory !== directory) {
41
- this.parentDirectoryRegExp = createRegExpForPath(parentDirectory);
41
+ this.parentDirectoryRegExp = createRegExpForPath(`${parentDirectory}/`);
42
42
  }
43
43
 
44
44
  if (__dirname.length >= 2) {
@@ -67,7 +67,7 @@ class RequestShortener {
67
67
  result = result.replace(this.currentDirectoryRegExp, "!.");
68
68
  }
69
69
  if (this.parentDirectoryRegExp) {
70
- result = result.replace(this.parentDirectoryRegExp, "!..");
70
+ result = result.replace(this.parentDirectoryRegExp, "!../");
71
71
  }
72
72
  if (!this.buildinsAsModule && this.buildinsRegExp) {
73
73
  result = result.replace(this.buildinsRegExp, "!(webpack)");
package/lib/Stats.js CHANGED
@@ -974,16 +974,29 @@ class Stats {
974
974
  }
975
975
  if (typeof obj.builtAt === "number") {
976
976
  const builtAtDate = new Date(obj.builtAt);
977
+ let timeZone = null;
978
+
979
+ try {
980
+ timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
981
+ } catch (err) {
982
+ // disregard the RangeError
983
+ }
984
+
985
+ // Force UTC if runtime timezone could not be detected.
986
+ if (!timeZone || timeZone.toLowerCase() === "etc/unknown") {
987
+ timeZone = "UTC";
988
+ }
977
989
  colors.normal("Built at: ");
978
990
  colors.normal(
979
991
  builtAtDate.toLocaleDateString(undefined, {
980
992
  day: "2-digit",
981
993
  month: "2-digit",
982
- year: "numeric"
994
+ year: "numeric",
995
+ timeZone
983
996
  })
984
997
  );
985
998
  colors.normal(" ");
986
- colors.bold(builtAtDate.toLocaleTimeString());
999
+ colors.bold(builtAtDate.toLocaleTimeString(undefined, { timeZone }));
987
1000
  newline();
988
1001
  }
989
1002
  if (obj.env) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "4.41.0",
3
+ "version": "4.41.1",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
6
6
  "license": "MIT",