diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 93eaafd..a21e3e4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,18 +22,3 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - build-test-publish-to-github-pkgs: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package-lock.json b/package-lock.json index c30a04f..4a267d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,24 +1,22 @@ { "name": "rollup-plugin-sass", - "version": "1.12.17", + "version": "1.12.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rollup-plugin-sass", - "version": "1.12.17", + "version": "1.12.18", "license": "MIT", "dependencies": { - "@rollup/pluginutils": "^3.1.0", + "@rollup/pluginutils": "^3 || ^4 || ^5", "resolve": "^1.5.0", "sass": "^1.7.2" }, "devDependencies": { "@ava/typescript": "^3.0.1", - "@types/node": "^15.14.9", + "@types/node": "^18.14.6", "@types/resolve": "^0.0.8", - "@types/rollup": "^0.54.0", - "@types/sass": "^1.16.1", "ava": "^4.3.1", "coveralls": "^3.1.1", "downlevel-dts": "^0.10.0", @@ -27,7 +25,7 @@ "jsdom": "^17.0.0", "nyc": "^15.1.0", "postcss": "^8.4.16", - "rollup": "^1.32.1", + "rollup": "^1 || ^2 || ^3", "sinon": "^7.2.2", "ts-node": "^10.9.1", "typescript": "^4.7.4" @@ -752,9 +750,9 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" }, "node_modules/@types/node": { - "version": "15.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", - "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" + "version": "18.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz", + "integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==" }, "node_modules/@types/resolve": { "version": "0.0.8", @@ -765,25 +763,6 @@ "@types/node": "*" } }, - "node_modules/@types/rollup": { - "version": "0.54.0", - "resolved": "https://registry.npmjs.org/@types/rollup/-/rollup-0.54.0.tgz", - "integrity": "sha512-oeYztLHhQ98jnr+u2cs1c3tHOGtpzrm9DJlIdEjznwoXWidUbrI+X6ib7zCkPIbB7eJ7VbbKNQ5n/bPnSg6Naw==", - "deprecated": "This is a stub types definition for rollup (https://github.com/rollup/rollup). rollup provides its own type definitions, so you don't need @types/rollup installed!", - "dev": true, - "dependencies": { - "rollup": "*" - } - }, - "node_modules/@types/sass": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.0.tgz", - "integrity": "sha512-DPSXNJ1rYLo88GyF9tuB4bsYGfpKI1a4+wOQmc+LI1SUoocm9QLRSpz0GxxuyjmJsYFIQo/dDlRSSpIXngff+w==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -6473,9 +6452,9 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" }, "@types/node": { - "version": "15.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", - "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" + "version": "18.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz", + "integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==" }, "@types/resolve": { "version": "0.0.8", @@ -6486,24 +6465,6 @@ "@types/node": "*" } }, - "@types/rollup": { - "version": "0.54.0", - "resolved": "https://registry.npmjs.org/@types/rollup/-/rollup-0.54.0.tgz", - "integrity": "sha512-oeYztLHhQ98jnr+u2cs1c3tHOGtpzrm9DJlIdEjznwoXWidUbrI+X6ib7zCkPIbB7eJ7VbbKNQ5n/bPnSg6Naw==", - "dev": true, - "requires": { - "rollup": "*" - } - }, - "@types/sass": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.0.tgz", - "integrity": "sha512-DPSXNJ1rYLo88GyF9tuB4bsYGfpKI1a4+wOQmc+LI1SUoocm9QLRSpz0GxxuyjmJsYFIQo/dDlRSSpIXngff+w==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", diff --git a/package.json b/package.json index 9370eec..809b9a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup-plugin-sass", - "version": "1.12.18", + "version": "1.12.19", "description": "Rollup Sass files.", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -56,16 +56,14 @@ ] }, "dependencies": { - "@rollup/pluginutils": "^3.1.0", + "@rollup/pluginutils": "^3 || ^4 || ^5", "resolve": "^1.5.0", "sass": "^1.7.2" }, "devDependencies": { "@ava/typescript": "^3.0.1", - "@types/node": "^15.14.9", + "@types/node": "^18.14.6", "@types/resolve": "^0.0.8", - "@types/rollup": "^0.54.0", - "@types/sass": "^1.16.1", "ava": "^4.3.1", "coveralls": "^3.1.1", "downlevel-dts": "^0.10.0", @@ -74,7 +72,7 @@ "jsdom": "^17.0.0", "nyc": "^15.1.0", "postcss": "^8.4.16", - "rollup": "^1.32.1", + "rollup": "^1 || ^2 || ^3", "sinon": "^7.2.2", "ts-node": "^10.9.1", "typescript": "^4.7.4" diff --git a/scripts/clean-and-run-downlevel-dts.js b/scripts/clean-and-run-downlevel-dts.js index 0cd4a83..3b92397 100644 --- a/scripts/clean-and-run-downlevel-dts.js +++ b/scripts/clean-and-run-downlevel-dts.js @@ -23,30 +23,33 @@ const fs = require('fs').promises, // ---- (fs.rm ? fs.rm : fs.rmdir)(outputDir, {recursive: true}) - .then(() => fs.mkdir(outputDir)) + // If error is any other than "file doesn't exist"/"ENOENT" ensure error is thrown. + .catch(err => err.code !== 'ENOENT' ? error(err) : null) - .then(() => fs.copyFile(tsConfigFilePath, tsConfigOutFilePath)) + .then(() => fs.mkdir(outputDir)) - // Run downlevel-dts - .then(() => new Promise((resolve, reject) => { + .then(() => fs.copyFile(tsConfigFilePath, tsConfigOutFilePath)) - // Start downlevel-dts package script - const subProcess = spawn('npm', ['run', 'downlevel-dts'], {cwd: rootDir}); + // Run downlevel-dts + .then(() => new Promise((resolve, reject) => { - // Log child process buffer data as `string` - subProcess.stdout.on('data', data => log(data.toString().trim() + '\n')); + // Start downlevel-dts package script + const subProcess = spawn('npm', ['run', 'downlevel-dts'], {cwd: rootDir}); - // Log stderr, child process, buffer data as a `string` - subProcess.stderr.on('data', data => warn(data.toString().trim() + '\n')); + // Log child process buffer data as `string` + subProcess.stdout.on('data', data => log(data.toString().trim() + '\n')); - // Handle process end - subProcess.on('close', (code) => code !== 0 ? - reject(`Child process existed with code ${code}.\n`) : - resolve('"clean-and-run-downlevel-dts" completed successfully.\n') - ); + // Log stderr, child process, buffer data as a `string` + subProcess.stderr.on('data', data => warn(data.toString().trim() + '\n')); - // Catch process start errors - subProcess.on('error', reject); - })) + // Handle process end + subProcess.on('close', (code) => code !== 0 ? + reject(`Child process existed with code ${code}.\n`) : + resolve('"clean-and-run-downlevel-dts" completed successfully.\n') + ); + + // Catch process start errors + subProcess.on('error', reject); + })) )().then(log, error);