@compiled/parcel-transformer 0.6.16 → 0.6.20
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.
- package/dist/transformer.d.ts +1 -1
- package/dist/transformer.js +4 -4
- package/dist/transformer.js.map +1 -1
- package/package.json +7 -7
- package/src/transformer.tsx +2 -2
- package/CHANGELOG.md +0 -78
package/dist/transformer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Transformer } from '@parcel/plugin';
|
|
2
1
|
import type { PluginOptions } from '@compiled/babel-plugin';
|
|
2
|
+
import { Transformer } from '@parcel/plugin';
|
|
3
3
|
declare type UserlandOpts = Omit<PluginOptions, 'cache' | 'onIncludedFiles'>;
|
|
4
4
|
declare const _default: Transformer<UserlandOpts>;
|
|
5
5
|
/**
|
package/dist/transformer.js
CHANGED
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const plugin_1 = require("@parcel/plugin");
|
|
7
6
|
const core_1 = require("@babel/core");
|
|
8
7
|
const generator_1 = __importDefault(require("@babel/generator"));
|
|
8
|
+
const plugin_1 = require("@parcel/plugin");
|
|
9
9
|
const configFiles = [
|
|
10
10
|
'.compiledcssrc',
|
|
11
11
|
'.compiledcssrc.json',
|
|
@@ -42,7 +42,7 @@ exports.default = new plugin_1.Transformer({
|
|
|
42
42
|
// For everything else we bail out.
|
|
43
43
|
return undefined;
|
|
44
44
|
}
|
|
45
|
-
const ast = await core_1.parseAsync(code, {
|
|
45
|
+
const ast = await (0, core_1.parseAsync)(code, {
|
|
46
46
|
filename: asset.filePath,
|
|
47
47
|
caller: { name: 'compiled' },
|
|
48
48
|
rootMode: 'upward-optional',
|
|
@@ -58,7 +58,7 @@ exports.default = new plugin_1.Transformer({
|
|
|
58
58
|
}
|
|
59
59
|
const includedFiles = [];
|
|
60
60
|
const code = asset.isASTDirty() ? undefined : await asset.getCode();
|
|
61
|
-
const result = await core_1.transformFromAstAsync(ast.program, code, {
|
|
61
|
+
const result = await (0, core_1.transformFromAstAsync)(ast.program, code, {
|
|
62
62
|
code: false,
|
|
63
63
|
ast: true,
|
|
64
64
|
filename: asset.filePath,
|
|
@@ -96,7 +96,7 @@ exports.default = new plugin_1.Transformer({
|
|
|
96
96
|
// TODO: We're using babels standard generator. Internally parcel does some hacks in
|
|
97
97
|
// the official Babel transformer to make it faster - using ASTree directly.
|
|
98
98
|
// Perhaps we should do the same thing.
|
|
99
|
-
const { code, map } = generator_1.default(ast.program, {
|
|
99
|
+
const { code, map } = (0, generator_1.default)(ast.program, {
|
|
100
100
|
filename: asset.filePath,
|
|
101
101
|
});
|
|
102
102
|
return { content: code, map };
|
package/dist/transformer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.js","sourceRoot":"","sources":["../src/transformer.tsx"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"transformer.js","sourceRoot":"","sources":["../src/transformer.tsx"],"names":[],"mappings":";;;;;AAAA,sCAAgE;AAChE,iEAAwC;AAExC,2CAA6C;AAI7C,MAAM,WAAW,GAAG;IAClB,gBAAgB;IAChB,qBAAqB;IACrB,gBAAgB;IAChB,uBAAuB;CACxB,CAAC;AAEF;;GAEG;AACH,kBAAe,IAAI,oBAAW,CAAe;IAC3C,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE;QACzB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE;YAC/C,UAAU,EAAE,8BAA8B;SAC3C,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAiB,EAAE,CAAC;QAElC,IAAI,IAAI,EAAE;YACR,MAAM,CAAC,yBAAyB,EAAE,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,QAAQ,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{
|
|
2
2
|
"name": "@compiled/parcel-transformer",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.20",
|
|
4
4
|
"description": "A familiar and performant compile time CSS-in-JS library for React.",
|
|
5
|
-
"homepage": "https://compiledcssinjs.com",
|
|
5
|
+
"homepage": "https://compiledcssinjs.com/docs/pkg-parcel-transformer",
|
|
6
6
|
"bugs": "https://github.com/atlassian-labs/compiled/issues/new?assignees=&labels=bug&template=bug_report.md",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/core": "^7.
|
|
25
|
-
"@babel/generator": "^7.
|
|
26
|
-
"@compiled/babel-plugin": "^0.
|
|
27
|
-
"@compiled/utils": "^0.6.
|
|
24
|
+
"@babel/core": "^7.16.5",
|
|
25
|
+
"@babel/generator": "^7.16.5",
|
|
26
|
+
"@compiled/babel-plugin": "^0.11.4",
|
|
27
|
+
"@compiled/utils": "^0.6.13",
|
|
28
28
|
"@parcel/plugin": "^2.0.0-nightly.657"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/babel__core": "^7.1.
|
|
31
|
+
"@types/babel__core": "^7.1.18"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"parcel": "^2.0.0 || ^2.0.0-beta.1"
|
package/src/transformer.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Transformer } from '@parcel/plugin';
|
|
2
|
-
import type { PluginOptions } from '@compiled/babel-plugin';
|
|
3
1
|
import { parseAsync, transformFromAstAsync } from '@babel/core';
|
|
4
2
|
import generate from '@babel/generator';
|
|
3
|
+
import type { PluginOptions } from '@compiled/babel-plugin';
|
|
4
|
+
import { Transformer } from '@parcel/plugin';
|
|
5
5
|
|
|
6
6
|
type UserlandOpts = Omit<PluginOptions, 'cache' | 'onIncludedFiles'>;
|
|
7
7
|
|
package/CHANGELOG.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# @compiled/parcel-transformer
|
|
2
|
-
|
|
3
|
-
## 0.6.16
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [b68411c]
|
|
8
|
-
- Updated dependencies [53a3d71]
|
|
9
|
-
- @compiled/babel-plugin@0.10.0
|
|
10
|
-
|
|
11
|
-
## 0.6.15
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- Updated dependencies [0b60ae1]
|
|
16
|
-
- Updated dependencies [2092839]
|
|
17
|
-
- @compiled/babel-plugin@0.9.0
|
|
18
|
-
|
|
19
|
-
## 0.6.14
|
|
20
|
-
|
|
21
|
-
### Patch Changes
|
|
22
|
-
|
|
23
|
-
- Updated dependencies [53935b3]
|
|
24
|
-
- @compiled/babel-plugin@0.8.0
|
|
25
|
-
|
|
26
|
-
## 0.6.13
|
|
27
|
-
|
|
28
|
-
### Patch Changes
|
|
29
|
-
|
|
30
|
-
- Updated dependencies [bcb2a68]
|
|
31
|
-
- Updated dependencies [a7ab8e1]
|
|
32
|
-
- Updated dependencies [e1dc346]
|
|
33
|
-
- Updated dependencies [48805ec]
|
|
34
|
-
- Updated dependencies [587e729]
|
|
35
|
-
- @compiled/babel-plugin@0.7.0
|
|
36
|
-
|
|
37
|
-
## 0.6.12
|
|
38
|
-
|
|
39
|
-
### Patch Changes
|
|
40
|
-
|
|
41
|
-
- 40bc0d9: Package descriptions have been updated.
|
|
42
|
-
- Updated dependencies [40bc0d9]
|
|
43
|
-
- Updated dependencies [1b1c964]
|
|
44
|
-
- @compiled/babel-plugin@0.6.13
|
|
45
|
-
- @compiled/utils@0.6.11
|
|
46
|
-
|
|
47
|
-
## 0.6.11
|
|
48
|
-
|
|
49
|
-
### Patch Changes
|
|
50
|
-
|
|
51
|
-
- 6a7261e: Programmatic babel use now searches upwards for a project root, and if found will use that config. This fixes issues in some monorepo setups.
|
|
52
|
-
|
|
53
|
-
## 0.6.10
|
|
54
|
-
|
|
55
|
-
### Patch Changes
|
|
56
|
-
|
|
57
|
-
- 37108e4: Compiled dependencies are now using carat range.
|
|
58
|
-
- Updated dependencies [992e401]
|
|
59
|
-
- Updated dependencies [37108e4]
|
|
60
|
-
- @compiled/utils@0.6.10
|
|
61
|
-
- @compiled/babel-plugin@0.6.10
|
|
62
|
-
|
|
63
|
-
## 0.6.9
|
|
64
|
-
|
|
65
|
-
### Patch Changes
|
|
66
|
-
|
|
67
|
-
- Updated dependencies [0bb1c11]
|
|
68
|
-
- @compiled/utils@0.6.9
|
|
69
|
-
- @compiled/babel-plugin@0.6.9
|
|
70
|
-
|
|
71
|
-
## 0.6.8
|
|
72
|
-
|
|
73
|
-
### Patch Changes
|
|
74
|
-
|
|
75
|
-
- aea3504: Packages now released with [changesets](https://github.com/atlassian/changesets).
|
|
76
|
-
- Updated dependencies [aea3504]
|
|
77
|
-
- @compiled/babel-plugin@0.6.8
|
|
78
|
-
- @compiled/utils@0.6.8
|