@parcel/transformer-css 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,10 +35,10 @@ function _plugin() {
35
35
  return data;
36
36
  }
37
37
 
38
- function _css() {
39
- const data = require("@parcel/css");
38
+ function _lightningcss() {
39
+ const data = require("lightningcss");
40
40
 
41
- _css = function () {
41
+ _lightningcss = function () {
42
42
  return data;
43
43
  };
44
44
 
@@ -126,7 +126,7 @@ var _default = new (_plugin().Transformer)({
126
126
 
127
127
  try {
128
128
  if (asset.meta.type === 'attr') {
129
- res = (0, _css().transformStyleAttribute)({
129
+ res = (0, _lightningcss().transformStyleAttribute)({
130
130
  code,
131
131
  analyzeDependencies: true,
132
132
  errorRecovery: (config === null || config === void 0 ? void 0 : config.errorRecovery) || false,
@@ -147,7 +147,7 @@ var _default = new (_plugin().Transformer)({
147
147
  }
148
148
  }
149
149
 
150
- res = (0, _css().transform)({
150
+ res = (0, _lightningcss().transform)({
151
151
  filename: _path().default.relative(options.projectRoot, asset.filePath),
152
152
  code,
153
153
  cssModules,
@@ -363,7 +363,7 @@ function getTargets(browsers) {
363
363
  return cached;
364
364
  }
365
365
 
366
- let targets = (0, _css().browserslistToTargets)((0, _browserslist().default)(browsers));
366
+ let targets = (0, _lightningcss().browserslistToTargets)((0, _browserslist().default)(browsers));
367
367
  cache.set(browsers, targets);
368
368
  return targets;
369
369
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/transformer-css",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,16 +17,16 @@
17
17
  "source": "src/CSSTransformer.js",
18
18
  "engines": {
19
19
  "node": ">= 12.0.0",
20
- "parcel": "^2.7.0"
20
+ "parcel": "^2.8.0"
21
21
  },
22
22
  "dependencies": {
23
- "@parcel/css": "^1.12.2",
24
- "@parcel/diagnostic": "2.7.0",
25
- "@parcel/plugin": "2.7.0",
26
- "@parcel/source-map": "^2.0.0",
27
- "@parcel/utils": "2.7.0",
23
+ "@parcel/diagnostic": "2.8.0",
24
+ "@parcel/plugin": "2.8.0",
25
+ "@parcel/source-map": "^2.1.1",
26
+ "@parcel/utils": "2.8.0",
28
27
  "browserslist": "^4.6.6",
28
+ "lightningcss": "^1.16.1",
29
29
  "nullthrows": "^1.1.1"
30
30
  },
31
- "gitHead": "9e5d05586577e89991ccf90400f2c741dca11aa3"
31
+ "gitHead": "c3bbe0a6160186f496ca2f9e9bead9376c0522f1"
32
32
  }
@@ -7,7 +7,7 @@ import {
7
7
  transform,
8
8
  transformStyleAttribute,
9
9
  browserslistToTargets,
10
- } from '@parcel/css';
10
+ } from 'lightningcss';
11
11
  import {remapSourceLocation, relativePath} from '@parcel/utils';
12
12
  import browserslist from 'browserslist';
13
13
  import nullthrows from 'nullthrows';