Skip to content

Commit 44b3b42

Browse files
Cleanup oxide — Part #2 (#13312)
* remove all oxide related code * Update lightningcss to version 1.24.1 * update tests to match bumped Lightning CSS output --------- Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
1 parent c28c718 commit 44b3b42

File tree

109 files changed

+23999
-27521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+23999
-27521
lines changed

integrations/parcel/tests/integration.test.js

+47-115
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
let $ = require('../../execute')
22
let { css, html, javascript } = require('../../syntax')
3-
let { env } = require('../../../lib/lib/sharedState')
43

54
let {
65
appendToInputFile,
@@ -72,22 +71,12 @@ describe('static build', () => {
7271
env: { NODE_ENV: 'production' },
7372
})
7473

75-
if (env.ENGINE === 'stable') {
76-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
77-
.bg-primary {
78-
--tw-bg-opacity: 1;
79-
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
80-
}
81-
`)
82-
}
83-
84-
if (env.ENGINE === 'oxide') {
85-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
86-
.bg-primary {
87-
background-color: black;
88-
}
89-
`)
90-
}
74+
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
75+
.bg-primary {
76+
--tw-bg-opacity: 1;
77+
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
78+
}
79+
`)
9180
})
9281

9382
it('can use a tailwind.config.ts configuration file', async () => {
@@ -132,22 +121,12 @@ describe('static build', () => {
132121
env: { NODE_ENV: 'production' },
133122
})
134123

135-
if (env.ENGINE === 'stable') {
136-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
137-
.bg-primary {
138-
--tw-bg-opacity: 1;
139-
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
140-
}
141-
`)
142-
}
143-
144-
if (env.ENGINE === 'oxide') {
145-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
146-
.bg-primary {
147-
background-color: black;
148-
}
149-
`)
150-
}
124+
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
125+
.bg-primary {
126+
--tw-bg-opacity: 1;
127+
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
128+
}
129+
`)
151130
})
152131
})
153132

@@ -188,34 +167,18 @@ describe('watcher', () => {
188167
await appendToInputFile('index.html', html`<div class="bg-red-500"></div>`)
189168
})
190169

191-
if (env.ENGINE === 'stable') {
192-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
193-
.bg-red-500 {
194-
--tw-bg-opacity: 1;
195-
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
196-
}
197-
.font-bold {
198-
font-weight: 700;
199-
}
200-
.font-normal {
201-
font-weight: 400;
202-
}
203-
`)
204-
}
205-
206-
if (env.ENGINE === 'oxide') {
207-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
208-
.bg-red-500 {
209-
background-color: #ef4444;
210-
}
211-
.font-bold {
212-
font-weight: 700;
213-
}
214-
.font-normal {
215-
font-weight: 400;
216-
}
217-
`)
218-
}
170+
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
171+
.bg-red-500 {
172+
--tw-bg-opacity: 1;
173+
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
174+
}
175+
.font-bold {
176+
font-weight: 700;
177+
}
178+
.font-normal {
179+
font-weight: 400;
180+
}
181+
`)
219182

220183
return runningProcess.stop()
221184
})
@@ -252,34 +215,18 @@ describe('watcher', () => {
252215
await appendToInputFile('glob/index.html', html`<div class="bg-red-500"></div>`)
253216
})
254217

255-
if (env.ENGINE === 'stable') {
256-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
257-
.bg-red-500 {
258-
--tw-bg-opacity: 1;
259-
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
260-
}
261-
.font-bold {
262-
font-weight: 700;
263-
}
264-
.font-normal {
265-
font-weight: 400;
266-
}
267-
`)
268-
}
269-
270-
if (env.ENGINE === 'oxide') {
271-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
272-
.bg-red-500 {
273-
background-color: #ef4444;
274-
}
275-
.font-bold {
276-
font-weight: 700;
277-
}
278-
.font-normal {
279-
font-weight: 400;
280-
}
281-
`)
282-
}
218+
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
219+
.bg-red-500 {
220+
--tw-bg-opacity: 1;
221+
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
222+
}
223+
.font-bold {
224+
font-weight: 700;
225+
}
226+
.font-normal {
227+
font-weight: 400;
228+
}
229+
`)
283230

284231
return runningProcess.stop()
285232
})
@@ -411,32 +358,17 @@ describe('watcher', () => {
411358
)
412359
})
413360

414-
if (env.ENGINE === 'stable') {
415-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
416-
.btn {
417-
--tw-bg-opacity: 1;
418-
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
419-
border-radius: 0.25rem;
420-
padding: 0.25rem 0.5rem;
421-
}
422-
.font-bold {
423-
font-weight: 700;
424-
}
425-
`)
426-
}
427-
428-
if (env.ENGINE === 'oxide') {
429-
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
430-
.btn {
431-
background-color: #ef4444;
432-
border-radius: 0.25rem;
433-
padding: 0.25rem 0.5rem;
434-
}
435-
.font-bold {
436-
font-weight: 700;
437-
}
438-
`)
439-
}
361+
expect(await readOutputFile(/index\.\w+\.css$/)).toIncludeCss(css`
362+
.btn {
363+
--tw-bg-opacity: 1;
364+
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
365+
border-radius: 0.25rem;
366+
padding: 0.25rem 0.5rem;
367+
}
368+
.font-bold {
369+
font-weight: 700;
370+
}
371+
`)
440372

441373
return runningProcess.stop()
442374
})

integrations/postcss-cli/tests/integration.test.js

+44-99
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
let $ = require('../../execute')
22
let { css, html, javascript } = require('../../syntax')
3-
let { env } = require('../../../lib/lib/sharedState')
43

54
let { readOutputFile, appendToInputFile, writeInputFile } = require('../../io')({
65
output: 'dist',
@@ -61,38 +60,20 @@ describe('watcher', () => {
6160
await appendToInputFile('index.html', html`<div class="bg-red-500"></div>`)
6261
await runningProcess.onStderr(ready)
6362

64-
if (env.ENGINE === 'stable') {
65-
expect(await readOutputFile('main.css')).toIncludeCss(
66-
css`
67-
.bg-red-500 {
68-
--tw-bg-opacity: 1;
69-
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
70-
}
71-
.font-bold {
72-
font-weight: 700;
73-
}
74-
.font-normal {
75-
font-weight: 400;
76-
}
77-
`
78-
)
79-
}
80-
81-
if (env.ENGINE === 'oxide') {
82-
expect(await readOutputFile('main.css')).toIncludeCss(
83-
css`
84-
.bg-red-500 {
85-
background-color: #ef4444;
86-
}
87-
.font-bold {
88-
font-weight: 700;
89-
}
90-
.font-normal {
91-
font-weight: 400;
92-
}
93-
`
94-
)
95-
}
63+
expect(await readOutputFile('main.css')).toIncludeCss(
64+
css`
65+
.bg-red-500 {
66+
--tw-bg-opacity: 1;
67+
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
68+
}
69+
.font-bold {
70+
font-weight: 700;
71+
}
72+
.font-normal {
73+
font-weight: 400;
74+
}
75+
`
76+
)
9677

9778
return runningProcess.stop()
9879
})
@@ -128,38 +109,20 @@ describe('watcher', () => {
128109
await appendToInputFile('glob/index.html', html`<div class="bg-red-500"></div>`)
129110
await runningProcess.onStderr(ready)
130111

131-
if (env.ENGINE === 'stable') {
132-
expect(await readOutputFile('main.css')).toIncludeCss(
133-
css`
134-
.bg-red-500 {
135-
--tw-bg-opacity: 1;
136-
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
137-
}
138-
.font-bold {
139-
font-weight: 700;
140-
}
141-
.font-normal {
142-
font-weight: 400;
143-
}
144-
`
145-
)
146-
}
147-
148-
if (env.ENGINE === 'oxide') {
149-
expect(await readOutputFile('main.css')).toIncludeCss(
150-
css`
151-
.bg-red-500 {
152-
background-color: #ef4444;
153-
}
154-
.font-bold {
155-
font-weight: 700;
156-
}
157-
.font-normal {
158-
font-weight: 400;
159-
}
160-
`
161-
)
162-
}
112+
expect(await readOutputFile('main.css')).toIncludeCss(
113+
css`
114+
.bg-red-500 {
115+
--tw-bg-opacity: 1;
116+
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
117+
}
118+
.font-bold {
119+
font-weight: 700;
120+
}
121+
.font-normal {
122+
font-weight: 400;
123+
}
124+
`
125+
)
163126

164127
return runningProcess.stop()
165128
})
@@ -284,40 +247,22 @@ describe('watcher', () => {
284247
)
285248
await runningProcess.onStderr(ready)
286249

287-
if (env.ENGINE === 'stable') {
288-
expect(await readOutputFile('main.css')).toIncludeCss(
289-
css`
290-
.btn {
291-
border-radius: 0.25rem;
292-
--tw-bg-opacity: 1;
293-
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
294-
padding-left: 0.5rem;
295-
padding-right: 0.5rem;
296-
padding-top: 0.25rem;
297-
padding-bottom: 0.25rem;
298-
}
299-
.font-bold {
300-
font-weight: 700;
301-
}
302-
`
303-
)
304-
}
305-
306-
if (env.ENGINE === 'oxide') {
307-
expect(await readOutputFile('main.css')).toIncludeCss(
308-
css`
309-
/* prettier-ignore */
310-
.btn {
311-
border-radius: 0.25rem;
312-
background-color: #ef4444;
313-
padding: 0.25rem 0.5rem;
314-
}
315-
.font-bold {
316-
font-weight: 700;
317-
}
318-
`
319-
)
320-
}
250+
expect(await readOutputFile('main.css')).toIncludeCss(
251+
css`
252+
.btn {
253+
border-radius: 0.25rem;
254+
--tw-bg-opacity: 1;
255+
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
256+
padding-left: 0.5rem;
257+
padding-right: 0.5rem;
258+
padding-top: 0.25rem;
259+
padding-bottom: 0.25rem;
260+
}
261+
.font-bold {
262+
font-weight: 700;
263+
}
264+
`
265+
)
321266

322267
return runningProcess.stop()
323268
})

0 commit comments

Comments
 (0)