@atlaspack/optimizer-css 2.14.5-canary.20 → 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 +203 -0
- package/lib/CSSOptimizer.js +4 -2
- package/lib/types/CSSOptimizer.d.ts +3 -0
- package/package.json +13 -8
- package/src/{CSSOptimizer.js → CSSOptimizer.ts} +7 -7
- package/tsconfig.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,208 @@
|
|
|
1
1
|
# @atlaspack/optimizer-css
|
|
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/diagnostic@2.14.4
|
|
11
|
+
- @atlaspack/plugin@2.14.31
|
|
12
|
+
- @atlaspack/utils@2.19.3
|
|
13
|
+
|
|
14
|
+
## 2.14.30
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies []:
|
|
19
|
+
- @atlaspack/utils@2.19.2
|
|
20
|
+
- @atlaspack/plugin@2.14.30
|
|
21
|
+
|
|
22
|
+
## 2.14.29
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies []:
|
|
27
|
+
- @atlaspack/utils@2.19.1
|
|
28
|
+
- @atlaspack/plugin@2.14.29
|
|
29
|
+
|
|
30
|
+
## 2.14.28
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
|
|
35
|
+
- @atlaspack/utils@2.19.0
|
|
36
|
+
- @atlaspack/plugin@2.14.28
|
|
37
|
+
|
|
38
|
+
## 2.14.27
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies []:
|
|
43
|
+
- @atlaspack/utils@2.18.4
|
|
44
|
+
- @atlaspack/plugin@2.14.27
|
|
45
|
+
|
|
46
|
+
## 2.14.26
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- [#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
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
|
|
53
|
+
- @atlaspack/diagnostic@2.14.3
|
|
54
|
+
- @atlaspack/plugin@2.14.26
|
|
55
|
+
- @atlaspack/utils@2.18.3
|
|
56
|
+
|
|
57
|
+
## 2.14.25
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies []:
|
|
62
|
+
- @atlaspack/utils@2.18.2
|
|
63
|
+
- @atlaspack/plugin@2.14.25
|
|
64
|
+
|
|
65
|
+
## 2.14.24
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies []:
|
|
70
|
+
- @atlaspack/utils@2.18.1
|
|
71
|
+
- @atlaspack/plugin@2.14.24
|
|
72
|
+
|
|
73
|
+
## 2.14.23
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
|
|
78
|
+
- @atlaspack/utils@2.18.0
|
|
79
|
+
- @atlaspack/plugin@2.14.23
|
|
80
|
+
|
|
81
|
+
## 2.14.22
|
|
82
|
+
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- [#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
|
|
86
|
+
|
|
87
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
|
|
88
|
+
- @atlaspack/diagnostic@2.14.2
|
|
89
|
+
- @atlaspack/plugin@2.14.22
|
|
90
|
+
- @atlaspack/utils@2.17.4
|
|
91
|
+
|
|
92
|
+
## 2.14.21
|
|
93
|
+
|
|
94
|
+
### Patch Changes
|
|
95
|
+
|
|
96
|
+
- Updated dependencies []:
|
|
97
|
+
- @atlaspack/utils@2.17.3
|
|
98
|
+
- @atlaspack/plugin@2.14.21
|
|
99
|
+
|
|
100
|
+
## 2.14.20
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- [#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
|
|
105
|
+
|
|
106
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
|
|
107
|
+
- @atlaspack/plugin@2.14.20
|
|
108
|
+
- @atlaspack/utils@2.17.2
|
|
109
|
+
|
|
110
|
+
## 2.14.19
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- Updated dependencies []:
|
|
115
|
+
- @atlaspack/utils@2.17.1
|
|
116
|
+
- @atlaspack/plugin@2.14.19
|
|
117
|
+
|
|
118
|
+
## 2.14.18
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3), [`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417), [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56)]:
|
|
123
|
+
- @atlaspack/utils@2.17.0
|
|
124
|
+
- @atlaspack/plugin@2.14.18
|
|
125
|
+
|
|
126
|
+
## 2.14.17
|
|
127
|
+
|
|
128
|
+
### Patch Changes
|
|
129
|
+
|
|
130
|
+
- Updated dependencies []:
|
|
131
|
+
- @atlaspack/utils@2.16.1
|
|
132
|
+
- @atlaspack/plugin@2.14.17
|
|
133
|
+
|
|
134
|
+
## 2.14.16
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
|
|
139
|
+
- @atlaspack/utils@2.16.0
|
|
140
|
+
- @atlaspack/plugin@2.14.16
|
|
141
|
+
|
|
142
|
+
## 2.14.15
|
|
143
|
+
|
|
144
|
+
### Patch Changes
|
|
145
|
+
|
|
146
|
+
- Updated dependencies []:
|
|
147
|
+
- @atlaspack/utils@2.15.3
|
|
148
|
+
- @atlaspack/plugin@2.14.15
|
|
149
|
+
|
|
150
|
+
## 2.14.14
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- Updated dependencies []:
|
|
155
|
+
- @atlaspack/utils@2.15.2
|
|
156
|
+
- @atlaspack/plugin@2.14.14
|
|
157
|
+
|
|
158
|
+
## 2.14.13
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- Updated dependencies []:
|
|
163
|
+
- @atlaspack/utils@2.15.1
|
|
164
|
+
- @atlaspack/plugin@2.14.13
|
|
165
|
+
|
|
166
|
+
## 2.14.12
|
|
167
|
+
|
|
168
|
+
### Patch Changes
|
|
169
|
+
|
|
170
|
+
- Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
|
|
171
|
+
- @atlaspack/utils@2.15.0
|
|
172
|
+
- @atlaspack/plugin@2.14.12
|
|
173
|
+
|
|
174
|
+
## 2.14.11
|
|
175
|
+
|
|
176
|
+
### Patch Changes
|
|
177
|
+
|
|
178
|
+
- Updated dependencies []:
|
|
179
|
+
- @atlaspack/utils@2.14.11
|
|
180
|
+
- @atlaspack/plugin@2.14.11
|
|
181
|
+
|
|
182
|
+
## 2.14.10
|
|
183
|
+
|
|
184
|
+
### Patch Changes
|
|
185
|
+
|
|
186
|
+
- Updated dependencies []:
|
|
187
|
+
- @atlaspack/plugin@2.14.10
|
|
188
|
+
- @atlaspack/utils@2.14.10
|
|
189
|
+
|
|
190
|
+
## 2.14.9
|
|
191
|
+
|
|
192
|
+
### Patch Changes
|
|
193
|
+
|
|
194
|
+
- Updated dependencies []:
|
|
195
|
+
- @atlaspack/utils@2.14.9
|
|
196
|
+
- @atlaspack/plugin@2.14.9
|
|
197
|
+
|
|
198
|
+
## 2.14.8
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- Updated dependencies []:
|
|
203
|
+
- @atlaspack/utils@2.14.8
|
|
204
|
+
- @atlaspack/plugin@2.14.8
|
|
205
|
+
|
|
3
206
|
## 2.14.7
|
|
4
207
|
|
|
5
208
|
### Patch Changes
|
package/lib/CSSOptimizer.js
CHANGED
|
@@ -63,7 +63,6 @@ function _diagnostic() {
|
|
|
63
63
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
64
64
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
65
65
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
66
|
-
// $FlowFixMe - init for browser build.
|
|
67
66
|
var _default = exports.default = new (_plugin().Optimizer)({
|
|
68
67
|
async loadConfig({
|
|
69
68
|
config,
|
|
@@ -184,8 +183,9 @@ Atlaspack\'s default CSS minifer changed from cssnano to lightningcss, but a "cs
|
|
|
184
183
|
}
|
|
185
184
|
}
|
|
186
185
|
|
|
187
|
-
//
|
|
186
|
+
// @ts-expect-error TS2339
|
|
188
187
|
if (process.browser) {
|
|
188
|
+
// @ts-expect-error TS2349
|
|
189
189
|
await (0, _lightningcss().default)();
|
|
190
190
|
}
|
|
191
191
|
let result = (0, _lightningcss().transform)({
|
|
@@ -202,6 +202,7 @@ Atlaspack\'s default CSS minifer changed from cssnano to lightningcss, but a "cs
|
|
|
202
202
|
map = new (_sourceMap().default)(options.projectRoot);
|
|
203
203
|
map.addVLQMap(vlqMap);
|
|
204
204
|
if (prevMap) {
|
|
205
|
+
// @ts-expect-error TS2345
|
|
205
206
|
map.extends(prevMap);
|
|
206
207
|
}
|
|
207
208
|
}
|
|
@@ -209,6 +210,7 @@ Atlaspack\'s default CSS minifer changed from cssnano to lightningcss, but a "cs
|
|
|
209
210
|
if (bundle.env.sourceMap) {
|
|
210
211
|
let reference = await getSourceMapReference(map);
|
|
211
212
|
if (reference != null) {
|
|
213
|
+
// @ts-expect-error TS2322
|
|
212
214
|
contents = contents.toString() + '\n' + '/*# sourceMappingURL=' + reference + ' */\n';
|
|
213
215
|
}
|
|
214
216
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/optimizer-css",
|
|
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,15 +9,16 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
|
-
"main": "lib/CSSOptimizer.js",
|
|
13
|
-
"source": "src/CSSOptimizer.
|
|
12
|
+
"main": "./lib/CSSOptimizer.js",
|
|
13
|
+
"source": "./src/CSSOptimizer.ts",
|
|
14
|
+
"types": "./lib/types/CSSOptimizer.d.ts",
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">= 16.0.0"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@atlaspack/diagnostic": "2.14.1-canary.
|
|
19
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
20
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
19
|
+
"@atlaspack/diagnostic": "2.14.1-canary.268+10ee3fa5b",
|
|
20
|
+
"@atlaspack/plugin": "2.14.5-canary.200+10ee3fa5b",
|
|
21
|
+
"@atlaspack/utils": "2.14.5-canary.200+10ee3fa5b",
|
|
21
22
|
"@parcel/source-map": "^2.1.1",
|
|
22
23
|
"browserslist": "^4.6.6",
|
|
23
24
|
"lightningcss": "^1.28.2",
|
|
@@ -30,5 +31,9 @@
|
|
|
30
31
|
"lightningcss": "lightningcss-wasm"
|
|
31
32
|
},
|
|
32
33
|
"type": "commonjs",
|
|
33
|
-
"
|
|
34
|
-
|
|
34
|
+
"scripts": {
|
|
35
|
+
"check-ts": "tsc --emitDeclarationOnly --rootDir src",
|
|
36
|
+
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
37
|
+
},
|
|
38
|
+
"gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
|
|
39
|
+
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
|
-
|
|
3
1
|
import SourceMap from '@parcel/source-map';
|
|
4
2
|
import {Optimizer} from '@atlaspack/plugin';
|
|
5
|
-
// $FlowFixMe - init for browser build.
|
|
6
3
|
import init, {
|
|
7
4
|
transform,
|
|
8
5
|
transformStyleAttribute,
|
|
@@ -18,7 +15,7 @@ import {
|
|
|
18
15
|
generateJSONCodeHighlights,
|
|
19
16
|
} from '@atlaspack/diagnostic';
|
|
20
17
|
|
|
21
|
-
export default
|
|
18
|
+
export default new Optimizer({
|
|
22
19
|
async loadConfig({config, logger, options}) {
|
|
23
20
|
const configFile = await config.getConfig(
|
|
24
21
|
[
|
|
@@ -156,8 +153,9 @@ Atlaspack\'s default CSS minifer changed from cssnano to lightningcss, but a "cs
|
|
|
156
153
|
}
|
|
157
154
|
}
|
|
158
155
|
|
|
159
|
-
//
|
|
156
|
+
// @ts-expect-error TS2339
|
|
160
157
|
if (process.browser) {
|
|
158
|
+
// @ts-expect-error TS2349
|
|
161
159
|
await init();
|
|
162
160
|
}
|
|
163
161
|
|
|
@@ -176,6 +174,7 @@ Atlaspack\'s default CSS minifer changed from cssnano to lightningcss, but a "cs
|
|
|
176
174
|
map = new SourceMap(options.projectRoot);
|
|
177
175
|
map.addVLQMap(vlqMap);
|
|
178
176
|
if (prevMap) {
|
|
177
|
+
// @ts-expect-error TS2345
|
|
179
178
|
map.extends(prevMap);
|
|
180
179
|
}
|
|
181
180
|
}
|
|
@@ -184,6 +183,7 @@ Atlaspack\'s default CSS minifer changed from cssnano to lightningcss, but a "cs
|
|
|
184
183
|
if (bundle.env.sourceMap) {
|
|
185
184
|
let reference = await getSourceMapReference(map);
|
|
186
185
|
if (reference != null) {
|
|
186
|
+
// @ts-expect-error TS2322
|
|
187
187
|
contents =
|
|
188
188
|
contents.toString() +
|
|
189
189
|
'\n' +
|
|
@@ -198,11 +198,11 @@ Atlaspack\'s default CSS minifer changed from cssnano to lightningcss, but a "cs
|
|
|
198
198
|
map,
|
|
199
199
|
};
|
|
200
200
|
},
|
|
201
|
-
})
|
|
201
|
+
}) as Optimizer<unknown, unknown>;
|
|
202
202
|
|
|
203
203
|
let cache = new Map();
|
|
204
204
|
|
|
205
|
-
function getTargets(browsers) {
|
|
205
|
+
function getTargets(browsers: undefined | string | Array<string>) {
|
|
206
206
|
if (browsers == null) {
|
|
207
207
|
return undefined;
|
|
208
208
|
}
|
package/tsconfig.json
ADDED