From a670a737254e8ff8c97d5ead95eeca32c8d7c35b Mon Sep 17 00:00:00 2001 From: Monica Date: Tue, 20 Aug 2024 17:29:36 +1000 Subject: [PATCH] Remove sugarss support (#19) --- packages/configs/default/index.json | 1 - packages/configs/default/package.json | 1 - packages/core/integration-tests/package.json | 1 - .../test/integration/sugarss/index.sss | 5 --- .../core/integration-tests/test/sugarss.js | 31 ------------------- packages/transformers/sugarss/package.json | 23 -------------- .../sugarss/src/SugarssTransformer.js | 19 ------------ yarn.lock | 7 ----- 8 files changed, 88 deletions(-) delete mode 100644 packages/core/integration-tests/test/integration/sugarss/index.sss delete mode 100644 packages/core/integration-tests/test/sugarss.js delete mode 100644 packages/transformers/sugarss/package.json delete mode 100644 packages/transformers/sugarss/src/SugarssTransformer.js diff --git a/packages/configs/default/index.json b/packages/configs/default/index.json index 0ad0ec78e..4b0732c67 100644 --- a/packages/configs/default/index.json +++ b/packages/configs/default/index.json @@ -28,7 +28,6 @@ "@atlaspack/transformer-postcss", "@atlaspack/transformer-css" ], - "*.sss": ["@atlaspack/transformer-sugarss"], "*.{htm,html,xhtml}": [ "@atlaspack/transformer-posthtml", "@atlaspack/transformer-html" diff --git a/packages/configs/default/package.json b/packages/configs/default/package.json index ff0d63feb..865e6b794 100644 --- a/packages/configs/default/package.json +++ b/packages/configs/default/package.json @@ -61,7 +61,6 @@ "@atlaspack/transformer-pug": "2.12.0", "@atlaspack/transformer-sass": "2.12.0", "@atlaspack/transformer-stylus": "2.12.0", - "@atlaspack/transformer-sugarss": "2.12.0", "@atlaspack/transformer-toml": "2.12.0", "@atlaspack/transformer-typescript-types": "2.12.0", "@atlaspack/transformer-vue": "2.12.0", diff --git a/packages/core/integration-tests/package.json b/packages/core/integration-tests/package.json index 41c93bafa..225be92db 100644 --- a/packages/core/integration-tests/package.json +++ b/packages/core/integration-tests/package.json @@ -48,7 +48,6 @@ "preact": "^10.5.9", "react": "^17.0.2", "react-dom": "^17.0.2", - "sugarss": "^3.0.3", "tailwindcss": "^3.0.2", "tempy": "^0.3.0", "wasm-sourcemap": "^1.0.0", diff --git a/packages/core/integration-tests/test/integration/sugarss/index.sss b/packages/core/integration-tests/test/integration/sugarss/index.sss deleted file mode 100644 index feb0a45ab..000000000 --- a/packages/core/integration-tests/test/integration/sugarss/index.sss +++ /dev/null @@ -1,5 +0,0 @@ -input.spoiler-input - display: none - -.spoiler_link - cursor: pointer diff --git a/packages/core/integration-tests/test/sugarss.js b/packages/core/integration-tests/test/sugarss.js deleted file mode 100644 index 45478bf63..000000000 --- a/packages/core/integration-tests/test/sugarss.js +++ /dev/null @@ -1,31 +0,0 @@ -import assert from 'assert'; -import { - assertBundles, - bundle, - describe, - distDir, - it, - outputFS, -} from '@atlaspack/test-utils'; -import path from 'path'; - -describe.v2('sugarss', function () { - it('should correctly parse SugarSS asset', async function () { - let b = await bundle( - path.join(__dirname, '/integration/sugarss/index.sss'), - ); - - assertBundles(b, [ - { - name: 'index.css', - assets: ['index.sss'], - }, - ]); - - let cssContent = await outputFS.readFile( - path.join(distDir, '/index.css'), - 'utf8', - ); - assert(cssContent.includes('{')); - }); -}); diff --git a/packages/transformers/sugarss/package.json b/packages/transformers/sugarss/package.json deleted file mode 100644 index 43d69f160..000000000 --- a/packages/transformers/sugarss/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@atlaspack/transformer-sugarss", - "version": "2.12.0", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/atlassian-labs/atlaspack.git" - }, - "main": "lib/SugarssTransformer.js", - "source": "src/SugarssTransformer.js", - "engines": { - "node": ">= 16.0.0", - "atlaspack": "^2.12.0" - }, - "dependencies": { - "@atlaspack/plugin": "2.12.0", - "postcss": "^8.4.5", - "sugarss": "^3.0.3" - } -} diff --git a/packages/transformers/sugarss/src/SugarssTransformer.js b/packages/transformers/sugarss/src/SugarssTransformer.js deleted file mode 100644 index 911e411d8..000000000 --- a/packages/transformers/sugarss/src/SugarssTransformer.js +++ /dev/null @@ -1,19 +0,0 @@ -// @flow - -import {Transformer} from '@atlaspack/plugin'; -import postcss from 'postcss'; -import sugarss from 'sugarss'; - -export default (new Transformer({ - async transform({asset}) { - const code = await asset.getCode(); - const {css} = await postcss().process(code, { - from: asset.filePath, - to: asset.filePath, - parser: sugarss, - }); - asset.type = 'css'; - asset.setCode(css); - return [asset]; - }, -}): Transformer); diff --git a/yarn.lock b/yarn.lock index ff8f496d7..43ff88444 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13643,13 +13643,6 @@ stylus@^0.55.0: semver "^6.3.0" source-map "^0.7.3" -sugarss@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/sugarss/-/sugarss-3.0.3.tgz#bb2489961b98fbd15e4e35d6b9f4f2ee5547a6cb" - integrity sha512-uxa2bbuc+w7ov7DyYIhF6bM0qZF3UkFT5/nE8AJgboiVnKsBDbwxs++dehEIe1JNhpMaGJc37wGQ2QrrWey2Sg== - dependencies: - postcss "^8.1.6" - supports-color@8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"