Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

fix: add missing trailing slash to publicPath - closes #395 #396

Merged
merged 3 commits into from
Dec 30, 2019
Merged

fix: add missing trailing slash to publicPath - closes #395 #396

merged 3 commits into from
Dec 30, 2019

Conversation

DanielRuf
Copy link
Contributor

Type:
bugfix

The following has been addressed in the PR:

  • Add missing trailing slash to publicPath for the webpack builds

Description:

Without the trailing slash we get staticfonts instead of static/fonts.
This can be tested by running a yarn build and searching for staticfontsin the staticfolder.

The only relevant changes that I see when I do a diff -u -r:

--- static-old/0.style.b3d2b69b057068c678ca.css	2019-12-24 15:30:32.000000000 +0100
+++ static-new/0.style.b3d2b69b057068c678ca.css	2019-12-24 15:27:03.000000000 +0100
@@ -1,10 +1,10 @@
 /*!
  * 
  *     Name: vendors
- *     Generated on: 1577197511263
+ *     Generated on: 1577197597397
  *     Package: @verdaccio/ui-theme
  *     Version: v0.3.9
  *     License: MIT
  *     
  */
-/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:100;src:local("Roboto Thin "),local("Roboto-Thin"),url(/-/staticfonts/roboto-latin-100.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-100.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:100;src:local("Roboto Thin italic"),local("Roboto-Thinitalic"),url(/-/staticfonts/roboto-latin-100italic.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-100italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:local("Roboto Light "),local("Roboto-Light"),url(/-/staticfonts/roboto-latin-300.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-300.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:300;src:local("Roboto Light italic"),local("Roboto-Lightitalic"),url(/-/staticfonts/roboto-latin-300italic.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-300italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:local("Roboto Regular "),local("Roboto-Regular"),url(/-/staticfonts/roboto-latin-400.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-400.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:400;src:local("Roboto Regular italic"),local("Roboto-Regularitalic"),url(/-/staticfonts/roboto-latin-400italic.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-400italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:local("Roboto Medium "),local("Roboto-Medium"),url(/-/staticfonts/roboto-latin-500.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-500.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:500;src:local("Roboto Medium italic"),local("Roboto-Mediumitalic"),url(/-/staticfonts/roboto-latin-500italic.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-500italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:local("Roboto Bold "),local("Roboto-Bold"),url(/-/staticfonts/roboto-latin-700.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-700.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:700;src:local("Roboto Bold italic"),local("Roboto-Bolditalic"),url(/-/staticfonts/roboto-latin-700italic.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-700italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:900;src:local("Roboto Black "),local("Roboto-Black"),url(/-/staticfonts/roboto-latin-900.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-900.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:900;src:local("Roboto Black italic"),local("Roboto-Blackitalic"),url(/-/staticfonts/roboto-latin-900italic.woff2) format("woff2"),url(/-/staticfonts/roboto-latin-900italic.woff) format("woff")}
\ No newline at end of file
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:100;src:local("Roboto Thin "),local("Roboto-Thin"),url(/-/static/fonts/roboto-latin-100.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-100.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:100;src:local("Roboto Thin italic"),local("Roboto-Thinitalic"),url(/-/static/fonts/roboto-latin-100italic.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-100italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:local("Roboto Light "),local("Roboto-Light"),url(/-/static/fonts/roboto-latin-300.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-300.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:300;src:local("Roboto Light italic"),local("Roboto-Lightitalic"),url(/-/static/fonts/roboto-latin-300italic.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-300italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:local("Roboto Regular "),local("Roboto-Regular"),url(/-/static/fonts/roboto-latin-400.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-400.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:400;src:local("Roboto Regular italic"),local("Roboto-Regularitalic"),url(/-/static/fonts/roboto-latin-400italic.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-400italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:local("Roboto Medium "),local("Roboto-Medium"),url(/-/static/fonts/roboto-latin-500.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-500.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:500;src:local("Roboto Medium italic"),local("Roboto-Mediumitalic"),url(/-/static/fonts/roboto-latin-500italic.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-500italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:local("Roboto Bold "),local("Roboto-Bold"),url(/-/static/fonts/roboto-latin-700.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-700.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:700;src:local("Roboto Bold italic"),local("Roboto-Bolditalic"),url(/-/static/fonts/roboto-latin-700italic.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-700italic.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:900;src:local("Roboto Black "),local("Roboto-Black"),url(/-/static/fonts/roboto-latin-900.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-900.woff) format("woff")}@font-face{font-family:Roboto;font-style:italic;font-display:swap;font-weight:900;src:local("Roboto Black italic"),local("Roboto-Blackitalic"),url(/-/static/fonts/roboto-latin-900italic.woff2) format("woff2"),url(/-/static/fonts/roboto-latin-900italic.woff) format("woff")}
\ No newline at end of file

After beautifying it in VSCode and doing another diff:

diff -u -r static-old/0.style.b3d2b69b057068c678ca.css static-new/0.style.b3d2b69b057068c678ca.css
--- static-old/0.style.b3d2b69b057068c678ca.css	2019-12-24 15:34:07.000000000 +0100
+++ static-new/0.style.b3d2b69b057068c678ca.css	2019-12-24 15:34:20.000000000 +0100
@@ -1,7 +1,7 @@
 /*!
  * 
  *     Name: vendors
- *     Generated on: 1577197511263
+ *     Generated on: 1577197597397
  *     Package: @verdaccio/ui-theme
  *     Version: v0.3.9
  *     License: MIT
@@ -170,7 +170,7 @@
     font-style: normal;
     font-display: swap;
     font-weight: 100;
-    src: local("Roboto Thin "), local("Roboto-Thin"), url(/-/staticfonts/roboto-latin-100.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-100.woff) format("woff")
+    src: local("Roboto Thin "), local("Roboto-Thin"), url(/-/static/fonts/roboto-latin-100.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-100.woff) format("woff")
 }
 
 @font-face {
@@ -178,7 +178,7 @@
     font-style: italic;
     font-display: swap;
     font-weight: 100;
-    src: local("Roboto Thin italic"), local("Roboto-Thinitalic"), url(/-/staticfonts/roboto-latin-100italic.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-100italic.woff) format("woff")
+    src: local("Roboto Thin italic"), local("Roboto-Thinitalic"), url(/-/static/fonts/roboto-latin-100italic.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-100italic.woff) format("woff")
 }
 
 @font-face {
@@ -186,7 +186,7 @@
     font-style: normal;
     font-display: swap;
     font-weight: 300;
-    src: local("Roboto Light "), local("Roboto-Light"), url(/-/staticfonts/roboto-latin-300.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-300.woff) format("woff")
+    src: local("Roboto Light "), local("Roboto-Light"), url(/-/static/fonts/roboto-latin-300.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-300.woff) format("woff")
 }
 
 @font-face {
@@ -194,7 +194,7 @@
     font-style: italic;
     font-display: swap;
     font-weight: 300;
-    src: local("Roboto Light italic"), local("Roboto-Lightitalic"), url(/-/staticfonts/roboto-latin-300italic.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-300italic.woff) format("woff")
+    src: local("Roboto Light italic"), local("Roboto-Lightitalic"), url(/-/static/fonts/roboto-latin-300italic.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-300italic.woff) format("woff")
 }
 
 @font-face {
@@ -202,7 +202,7 @@
     font-style: normal;
     font-display: swap;
     font-weight: 400;
-    src: local("Roboto Regular "), local("Roboto-Regular"), url(/-/staticfonts/roboto-latin-400.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-400.woff) format("woff")
+    src: local("Roboto Regular "), local("Roboto-Regular"), url(/-/static/fonts/roboto-latin-400.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-400.woff) format("woff")
 }
 
 @font-face {
@@ -210,7 +210,7 @@
     font-style: italic;
     font-display: swap;
     font-weight: 400;
-    src: local("Roboto Regular italic"), local("Roboto-Regularitalic"), url(/-/staticfonts/roboto-latin-400italic.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-400italic.woff) format("woff")
+    src: local("Roboto Regular italic"), local("Roboto-Regularitalic"), url(/-/static/fonts/roboto-latin-400italic.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-400italic.woff) format("woff")
 }
 
 @font-face {
@@ -218,7 +218,7 @@
     font-style: normal;
     font-display: swap;
     font-weight: 500;
-    src: local("Roboto Medium "), local("Roboto-Medium"), url(/-/staticfonts/roboto-latin-500.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-500.woff) format("woff")
+    src: local("Roboto Medium "), local("Roboto-Medium"), url(/-/static/fonts/roboto-latin-500.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-500.woff) format("woff")
 }
 
 @font-face {
@@ -226,7 +226,7 @@
     font-style: italic;
     font-display: swap;
     font-weight: 500;
-    src: local("Roboto Medium italic"), local("Roboto-Mediumitalic"), url(/-/staticfonts/roboto-latin-500italic.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-500italic.woff) format("woff")
+    src: local("Roboto Medium italic"), local("Roboto-Mediumitalic"), url(/-/static/fonts/roboto-latin-500italic.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-500italic.woff) format("woff")
 }
 
 @font-face {
@@ -234,7 +234,7 @@
     font-style: normal;
     font-display: swap;
     font-weight: 700;
-    src: local("Roboto Bold "), local("Roboto-Bold"), url(/-/staticfonts/roboto-latin-700.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-700.woff) format("woff")
+    src: local("Roboto Bold "), local("Roboto-Bold"), url(/-/static/fonts/roboto-latin-700.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-700.woff) format("woff")
 }
 
 @font-face {
@@ -242,7 +242,7 @@
     font-style: italic;
     font-display: swap;
     font-weight: 700;
-    src: local("Roboto Bold italic"), local("Roboto-Bolditalic"), url(/-/staticfonts/roboto-latin-700italic.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-700italic.woff) format("woff")
+    src: local("Roboto Bold italic"), local("Roboto-Bolditalic"), url(/-/static/fonts/roboto-latin-700italic.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-700italic.woff) format("woff")
 }
 
 @font-face {
@@ -250,7 +250,7 @@
     font-style: normal;
     font-display: swap;
     font-weight: 900;
-    src: local("Roboto Black "), local("Roboto-Black"), url(/-/staticfonts/roboto-latin-900.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-900.woff) format("woff")
+    src: local("Roboto Black "), local("Roboto-Black"), url(/-/static/fonts/roboto-latin-900.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-900.woff) format("woff")
 }
 
 @font-face {
@@ -258,5 +258,5 @@
     font-style: italic;
     font-display: swap;
     font-weight: 900;
-    src: local("Roboto Black italic"), local("Roboto-Blackitalic"), url(/-/staticfonts/roboto-latin-900italic.woff2) format("woff2"), url(/-/staticfonts/roboto-latin-900italic.woff) format("woff")
+    src: local("Roboto Black italic"), local("Roboto-Blackitalic"), url(/-/static/fonts/roboto-latin-900italic.woff2) format("woff2"), url(/-/static/fonts/roboto-latin-900italic.woff) format("woff")
 }

@DanielRuf DanielRuf requested a review from a team December 24, 2019 14:37
(cherry picked from commit fe6494f)
@codecov
Copy link

codecov bot commented Dec 28, 2019

Codecov Report

Merging #396 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #396   +/-   ##
=======================================
  Coverage   87.81%   87.81%           
=======================================
  Files         137      137           
  Lines         952      952           
  Branches      211      211           
=======================================
  Hits          836      836           
  Misses        102      102           
  Partials       14       14

@juanpicado juanpicado merged commit bae9638 into verdaccio:master Dec 30, 2019
@DanielRuf DanielRuf deleted the fix/trailing-slash-publicpath branch December 30, 2019 09:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants