diff --git a/package-lock.json b/package-lock.json index 7ac5826..7ebfd41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,15 @@ { "name": "rollup-plugin-sass", - "version": "1.2.13", + "version": "1.2.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rollup-plugin-sass", - "version": "1.2.13", + "version": "1.2.14", "license": "MIT", "dependencies": { "@rollup/pluginutils": "^3.1.0", - "icss-utils": "^5.1.0", "resolve": "^1.5.0", "sass": "^1.7.2" }, @@ -24,6 +23,7 @@ "coveralls": "^3.1.1", "downlevel-dts": "^0.10.0", "eslint": "^7.32.0", + "icss-utils": "^5.1.0", "jsdom": "^17.0.0", "nyc": "^15.1.0", "postcss": "^8.4.16", @@ -3022,6 +3022,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, "engines": { "node": "^10 || ^12 || >= 14" }, @@ -3838,6 +3839,7 @@ "version": "3.3.4", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "dev": true, "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -4389,7 +4391,8 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.0", @@ -4519,6 +4522,7 @@ "version": "8.4.16", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "dev": true, "funding": [ { "type": "opencollective", @@ -5087,6 +5091,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -8168,6 +8173,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, "requires": {} }, "ignore": { @@ -8782,7 +8788,8 @@ "nanoid": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "dev": true }, "natural-compare": { "version": "1.4.0", @@ -9201,7 +9208,8 @@ "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "picomatch": { "version": "2.3.0", @@ -9285,6 +9293,7 @@ "version": "8.4.16", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "dev": true, "requires": { "nanoid": "^3.3.4", "picocolors": "^1.0.0", @@ -9677,7 +9686,8 @@ "source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true }, "spawn-wrap": { "version": "2.0.0", diff --git a/package.json b/package.json index 9e6059d..6f2c90d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup-plugin-sass", - "version": "1.2.13", + "version": "1.2.14", "description": "Rollup Sass files.", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -57,7 +57,6 @@ }, "dependencies": { "@rollup/pluginutils": "^3.1.0", - "icss-utils": "^5.1.0", "resolve": "^1.5.0", "sass": "^1.7.2" }, @@ -71,6 +70,7 @@ "coveralls": "^3.1.1", "downlevel-dts": "^0.10.0", "eslint": "^7.32.0", + "icss-utils": "^5.1.0", "jsdom": "^17.0.0", "nyc": "^15.1.0", "postcss": "^8.4.16", diff --git a/test/assets/expect_a--with-icss-exports.css b/test/assets/expect_a--with-icss-exports.css index b491714..f480c91 100644 --- a/test/assets/expect_a--with-icss-exports.css +++ b/test/assets/expect_a--with-icss-exports.css @@ -1 +1 @@ -body{color:red;background:blue;} +body{color:red;background:blue} diff --git a/test/index.test.ts b/test/index.test.ts index 7bca199..2aa7fd1 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -299,24 +299,19 @@ test('should support processor return type `Promise<{css: string, icssExport: {} out = Object.assign({}, extractedIcss.icssExports, { css: cleanedCss, }); - console.table(extractedIcss); - console.log(out); + // console.table(extractedIcss); + // console.log(out); resolve(out); }), options: sassOptions, }), ], }), - {output} = await outputBundle.generate(generateOptions); - - outputBundle.write({ - ...generateOptions, - file: path.join(tmpDir, 'with--icss-exports.js'), - }); - // console.log('output:', output); + {output} = await outputBundle.generate(generateOptions), + rslt = squash(unwrap(output)); - t.true(squash(unwrap(output)).includes(expectA2)); - t.true(squash(unwrap(output)).includes(expectB)); + t.true(rslt.includes(expectA2)); + t.true(rslt.includes(expectB)); }); test('should processor throw error', async t => { @@ -482,6 +477,6 @@ test('When `sourcemap` is set, to `true`, adjacent source map file should be out }); test.after(async (): Promise => { - // return fs.rmdir(tmpDir, {recursive: true}) - // .catch(error); + return fs.rmdir(tmpDir, {recursive: true}) + .catch(error); });