Skip to content

Commit 1cbb29f

Browse files
authored
Remove the watching context (#6858)
* remove watching context * update changelog
1 parent b9af5a9 commit 1cbb29f

File tree

12 files changed

+62
-396
lines changed

12 files changed

+62
-396
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Validate `theme()` works in arbitrary values ([#6852](https://github.com/tailwindlabs/tailwindcss/pull/6852))
1515
- Properly detect `theme()` value usage in arbitrary properties ([#6854](https://github.com/tailwindlabs/tailwindcss/pull/6854))
1616
- Improve collapsing of duplicate declarations ([#6856](https://github.com/tailwindlabs/tailwindcss/pull/6856))
17+
- Remove the watching context ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858))
1718

1819
## [3.0.8] - 2021-12-28
1920

integrations/parcel/tests/integration.test.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ describe.skip('watcher', () => {
4343
`
4444
)
4545

46-
let runningProcess = $('parcel watch ./src/index.html --no-cache', {
47-
env: { TAILWIND_MODE: 'watch' },
48-
})
46+
let runningProcess = $('parcel watch ./src/index.html --no-cache')
4947

5048
await waitForOutputFileCreation(/index\.\w+\.css$/)
5149

@@ -103,9 +101,7 @@ describe.skip('watcher', () => {
103101
`
104102
)
105103

106-
let runningProcess = $('parcel watch ./src/index.html --no-cache', {
107-
env: { TAILWIND_MODE: 'watch' },
108-
})
104+
let runningProcess = $('parcel watch ./src/index.html --no-cache')
109105

110106
await waitForOutputFileCreation(/index\.\w+\.css$/)
111107

@@ -172,9 +168,7 @@ describe.skip('watcher', () => {
172168
`
173169
)
174170

175-
let runningProcess = $('parcel watch ./src/index.html --no-cache', {
176-
env: { TAILWIND_MODE: 'watch' },
177-
})
171+
let runningProcess = $('parcel watch ./src/index.html --no-cache')
178172

179173
await waitForOutputFileCreation(/index\.\w+\.css$/)
180174

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ describe('watcher', () => {
3232
test('classes are generated when the html file changes', async () => {
3333
await writeInputFile('index.html', html`<div class="font-bold"></div>`)
3434

35-
let runningProcess = $('postcss ./src/index.css -o ./dist/main.css -w --verbose', {
36-
env: { TAILWIND_MODE: 'watch' },
37-
})
35+
let runningProcess = $('postcss ./src/index.css -o ./dist/main.css -w --verbose')
3836
await runningProcess.onStderr(ready)
3937

4038
expect(await readOutputFile('main.css')).toIncludeCss(
@@ -83,9 +81,7 @@ describe('watcher', () => {
8381
test('classes are generated when the tailwind.config.js file changes', async () => {
8482
await writeInputFile('index.html', html`<div class="font-bold md:font-medium"></div>`)
8583

86-
let runningProcess = $('postcss ./src/index.css -o ./dist/main.css -w --verbose', {
87-
env: { TAILWIND_MODE: 'watch' },
88-
})
84+
let runningProcess = $('postcss ./src/index.css -o ./dist/main.css -w --verbose')
8985

9086
await runningProcess.onStderr(ready)
9187

@@ -145,9 +141,7 @@ describe('watcher', () => {
145141
test('classes are generated when the index.css file changes', async () => {
146142
await writeInputFile('index.html', html`<div class="font-bold btn"></div>`)
147143

148-
let runningProcess = $('postcss ./src/index.css -o ./dist/main.css -w --verbose', {
149-
env: { TAILWIND_MODE: 'watch' },
150-
})
144+
let runningProcess = $('postcss ./src/index.css -o ./dist/main.css -w --verbose')
151145

152146
await runningProcess.onStderr(ready)
153147

integrations/rollup/tests/integration.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ describe('static build', () => {
2828
})
2929
})
3030

31-
describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watcher %p', (env) => {
31+
describe('watcher', () => {
3232
test(`classes are generated when the html file changes`, async () => {
3333
await writeInputFile('index.html', html`<div class="font-bold"></div>`)
3434

35-
let runningProcess = $('rollup -c --watch', { env })
35+
let runningProcess = $('rollup -c --watch')
3636
await runningProcess.onStderr(ready)
3737

3838
expect(await readOutputFile('index.css')).toIncludeCss(
@@ -81,7 +81,7 @@ describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watch
8181
test(`classes are generated when the tailwind.config.js file changes`, async () => {
8282
await writeInputFile('index.html', html`<div class="font-bold md:font-medium"></div>`)
8383

84-
let runningProcess = $('rollup -c --watch', { env })
84+
let runningProcess = $('rollup -c --watch')
8585
await runningProcess.onStderr(ready)
8686

8787
expect(await readOutputFile('index.css')).toIncludeCss(
@@ -140,7 +140,7 @@ describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watch
140140
test(`classes are generated when the index.css file changes`, async () => {
141141
await writeInputFile('index.html', html`<div class="font-bold btn"></div>`)
142142

143-
let runningProcess = $('rollup -c --watch', { env })
143+
let runningProcess = $('rollup -c --watch')
144144
await runningProcess.onStderr(ready)
145145

146146
expect(await readOutputFile('index.css')).toIncludeCss(

integrations/vite/tests/integration.test.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ describe('watcher', () => {
5353
`
5454
)
5555

56-
let runningProcess = $(`vite --port ${PORT}`, {
57-
env: { TAILWIND_MODE: 'watch' },
58-
})
56+
let runningProcess = $(`vite --port ${PORT}`)
5957
await runningProcess.onStdout((message) => message.includes('ready in'))
6058

6159
expect(await fetchCSS()).toIncludeCss(
@@ -110,9 +108,7 @@ describe('watcher', () => {
110108
`
111109
)
112110

113-
let runningProcess = $(`vite --port ${PORT}`, {
114-
env: { TAILWIND_MODE: 'watch' },
115-
})
111+
let runningProcess = $(`vite --port ${PORT}`)
116112
await runningProcess.onStdout((message) => message.includes('ready in'))
117113

118114
expect(await fetchCSS()).toIncludeCss(
@@ -177,9 +173,7 @@ describe('watcher', () => {
177173
`
178174
)
179175

180-
let runningProcess = $(`vite --port ${PORT}`, {
181-
env: { TAILWIND_MODE: 'watch' },
182-
})
176+
let runningProcess = $(`vite --port ${PORT}`)
183177
await runningProcess.onStdout((message) => message.includes('ready in'))
184178

185179
expect(await fetchCSS()).toIncludeCss(

integrations/webpack-4/tests/integration.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ describe('static build', () => {
2525
})
2626
})
2727

28-
describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watcher %p', (env) => {
28+
describe('watcher', () => {
2929
test(`classes are generated when the html file changes`, async () => {
3030
await writeInputFile('index.html', html`<div class="font-bold"></div>`)
3131

32-
let runningProcess = $('webpack --mode=development --watch', { env })
32+
let runningProcess = $('webpack --mode=development --watch')
3333

3434
await waitForOutputFileCreation('main.css')
3535

@@ -81,7 +81,7 @@ describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watch
8181
test(`classes are generated when the tailwind.config.js file changes`, async () => {
8282
await writeInputFile('index.html', html`<div class="font-bold md:font-medium"></div>`)
8383

84-
let runningProcess = $('webpack --mode=development --watch', { env })
84+
let runningProcess = $('webpack --mode=development --watch')
8585

8686
await waitForOutputFileCreation('main.css')
8787

@@ -142,7 +142,7 @@ describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watch
142142
test(`classes are generated when the index.css file changes`, async () => {
143143
await writeInputFile('index.html', html`<div class="font-bold btn"></div>`)
144144

145-
let runningProcess = $('webpack --mode=development --watch', { env })
145+
let runningProcess = $('webpack --mode=development --watch')
146146

147147
await waitForOutputFileCreation('main.css')
148148

integrations/webpack-5/tests/integration.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ describe('static build', () => {
2525
})
2626
})
2727

28-
describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watcher %p', (env) => {
28+
describe('watcher', () => {
2929
test(`classes are generated when the html file changes`, async () => {
3030
await writeInputFile('index.html', html`<div class="font-bold"></div>`)
3131

32-
let runningProcess = $('webpack --mode=development --watch', { env })
32+
let runningProcess = $('webpack --mode=development --watch')
3333

3434
await waitForOutputFileCreation('main.css')
3535

@@ -81,7 +81,7 @@ describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watch
8181
test(`classes are generated when the tailwind.config.js file changes`, async () => {
8282
await writeInputFile('index.html', html`<div class="font-bold md:font-medium"></div>`)
8383

84-
let runningProcess = $('webpack --mode=development --watch', { env })
84+
let runningProcess = $('webpack --mode=development --watch')
8585

8686
await waitForOutputFileCreation('main.css')
8787

@@ -142,7 +142,7 @@ describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watch
142142
test(`classes are generated when the index.css file changes`, async () => {
143143
await writeInputFile('index.html', html`<div class="font-bold btn"></div>`)
144144

145-
let runningProcess = $('webpack --mode=development --watch', { env })
145+
let runningProcess = $('webpack --mode=development --watch')
146146

147147
await waitForOutputFileCreation('main.css')
148148

@@ -245,7 +245,7 @@ describe.each([{ TAILWIND_MODE: 'watch' }, { TAILWIND_MODE: undefined }])('watch
245245
`
246246
)
247247

248-
let runningProcess = $('webpack --mode=development --watch', { env })
248+
let runningProcess = $('webpack --mode=development --watch')
249249

250250
await waitForOutputFileCreation('main.css')
251251

0 commit comments

Comments
 (0)