diff --git a/package-lock.json b/package-lock.json index 741a4921..f9ff5276 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1346,9 +1346,9 @@ "dev": true }, "@types/node": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz", - "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==", + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.3.tgz", + "integrity": "sha512-zkOxCS/fA+3SsdA+9Yun0iANxzhQRiNwTvJSr6N95JhuJ/x27z9G2URx1Jpt3zYFfCGUXZGL5UDxt5eyLE7wgw==", "dev": true }, "@types/normalize-package-data": { @@ -2390,14 +2390,14 @@ } }, "browserslist": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.0.tgz", - "integrity": "sha512-Jk0YFwXBuMOOol8n6FhgkDzn3mY9PYLYGk29zybF05SbRTsMgPqmTNeQQhOghCxq5oFqAXE3u4sYddr4C0uRhg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.1.tgz", + "integrity": "sha512-1MC18ooMPRG2UuVFJTHFIAkk6mpByJfxCrnUyvSlu/hyQSFHMrlhM02SzNuCV+quTP4CKmqtOMAIjrifrpBJXQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000967", - "electron-to-chromium": "^1.3.133", - "node-releases": "^1.1.19" + "caniuse-lite": "^1.0.30000971", + "electron-to-chromium": "^1.3.137", + "node-releases": "^1.1.21" } }, "bser": { diff --git a/package.json b/package.json index 6f87397a..ee241c9d 100644 --- a/package.json +++ b/package.json @@ -41,10 +41,10 @@ "webpack": "^4.0.0" }, "dependencies": { + "camelcase": "^5.2.0", "cssesc": "^3.0.0", "icss-utils": "^4.1.0", "loader-utils": "^1.2.3", - "camelcase": "^5.2.0", "normalize-path": "^3.0.0", "postcss": "^7.0.14", "postcss-modules-extract-imports": "^2.0.0", diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index a359ece6..8a881860 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -127,8 +127,11 @@ exports[`loader should compile with \`css\` entry point (with \`modules\` and sc exports[`loader should compile with \`css\` entry point (with \`modules\` and scope \`global\`): module (evaluated) 1`] = ` Array [ Array [ - null, - "nothing", + 2, + ".foo { + color: red; +} +", "", ], Array [ @@ -139,11 +142,11 @@ Array [ .class { color: red; - background: url(nothing); + background: url(/webpack/public/path/img.png); } .class-duplicate-url { - background: url(nothing); + background: url(/webpack/public/path/img.png); } :root { @@ -416,8 +419,11 @@ exports[`loader should compile with \`css\` entry point (with \`modules\` and sc exports[`loader should compile with \`css\` entry point (with \`modules\` and scope \`local\`): module (evaluated) 1`] = ` Array [ Array [ - null, - "nothing", + 2, + ".KTxgbb6qrDrjy0obHlZaJ { + color: red; +} +", "", ], Array [ @@ -428,11 +434,11 @@ Array [ ._1PSZ4tK4URrenXyNSoawrx { color: red; - background: url(nothing); + background: url(/webpack/public/path/img.png); } ._3YYoEr128Gk7ZgfRycu4tr { - background: url(nothing); + background: url(/webpack/public/path/img.png); } :root { @@ -729,8 +735,11 @@ exports[`loader should compile with \`css\` entry point: escape 1`] = ` exports[`loader should compile with \`css\` entry point: module (evaluated) 1`] = ` Array [ Array [ - null, - "nothing", + 2, + ".foo { + color: red; +} +", "", ], Array [ @@ -741,11 +750,11 @@ Array [ .class { color: red; - background: url(nothing); + background: url(/webpack/public/path/img.png); } .class-duplicate-url { - background: url(nothing); + background: url(/webpack/public/path/img.png); } :root { @@ -1018,8 +1027,11 @@ exports[`loader should compile with \`js\` entry point: escape 1`] = ` exports[`loader should compile with \`js\` entry point: module (evaluated) 1`] = ` Array [ Array [ - null, - "nothing", + 2, + ".foo { + color: red; +} +", "", ], Array [ @@ -1030,11 +1042,11 @@ Array [ .class { color: red; - background: url(nothing); + background: url(/webpack/public/path/img.png); } .class-duplicate-url { - background: url(nothing); + background: url(/webpack/public/path/img.png); } :root { diff --git a/test/helpers.js b/test/helpers.js index 67a9d442..8a618783 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -58,6 +58,7 @@ function evaluated(output, modules, moduleId = 1) { 'modules/tests-cases/composes-multiple', 'modules/tests-cases/composes-with-importing', 'modules/tests-cases/media-2', + '.', ].map((importedPath) => path.resolve( __dirname,