Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
923afd68
Unverified
Commit
923afd68
authored
Jun 29, 2020
by
Joe Haddad
Committed by
GitHub
Jun 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade CSSNano Version (#14638)
Fixes #14632 Fixes #14690
parent
6079dc24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
47 additions
and
52 deletions
+47
-52
css-minimizer-plugin.ts
packages/next/build/webpack/plugins/css-minimizer-plugin.ts
+1
-1
index.js
packages/next/compiled/cssnano-simple/index.js
+0
-1
package.json
packages/next/compiled/cssnano-simple/package.json
+0
-1
package.json
packages/next/package.json
+2
-2
taskfile.js
packages/next/taskfile.js
+0
-9
misc.d.ts
packages/next/types/misc.d.ts
+0
-4
index.test.js
test/integration/css-customization/test/index.test.js
+5
-5
index.test.js
test/integration/css-features/test/index.test.js
+1
-1
global.css
.../css-fixtures/compilation-and-prefixing/styles/global.css
+8
-0
index.test.js
test/integration/css/test/index.test.js
+14
-6
index.test.js
test/integration/scss/test/index.test.js
+4
-4
yarn.lock
yarn.lock
+12
-18
No files found.
packages/next/build/webpack/plugins/css-minimizer-plugin.ts
View file @
923afd68
import
{
process
as
minify
}
from
'
next/dist/compiled/
cssnano-simple'
import
{
process
as
minify
}
from
'cssnano-simple'
import
webpack
from
'webpack'
import
webpack
from
'webpack'
import
{
RawSource
,
SourceMapSource
}
from
'webpack-sources'
import
{
RawSource
,
SourceMapSource
}
from
'webpack-sources'
...
...
packages/next/compiled/cssnano-simple/index.js
deleted
100644 → 0
View file @
6079dc24
This diff is collapsed.
Click to expand it.
packages/next/compiled/cssnano-simple/package.json
deleted
100644 → 0
View file @
6079dc24
{
"name"
:
"cssnano-simple"
,
"main"
:
"index.js"
,
"author"
:
"Joe Haddad <timer150@gmail.com>"
,
"license"
:
"MIT"
}
packages/next/package.json
View file @
923afd68
...
@@ -85,6 +85,7 @@
...
@@ -85,6 +85,7 @@
"cacache"
:
"13.0.1"
,
"cacache"
:
"13.0.1"
,
"chokidar"
:
"2.1.8"
,
"chokidar"
:
"2.1.8"
,
"css-loader"
:
"3.5.3"
,
"css-loader"
:
"3.5.3"
,
"cssnano-simple"
:
"1.0.4"
,
"find-cache-dir"
:
"3.3.1"
,
"find-cache-dir"
:
"3.3.1"
,
"jest-worker"
:
"24.9.0"
,
"jest-worker"
:
"24.9.0"
,
"loader-utils"
:
"2.0.0"
,
"loader-utils"
:
"2.0.0"
,
...
@@ -93,7 +94,7 @@
...
@@ -93,7 +94,7 @@
"native-url"
:
"0.3.4"
,
"native-url"
:
"0.3.4"
,
"neo-async"
:
"2.6.1"
,
"neo-async"
:
"2.6.1"
,
"pnp-webpack-plugin"
:
"1.6.4"
,
"pnp-webpack-plugin"
:
"1.6.4"
,
"postcss"
:
"7.0.
29
"
,
"postcss"
:
"7.0.
32
"
,
"prop-types"
:
"15.7.2"
,
"prop-types"
:
"15.7.2"
,
"prop-types-exact"
:
"1.2.0"
,
"prop-types-exact"
:
"1.2.0"
,
"react-is"
:
"16.13.1"
,
"react-is"
:
"16.13.1"
,
...
@@ -169,7 +170,6 @@
...
@@ -169,7 +170,6 @@
"conf"
:
"5.0.0"
,
"conf"
:
"5.0.0"
,
"content-type"
:
"1.0.4"
,
"content-type"
:
"1.0.4"
,
"cookie"
:
"0.4.1"
,
"cookie"
:
"0.4.1"
,
"cssnano-simple"
:
"1.0.2"
,
"debug"
:
"4.1.1"
,
"debug"
:
"4.1.1"
,
"devalue"
:
"2.0.1"
,
"devalue"
:
"2.0.1"
,
"dotenv"
:
"8.2.0"
,
"dotenv"
:
"8.2.0"
,
...
...
packages/next/taskfile.js
View file @
923afd68
...
@@ -171,14 +171,6 @@ export async function ncc_cookie(task, opts) {
...
@@ -171,14 +171,6 @@ export async function ncc_cookie(task, opts) {
.
target
(
'compiled/cookie'
)
.
target
(
'compiled/cookie'
)
}
}
// eslint-disable-next-line camelcase
// eslint-disable-next-line camelcase
externals
[
'cssnano-simple'
]
=
'next/dist/compiled/cssnano-simple'
export
async
function
ncc_cssnano_simple
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
relative
(
__dirname
,
require
.
resolve
(
'cssnano-simple'
)))
.
ncc
({
packageName
:
'cssnano-simple'
,
externals
})
.
target
(
'compiled/cssnano-simple'
)
}
// eslint-disable-next-line camelcase
externals
[
'debug'
]
=
'next/dist/compiled/debug'
externals
[
'debug'
]
=
'next/dist/compiled/debug'
export
async
function
ncc_debug
(
task
,
opts
)
{
export
async
function
ncc_debug
(
task
,
opts
)
{
await
task
await
task
...
@@ -539,7 +531,6 @@ export async function ncc(task) {
...
@@ -539,7 +531,6 @@ export async function ncc(task) {
'ncc_conf'
,
'ncc_conf'
,
'ncc_content_type'
,
'ncc_content_type'
,
'ncc_cookie'
,
'ncc_cookie'
,
'ncc_cssnano_simple'
,
'ncc_debug'
,
'ncc_debug'
,
'ncc_devalue'
,
'ncc_devalue'
,
'ncc_dotenv'
,
'ncc_dotenv'
,
...
...
packages/next/types/misc.d.ts
View file @
923afd68
...
@@ -73,10 +73,6 @@ declare module 'next/dist/compiled/cookie' {
...
@@ -73,10 +73,6 @@ declare module 'next/dist/compiled/cookie' {
import
m
from
'cookie'
import
m
from
'cookie'
export
=
m
export
=
m
}
}
declare
module
'next/dist/compiled/cssnano-simple'
{
import
m
from
'cssnano-simple'
export
=
m
}
declare
module
'next/dist/compiled/debug'
{
declare
module
'next/dist/compiled/debug'
{
import
m
from
'debug'
import
m
from
'debug'
export
=
m
export
=
m
...
...
test/integration/css-customization/test/index.test.js
View file @
923afd68
...
@@ -33,7 +33,7 @@ describe('CSS Customization', () => {
...
@@ -33,7 +33,7 @@ describe('CSS Customization', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`"@media (480px <= width < 768px){::placeholder{color:green}}.video{max-
width:400px;max-height:3
00px}"`
`"@media (480px <= width < 768px){::placeholder{color:green}}.video{max-
height:300px;max-width:4
00px}"`
)
)
// Contains a source map
// Contains a source map
...
@@ -54,7 +54,7 @@ describe('CSS Customization', () => {
...
@@ -54,7 +54,7 @@ describe('CSS Customization', () => {
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
Object {
Object {
"mappings": "AACA,gCACE,cACE,WACF,CACF,CAGA,OACE,
eAA0B,CAA1B,gB
ACF",
"mappings": "AACA,gCACE,cACE,WACF,CACF,CAGA,OACE,
gBAA0B,CAA1B,e
ACF",
"sourcesContent": Array [
"sourcesContent": Array [
"/* this should pass through untransformed */
"/* this should pass through untransformed */
@media (480px <= width < 768px) {
@media (480px <= width < 768px) {
...
@@ -132,7 +132,7 @@ describe('CSS Customization Array', () => {
...
@@ -132,7 +132,7 @@ describe('CSS Customization Array', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`"@media (480px <= width < 768px){a:before{content:\\"\\"}::placeholder{color:green}}.video{max-
width:6400px;max-height:4800px;max-width:400rem;max-height:3
00rem}"`
`"@media (480px <= width < 768px){a:before{content:\\"\\"}::placeholder{color:green}}.video{max-
height:4800px;max-height:300rem;max-width:6400px;max-width:4
00rem}"`
)
)
// Contains a source map
// Contains a source map
...
@@ -153,7 +153,7 @@ describe('CSS Customization Array', () => {
...
@@ -153,7 +153,7 @@ describe('CSS Customization Array', () => {
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
Object {
Object {
"mappings": "AACA,gCACE,SACE,UACF,CACA,cACE,WACF,CACF,CAGA,OACE,
gBAA4B,CAA5B,iBAA4B,CAA5B,gBAA4B,CAA5B,i
BACF",
"mappings": "AACA,gCACE,SACE,UACF,CACA,cACE,WACF,CACF,CAGA,OACE,
iBAA4B,CAA5B,iBAA4B,CAA5B,gBAA4B,CAA5B,g
BACF",
"sourcesContent": Array [
"sourcesContent": Array [
"/* this should pass through untransformed */
"/* this should pass through untransformed */
@media (480px <= width < 768px) {
@media (480px <= width < 768px) {
...
@@ -213,7 +213,7 @@ describe('Bad CSS Customization', () => {
...
@@ -213,7 +213,7 @@ describe('Bad CSS Customization', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`".video{max-
width:400px;max-height:3
00px}"`
`".video{max-
height:300px;max-width:4
00px}"`
)
)
// Contains a source map
// Contains a source map
...
...
test/integration/css-features/test/index.test.js
View file @
923afd68
...
@@ -35,7 +35,7 @@ describe('Browserslist: Old', () => {
...
@@ -35,7 +35,7 @@ describe('Browserslist: Old', () => {
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`"a{
-webkit-animation:none 0s ease 0s 1 normal none running;animation:none 0s ease 0s 1 normal none running;-webkit-backface-visibility:visible;backface-visibility:visible;background:transparent none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:separate;-webkit-border-image:none;border-image:none;-webkit-border-radius:0;border-radius:0;border-spacing:0;bottom:auto;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:content-box;box-sizing:content-box;caption-side:top;clear:none;clip:auto;color:#000;-webkit-columns:auto;-webkit-column-count:auto;-webkit-column-fill:balance;column-fill:balance;grid-column-gap:normal;-webkit-column-gap:normal;column-gap:normal;-webkit-column-rule:medium none currentColor;column-rule:medium none currentColor;-webkit-column-span:1;column-span:1;-webkit-column-width:auto;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:serif;font-size:medium;font-style:normal;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant:normal;font-weight:400;font-stretch:normal;line-height:normal;height:auto;-ms-hyphens:none;hyphens:none;left:auto;letter-spacing:normal;list-style:disc outside none;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;-webkit-perspective:none;perspective:none;-webkit-perspective-origin:50% 50%;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;-webkit-transform:none;transform:none;-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;-webkit-transform-style:flat;transform-style:flat;-webkit-transition:none 0s ease 0s;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:2;width:auto;word-spacing:normal;z-index:auto;all:initial
}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){.image{background-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}}"`
`"a{
clip:auto;grid-column-gap:normal;all:initial;-webkit-animation:none 0s ease 0s 1 normal none running;animation:none 0s ease 0s 1 normal none running;-webkit-backface-visibility:visible;backface-visibility:visible;background:transparent none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:separate;-webkit-border-image:none;border-image:none;-webkit-border-radius:0;border-radius:0;border-spacing:0;bottom:auto;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:content-box;box-sizing:content-box;caption-side:top;clear:none;color:#000;column-fill:balance;-webkit-columns:auto;-webkit-column-count:auto;-webkit-column-fill:balance;-webkit-column-gap:normal;column-gap:normal;-webkit-column-rule:medium none currentColor;column-rule:medium none currentColor;-webkit-column-span:1;column-span:1;-webkit-column-width:auto;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:serif;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-size:medium;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;height:auto;-ms-hyphens:none;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:disc none outside;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;-webkit-perspective:none;perspective:none;-webkit-perspective-origin:50% 50%;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;-webkit-transform:none;transform:none;-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;-webkit-transform-style:flat;transform-style:flat;-webkit-transition:none 0s ease 0s;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:2;width:auto;word-spacing:normal;z-index:auto
}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){.image{background-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}}"`
)
)
})
})
})
})
...
...
test/integration/css-fixtures/compilation-and-prefixing/styles/global.css
View file @
923afd68
...
@@ -7,3 +7,11 @@
...
@@ -7,3 +7,11 @@
.flex-parsing
{
.flex-parsing
{
flex
:
0
0
calc
(
50%
-
var
(
--vertical-gutter
));
flex
:
0
0
calc
(
50%
-
var
(
--vertical-gutter
));
}
}
.transform-parsing
{
transform
:
translate3d
(
0px
,
0px
);
}
.g-docs-sidenav
.filter
::-webkit-input-placeholder
{
opacity
:
80%
;
}
test/integration/css/test/index.test.js
View file @
923afd68
...
@@ -132,7 +132,7 @@ describe('CSS Support', () => {
...
@@ -132,7 +132,7 @@ describe('CSS Support', () => {
expect
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
).
toMatchInlineSnapshot
(
).
toMatchInlineSnapshot
(
`".red-text{color:purple;
font-weight:bolder;color:red}.blue-text{color:orange;font-weight:bolder;color:#00f
}"`
`".red-text{color:purple;
color:red;font-weight:bolder}.blue-text{color:orange;color:#00f;font-weight:bolder
}"`
)
)
})
})
})
})
...
@@ -163,7 +163,7 @@ describe('CSS Support', () => {
...
@@ -163,7 +163,7 @@ describe('CSS Support', () => {
expect
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
).
toMatchInlineSnapshot
(
).
toMatchInlineSnapshot
(
`"@media (min-width:480px) and (max-width:767px){::-moz-placeholder{color:green}:-ms-input-placeholder{color:green}::-ms-input-placeholder{color:green}::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}"`
`"@media (min-width:480px) and (max-width:767px){::-moz-placeholder{color:green}:-ms-input-placeholder{color:green}::-ms-input-placeholder{color:green}::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}
.transform-parsing{transform:translate3d(0,0)}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:80%}
"`
)
)
// Contains a source map
// Contains a source map
...
@@ -184,7 +184,7 @@ describe('CSS Support', () => {
...
@@ -184,7 +184,7 @@ describe('CSS Support', () => {
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
Object {
Object {
"mappings": "AAAA,+CACE,mBACE,WACF,CAFA,uBACE,WACF,CAFA,wBACE,WACF,CAFA,cACE,WACF,CACF,CAEA,cACE,2CACF",
"mappings": "AAAA,+CACE,mBACE,WACF,CAFA,uBACE,WACF,CAFA,wBACE,WACF,CAFA,cACE,WACF,CACF,CAEA,cACE,2CACF
,CAEA,mBACE,0BACF,CAEA,mDACE,WACF
",
"sourcesContent": Array [
"sourcesContent": Array [
"@media (480px <= width < 768px) {
"@media (480px <= width < 768px) {
::placeholder {
::placeholder {
...
@@ -195,6 +195,14 @@ describe('CSS Support', () => {
...
@@ -195,6 +195,14 @@ describe('CSS Support', () => {
.flex-parsing {
.flex-parsing {
flex: 0 0 calc(50% - var(--vertical-gutter));
flex: 0 0 calc(50% - var(--vertical-gutter));
}
}
.transform-parsing {
transform: translate3d(0px, 0px);
}
.g-docs-sidenav .filter::-webkit-input-placeholder {
opacity: 80%;
}
",
",
],
],
"version": 3,
"version": 3,
...
@@ -556,7 +564,7 @@ describe('CSS Support', () => {
...
@@ -556,7 +564,7 @@ describe('CSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
color:red;background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
/^
\.
red-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -602,7 +610,7 @@ describe('CSS Support', () => {
...
@@ -602,7 +610,7 @@ describe('CSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -648,7 +656,7 @@ describe('CSS Support', () => {
...
@@ -648,7 +656,7 @@ describe('CSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
...
test/integration/scss/test/index.test.js
View file @
923afd68
...
@@ -217,7 +217,7 @@ describe('SCSS Support', () => {
...
@@ -217,7 +217,7 @@ describe('SCSS Support', () => {
expect
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
).
toMatchInlineSnapshot
(
).
toMatchInlineSnapshot
(
`".red-text{color:purple;
font-weight:bolder;color:red}.blue-text{color:orange;font-weight:bolder;color:#00f
}"`
`".red-text{color:purple;
color:red;font-weight:bolder}.blue-text{color:orange;color:#00f;font-weight:bolder
}"`
)
)
})
})
})
})
...
@@ -640,7 +640,7 @@ describe('SCSS Support', () => {
...
@@ -640,7 +640,7 @@ describe('SCSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
color:red;background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
/^
\.
red-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -686,7 +686,7 @@ describe('SCSS Support', () => {
...
@@ -686,7 +686,7 @@ describe('SCSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -732,7 +732,7 @@ describe('SCSS Support', () => {
...
@@ -732,7 +732,7 @@ describe('SCSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
...
yarn.lock
View file @
923afd68
...
@@ -5558,18 +5558,20 @@ cssnano-preset-default@^4.0.7:
...
@@ -5558,18 +5558,20 @@ cssnano-preset-default@^4.0.7:
postcss-svgo "^4.0.2"
postcss-svgo "^4.0.2"
postcss-unique-selectors "^4.0.1"
postcss-unique-selectors "^4.0.1"
cssnano-preset-simple@^1.1.0:
cssnano-preset-simple@^1.1.3:
version "1.1.0"
version "1.1.3"
resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.1.0.tgz#f7ce3224456e3043fc2942bf2e0f6fb4040f9e9f"
resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.1.3.tgz#c185f915afcfb803e78e357df48cc77f949eb1d4"
integrity sha512-7iDiM+OSkDlTrH/xGw748mr7FdQtFAy6qFRlTjJevAsG536DPOMeaDucJMqWzyAhcem0VQkTGveUk3bo3ux6hA==
dependencies:
dependencies:
postcss "^7.0.
18
"
postcss "^7.0.
32
"
cssnano-simple@1.0.2:
cssnano-simple@1.0.4:
version "1.0.2"
version "1.0.4"
resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-1.0.2.tgz#64d6e8c5d1a3ccec42065f021a6c0f59d892d40a"
resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-1.0.4.tgz#2d56225795f4afbbb9c21df953cb43df6c589ae1"
integrity sha512-Em/QujEpiqfjT3wksbyHTYpBF2l7lfYuUiLjtCwurc6NqRFb4N/VZjC3djNuO7poFpO410tTcpJ38Qn8xWadcA==
dependencies:
dependencies:
cssnano-preset-simple "^1.1.
0
"
cssnano-preset-simple "^1.1.
3
"
postcss "^7.0.
29
"
postcss "^7.0.
32
"
cssnano-util-get-arguments@^4.0.0:
cssnano-util-get-arguments@^4.0.0:
version "4.0.0"
version "4.0.0"
...
@@ -12666,15 +12668,7 @@ postcss@7.0.21:
...
@@ -12666,15 +12668,7 @@ postcss@7.0.21:
source-map "^0.6.1"
source-map "^0.6.1"
supports-color "^6.1.0"
supports-color "^6.1.0"
postcss@7.0.29, postcss@^7.0.29:
postcss@7.0.32, postcss@^7.0.32:
version "7.0.29"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.29.tgz#d3a903872bd52280b83bce38cdc83ce55c06129e"
dependencies:
chalk "^2.4.2"
source-map "^0.6.1"
supports-color "^6.1.0"
postcss@7.0.32:
version "7.0.32"
version "7.0.32"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d"
integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==
integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment