Unverified Commit 0d3671c2 authored by Ludovico Fischer's avatar Ludovico Fischer Committed by GitHub

Update to postcss-loader 4.0.2. (#17458)

Co-authored-by: 's avatarTim Neutkens <timneutkens@me.com>
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 58edd099
...@@ -40,8 +40,7 @@ export function getGlobalCssLoader( ...@@ -40,8 +40,7 @@ export function getGlobalCssLoader(
loaders.push({ loaders.push({
loader: require.resolve('next/dist/compiled/postcss-loader'), loader: require.resolve('next/dist/compiled/postcss-loader'),
options: { options: {
ident: '__nextjs_postcss', postcssOptions: { plugins: postCssPlugins, config: false },
plugins: postCssPlugins,
sourceMap: true, sourceMap: true,
}, },
}) })
......
...@@ -56,8 +56,7 @@ export function getCssModuleLoader( ...@@ -56,8 +56,7 @@ export function getCssModuleLoader(
loaders.push({ loaders.push({
loader: require.resolve('next/dist/compiled/postcss-loader'), loader: require.resolve('next/dist/compiled/postcss-loader'),
options: { options: {
ident: '__nextjs_postcss', postcssOptions: { plugins: postCssPlugins, config: false },
plugins: postCssPlugins,
sourceMap: true, sourceMap: true,
}, },
}) })
......
...@@ -12,9 +12,9 @@ export async function __overrideCssConfiguration( ...@@ -12,9 +12,9 @@ export async function __overrideCssConfiguration(
if ( if (
rule.options && rule.options &&
typeof rule.options === 'object' && typeof rule.options === 'object' &&
rule.options['ident'] === '__nextjs_postcss' typeof rule.options.postcssOptions === 'object'
) { ) {
rule.options.plugins = postCssPlugins rule.options.postcssOptions.plugins = postCssPlugins
} else if (Array.isArray(rule.oneOf)) { } else if (Array.isArray(rule.oneOf)) {
rule.oneOf.forEach(patch) rule.oneOf.forEach(patch)
} else if (Array.isArray(rule.use)) { } else if (Array.isArray(rule.use)) {
......
License (MIT) Copyright JS Foundation and other contributors
Copyright 2017 Andrey Sitnik <andrey@sitnik.ru> Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be
this software and associated documentation files (the "Software"), to deal in included in all copies or substantial portions of the Software.
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
copies or substantial portions of the Software. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN \ No newline at end of file
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"name":"postcss-loader","main":"index.js","author":"Andrey Sitnik <andrey@sitnik.ru>","license":"MIT"} {"name":"postcss-loader","main":"cjs.js","author":"Andrey Sitnik <andrey@sitnik.ru>","license":"MIT"}
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
"ora": "4.0.4", "ora": "4.0.4",
"path-to-regexp": "6.1.0", "path-to-regexp": "6.1.0",
"postcss-flexbugs-fixes": "4.2.1", "postcss-flexbugs-fixes": "4.2.1",
"postcss-loader": "3.0.0", "postcss-loader": "4.0.3",
"postcss-preset-env": "6.7.0", "postcss-preset-env": "6.7.0",
"raw-body": "2.4.1", "raw-body": "2.4.1",
"recast": "0.18.5", "recast": "0.18.5",
......
...@@ -812,13 +812,11 @@ test('css syntax errors', async () => { ...@@ -812,13 +812,11 @@ test('css syntax errors', async () => {
await session.patch('index.module.css', `.button {`) await session.patch('index.module.css', `.button {`)
expect(await session.hasRedbox(true)).toBe(true) expect(await session.hasRedbox(true)).toBe(true)
const source = await session.getRedboxSource() const source = await session.getRedboxSource()
expect(source).toMatchInlineSnapshot(` expect(source).toMatch('./index.module.css:1:1')
"./index.module.css:1:1 expect(source).toMatch('Syntax error: ')
Syntax error: Unclosed block expect(source).toMatch('Unclosed block')
expect(source).toMatch('> 1 | .button {')
> 1 | .button { expect(source).toMatch(' | ^')
| ^"
`)
// Not local error // Not local error
await session.patch('index.module.css', `button {}`) await session.patch('index.module.css', `button {}`)
...@@ -829,7 +827,7 @@ test('css syntax errors', async () => { ...@@ -829,7 +827,7 @@ test('css syntax errors', async () => {
Syntax error: Selector \\"button\\" is not pure (pure selectors must contain at least one local class or id) Syntax error: Selector \\"button\\" is not pure (pure selectors must contain at least one local class or id)
> 1 | button {} > 1 | button {}
| ^" | ^"
`) `)
await cleanup() await cleanup()
......
...@@ -5766,6 +5766,17 @@ cosmiconfig@^6.0.0: ...@@ -5766,6 +5766,17 @@ cosmiconfig@^6.0.0:
path-type "^4.0.0" path-type "^4.0.0"
yaml "^1.7.2" yaml "^1.7.2"
cosmiconfig@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3"
integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==
dependencies:
"@types/parse-json" "^4.0.0"
import-fresh "^3.2.1"
parse-json "^5.0.0"
path-type "^4.0.0"
yaml "^1.10.0"
coveralls@3.0.3: coveralls@3.0.3:
version "3.0.3" version "3.0.3"
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.3.tgz#83b1c64aea1c6afa69beaf50b55ac1bc4d13e2b8" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.3.tgz#83b1c64aea1c6afa69beaf50b55ac1bc4d13e2b8"
...@@ -8659,7 +8670,7 @@ import-fresh@^2.0.0: ...@@ -8659,7 +8670,7 @@ import-fresh@^2.0.0:
caller-path "^2.0.0" caller-path "^2.0.0"
resolve-from "^3.0.0" resolve-from "^3.0.0"
import-fresh@^3.0.0, import-fresh@^3.1.0: import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1:
version "3.2.1" version "3.2.1"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
dependencies: dependencies:
...@@ -10288,6 +10299,11 @@ klona@^2.0.3: ...@@ -10288,6 +10299,11 @@ klona@^2.0.3:
resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.3.tgz#98274552c513583ad7a01456a789a2a0b4a2a538" resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.3.tgz#98274552c513583ad7a01456a789a2a0b4a2a538"
integrity sha512-CgPOT3ZadDpXxKcfV56lEQ9OQSZ42Mk26gnozI+uN/k39vzD8toUhRQoqsX0m9Q3eMPEfsLWmtyUpK/yqST4yg== integrity sha512-CgPOT3ZadDpXxKcfV56lEQ9OQSZ42Mk26gnozI+uN/k39vzD8toUhRQoqsX0m9Q3eMPEfsLWmtyUpK/yqST4yg==
klona@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0"
integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==
ky-universal@0.6.0: ky-universal@0.6.0:
version "0.6.0" version "0.6.0"
resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.6.0.tgz#a91c265c80c38f750e65bbc6d72df16f5b58691f" resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.6.0.tgz#a91c265c80c38f750e65bbc6d72df16f5b58691f"
...@@ -12948,6 +12964,17 @@ postcss-loader@3.0.0: ...@@ -12948,6 +12964,17 @@ postcss-loader@3.0.0:
postcss-load-config "^2.0.0" postcss-load-config "^2.0.0"
schema-utils "^1.0.0" schema-utils "^1.0.0"
postcss-loader@4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.0.3.tgz#337f51bbdfb02269fb42f7db9fc7f0a93c1b2e3f"
integrity sha512-jHboC/AOnJLPu8/974hODCJ/rNAa2YhhJOclUeuRlAmFpKmEcBY6az8y1ejHyYc2LThzPl8qPRekh2Yz3CiRKA==
dependencies:
cosmiconfig "^7.0.0"
klona "^2.0.4"
loader-utils "^2.0.0"
schema-utils "^2.7.1"
semver "^7.3.2"
postcss-logical@^3.0.0: postcss-logical@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-3.0.0.tgz#2495d0f8b82e9f262725f75f9401b34e7b45d5b5" resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-3.0.0.tgz#2495d0f8b82e9f262725f75f9401b34e7b45d5b5"
...@@ -16177,6 +16204,7 @@ text-table@0.2.0, text-table@^0.2.0: ...@@ -16177,6 +16204,7 @@ text-table@0.2.0, text-table@^0.2.0:
thread-loader@2.1.3: thread-loader@2.1.3:
version "2.1.3" version "2.1.3"
resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-2.1.3.tgz#cbd2c139fc2b2de6e9d28f62286ab770c1acbdda" resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-2.1.3.tgz#cbd2c139fc2b2de6e9d28f62286ab770c1acbdda"
integrity sha512-wNrVKH2Lcf8ZrWxDF/khdlLlsTMczdcwPA9VEK4c2exlEPynYWxi9op3nPTo5lAnDIkE0rQEB3VBP+4Zncc9Hg==
dependencies: dependencies:
loader-runner "^2.3.1" loader-runner "^2.3.1"
loader-utils "^1.1.0" loader-utils "^1.1.0"
...@@ -17270,6 +17298,11 @@ yallist@^4.0.0: ...@@ -17270,6 +17298,11 @@ yallist@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
yaml@^1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
yaml@^1.7.2: yaml@^1.7.2:
version "1.9.2" version "1.9.2"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.9.2.tgz#f0cfa865f003ab707663e4f04b3956957ea564ed" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.9.2.tgz#f0cfa865f003ab707663e4f04b3956957ea564ed"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment