@atlaspack/optimizer-cssnano 2.14.5-canary.2 → 2.14.5-canary.200
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,202 @@
|
|
|
1
1
|
# @atlaspack/optimizer-cssnano
|
|
2
2
|
|
|
3
|
+
## 2.14.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
|
|
10
|
+
- @atlaspack/plugin@2.14.31
|
|
11
|
+
|
|
12
|
+
## 2.14.30
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies []:
|
|
17
|
+
- @atlaspack/plugin@2.14.30
|
|
18
|
+
|
|
19
|
+
## 2.14.29
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies []:
|
|
24
|
+
- @atlaspack/plugin@2.14.29
|
|
25
|
+
|
|
26
|
+
## 2.14.28
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies []:
|
|
31
|
+
- @atlaspack/plugin@2.14.28
|
|
32
|
+
|
|
33
|
+
## 2.14.27
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies []:
|
|
38
|
+
- @atlaspack/plugin@2.14.27
|
|
39
|
+
|
|
40
|
+
## 2.14.26
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
|
|
47
|
+
- @atlaspack/plugin@2.14.26
|
|
48
|
+
|
|
49
|
+
## 2.14.25
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies []:
|
|
54
|
+
- @atlaspack/plugin@2.14.25
|
|
55
|
+
|
|
56
|
+
## 2.14.24
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies []:
|
|
61
|
+
- @atlaspack/plugin@2.14.24
|
|
62
|
+
|
|
63
|
+
## 2.14.23
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Updated dependencies []:
|
|
68
|
+
- @atlaspack/plugin@2.14.23
|
|
69
|
+
|
|
70
|
+
## 2.14.22
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
|
|
77
|
+
- @atlaspack/plugin@2.14.22
|
|
78
|
+
|
|
79
|
+
## 2.14.21
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Updated dependencies []:
|
|
84
|
+
- @atlaspack/plugin@2.14.21
|
|
85
|
+
|
|
86
|
+
## 2.14.20
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- [#702](https://github.com/atlassian-labs/atlaspack/pull/702) [`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa) Thanks [@alshdavid](https://github.com/alshdavid)! - Fixes to Flow types
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
|
|
93
|
+
- @atlaspack/plugin@2.14.20
|
|
94
|
+
|
|
95
|
+
## 2.14.19
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies []:
|
|
100
|
+
- @atlaspack/plugin@2.14.19
|
|
101
|
+
|
|
102
|
+
## 2.14.18
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- Updated dependencies []:
|
|
107
|
+
- @atlaspack/plugin@2.14.18
|
|
108
|
+
|
|
109
|
+
## 2.14.17
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies []:
|
|
114
|
+
- @atlaspack/plugin@2.14.17
|
|
115
|
+
|
|
116
|
+
## 2.14.16
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- Updated dependencies []:
|
|
121
|
+
- @atlaspack/plugin@2.14.16
|
|
122
|
+
|
|
123
|
+
## 2.14.15
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Updated dependencies []:
|
|
128
|
+
- @atlaspack/plugin@2.14.15
|
|
129
|
+
|
|
130
|
+
## 2.14.14
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- Updated dependencies []:
|
|
135
|
+
- @atlaspack/plugin@2.14.14
|
|
136
|
+
|
|
137
|
+
## 2.14.13
|
|
138
|
+
|
|
139
|
+
### Patch Changes
|
|
140
|
+
|
|
141
|
+
- Updated dependencies []:
|
|
142
|
+
- @atlaspack/plugin@2.14.13
|
|
143
|
+
|
|
144
|
+
## 2.14.12
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies []:
|
|
149
|
+
- @atlaspack/plugin@2.14.12
|
|
150
|
+
|
|
151
|
+
## 2.14.11
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- Updated dependencies []:
|
|
156
|
+
- @atlaspack/plugin@2.14.11
|
|
157
|
+
|
|
158
|
+
## 2.14.10
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- Updated dependencies []:
|
|
163
|
+
- @atlaspack/plugin@2.14.10
|
|
164
|
+
|
|
165
|
+
## 2.14.9
|
|
166
|
+
|
|
167
|
+
### Patch Changes
|
|
168
|
+
|
|
169
|
+
- Updated dependencies []:
|
|
170
|
+
- @atlaspack/plugin@2.14.9
|
|
171
|
+
|
|
172
|
+
## 2.14.8
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- Updated dependencies []:
|
|
177
|
+
- @atlaspack/plugin@2.14.8
|
|
178
|
+
|
|
179
|
+
## 2.14.7
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- Updated dependencies []:
|
|
184
|
+
- @atlaspack/plugin@2.14.7
|
|
185
|
+
|
|
186
|
+
## 2.14.6
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- Updated dependencies []:
|
|
191
|
+
- @atlaspack/plugin@2.14.6
|
|
192
|
+
|
|
193
|
+
## 2.14.5
|
|
194
|
+
|
|
195
|
+
### Patch Changes
|
|
196
|
+
|
|
197
|
+
- Updated dependencies []:
|
|
198
|
+
- @atlaspack/plugin@2.14.5
|
|
199
|
+
|
|
3
200
|
## 2.14.4
|
|
4
201
|
|
|
5
202
|
### Patch Changes
|
package/lib/CSSNanoOptimizer.js
CHANGED
|
@@ -33,6 +33,8 @@ function _cssnano() {
|
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
35
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
|
+
// @ts-expect-error TS7016
|
|
37
|
+
// @ts-expect-error TS7016
|
|
36
38
|
// TODO the type is based on cssnano 4
|
|
37
39
|
var _default = exports.default = new (_plugin().Optimizer)({
|
|
38
40
|
async loadConfig({
|
|
@@ -69,12 +71,14 @@ var _default = exports.default = new (_plugin().Optimizer)({
|
|
|
69
71
|
map: {
|
|
70
72
|
annotation: false,
|
|
71
73
|
inline: false,
|
|
74
|
+
// @ts-expect-error TS2322
|
|
72
75
|
prev: prevMap ? await prevMap.stringify({}) : null
|
|
73
76
|
}
|
|
74
77
|
});
|
|
75
78
|
let map;
|
|
76
79
|
if (result.map != null) {
|
|
77
80
|
map = new (_sourceMap().default)(options.projectRoot);
|
|
81
|
+
// @ts-expect-error TS2345
|
|
78
82
|
map.addVLQMap(result.map.toJSON());
|
|
79
83
|
}
|
|
80
84
|
let contents = result.css;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/optimizer-cssnano",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.200+10ee3fa5b",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,17 +9,22 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
|
-
"main": "lib/CSSNanoOptimizer.js",
|
|
13
|
-
"source": "src/CSSNanoOptimizer.
|
|
12
|
+
"main": "./lib/CSSNanoOptimizer.js",
|
|
13
|
+
"source": "./src/CSSNanoOptimizer.ts",
|
|
14
|
+
"types": "./lib/types/CSSNanoOptimizer.d.ts",
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">= 16.0.0"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
19
|
+
"@atlaspack/plugin": "2.14.5-canary.200+10ee3fa5b",
|
|
19
20
|
"@parcel/source-map": "^2.1.1",
|
|
20
21
|
"cssnano": "^5.0.15",
|
|
21
22
|
"postcss": "^8.4.5"
|
|
22
23
|
},
|
|
23
24
|
"type": "commonjs",
|
|
24
|
-
"
|
|
25
|
-
|
|
25
|
+
"scripts": {
|
|
26
|
+
"check-ts": "tsc --emitDeclarationOnly --rootDir src",
|
|
27
|
+
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
28
|
+
},
|
|
29
|
+
"gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
|
|
30
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
|
-
|
|
3
1
|
import SourceMap from '@parcel/source-map';
|
|
4
2
|
import {Optimizer} from '@atlaspack/plugin';
|
|
5
3
|
import postcss from 'postcss';
|
|
4
|
+
// @ts-expect-error TS7016
|
|
6
5
|
import cssnano from 'cssnano';
|
|
6
|
+
// @ts-expect-error TS7016
|
|
7
7
|
import type {CSSNanoOptions} from 'cssnano'; // TODO the type is based on cssnano 4
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default new Optimizer({
|
|
10
10
|
async loadConfig({config}) {
|
|
11
11
|
const configFile = await config.getConfig(
|
|
12
12
|
[
|
|
@@ -44,7 +44,7 @@ export default (new Optimizer({
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const result = await postcss([
|
|
47
|
-
cssnano(
|
|
47
|
+
cssnano(config ?? ({} as CSSNanoOptions)),
|
|
48
48
|
]).process(prevContents, {
|
|
49
49
|
// Suppress postcss's warning about a missing `from` property. In this
|
|
50
50
|
// case, the input map contains all of the sources.
|
|
@@ -52,6 +52,7 @@ export default (new Optimizer({
|
|
|
52
52
|
map: {
|
|
53
53
|
annotation: false,
|
|
54
54
|
inline: false,
|
|
55
|
+
// @ts-expect-error TS2322
|
|
55
56
|
prev: prevMap ? await prevMap.stringify({}) : null,
|
|
56
57
|
},
|
|
57
58
|
});
|
|
@@ -59,6 +60,7 @@ export default (new Optimizer({
|
|
|
59
60
|
let map;
|
|
60
61
|
if (result.map != null) {
|
|
61
62
|
map = new SourceMap(options.projectRoot);
|
|
63
|
+
// @ts-expect-error TS2345
|
|
62
64
|
map.addVLQMap(result.map.toJSON());
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -75,4 +77,4 @@ export default (new Optimizer({
|
|
|
75
77
|
map,
|
|
76
78
|
};
|
|
77
79
|
},
|
|
78
|
-
})
|
|
80
|
+
}) as Optimizer<unknown, unknown>;
|
package/tsconfig.json
ADDED