Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 7ffe099

Browse files
committed
fix: remove windows
1 parent f48278d commit 7ffe099

File tree

8 files changed

+3545
-5252
lines changed

8 files changed

+3545
-5252
lines changed

.baserc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"name": "@dword-design/node",
3-
"supportedNodeVersions": [14, 16]
3+
"supportedNodeVersions": [14, 16],
4+
"windows": false
45
}

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
4+
},
5+
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-16",
6+
"updateContentCommand": "yarn --frozen-lockfile"
7+
}

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ jobs:
6767
os: ubuntu-latest
6868
- node: 16
6969
os: macos-latest
70-
- node: 16
71-
os: windows-latest
7270
name: build
7371
on:
7472
pull_request: {}

.gitpod.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ RUN git lfs install
77

88
# https://www.gitpod.io/docs/languages/javascript
99
RUN bash -c 'VERSION="16" && source $HOME/.nvm/nvm.sh && nvm install $VERSION && nvm use $VERSION && nvm alias default $VERSION'
10-
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix
1110

1211
RUN echo "\nexport PATH=$(yarn global bin):\$PATH" >> /home/gitpod/.bashrc
1312

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
".babelrc.json": true,
66
".commitlintrc.json": true,
77
".cz.json": true,
8+
".devcontainer": true,
89
".editorconfig": true,
910
".eslintrc.json": true,
1011
".gitattributes": true,
@@ -16,6 +17,7 @@
1617
".nyc_output": true,
1718
".releaserc.json": true,
1819
".renovaterc.json": true,
20+
".vscode": true,
1921
"CHANGELOG.md": true,
2022
"LICENSE.md": true,
2123
"coverage": true,

package.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,8 @@
4848
"@dword-design/base": "^9.1.10",
4949
"@dword-design/puppeteer": "^5.0.0",
5050
"@dword-design/tester": "^2.0.11",
51-
"@dword-design/tester-plugin-puppeteer": "^2.1.21",
52-
"@dword-design/tester-plugin-tmp-dir": "^2.1.6",
53-
"depcheck-package-name": "^2.0.6",
54-
"execa": "^6.1.0",
55-
"fs-extra": "^11.1.0",
56-
"nuxt": "^2.15.8",
57-
"output-files": "^2.0.0",
58-
"p-event": "^5.0.1",
59-
"tree-kill-promise": "^2.0.8"
51+
"@dword-design/tester-plugin-nuxt-config": "^1.1.11",
52+
"@dword-design/tester-plugin-puppeteer": "^2.1.21"
6053
},
6154
"engines": {
6255
"node": ">=14"

src/index.spec.js

Lines changed: 8 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
import { endent } from '@dword-design/functions'
22
import tester from '@dword-design/tester'
3+
import testerPluginNuxtConfig from '@dword-design/tester-plugin-nuxt-config'
34
import testerPluginPuppeteer from '@dword-design/tester-plugin-puppeteer'
4-
import testerPluginTmpDir from '@dword-design/tester-plugin-tmp-dir'
5-
import packageName from 'depcheck-package-name'
6-
import { execa, execaCommand } from 'execa'
7-
import fs from 'fs-extra'
8-
import { Builder, Nuxt } from 'nuxt'
9-
import outputFiles from 'output-files'
10-
import { pEvent } from 'p-event'
11-
import P from 'path'
12-
import kill from 'tree-kill-promise'
135

146
export default tester(
157
{
168
nuxt3: {
9+
config: {
10+
modules: ['./modules/foo', './modules/bar'],
11+
},
1712
files: {
1813
modules: {
1914
bar: {
@@ -48,16 +43,16 @@ export default tester(
4843
4944
`,
5045
},
51-
nuxtConfig: {
52-
modules: ['./modules/foo', './modules/bar'],
53-
},
5446
nuxtVersion: 3,
5547
async test() {
5648
await this.page.goto('http://localhost:3000')
5749
await this.page.waitForSelector('.bar')
5850
},
5951
},
6052
works: {
53+
config: {
54+
modules: ['~/modules/foo', '~/modules/bar'],
55+
},
6156
files: {
6257
modules: {
6358
bar: {
@@ -92,74 +87,11 @@ export default tester(
9287
9388
`,
9489
},
95-
nuxtConfig: {
96-
modules: ['~/modules/foo', '~/modules/bar'],
97-
},
9890
async test() {
9991
await this.page.goto('http://localhost:3000')
10092
await this.page.waitForSelector('.bar')
10193
},
10294
},
10395
},
104-
[
105-
testerPluginTmpDir(),
106-
{
107-
transform: config => {
108-
config = { nuxtConfig: {}, nuxtVersion: 2, test: () => {}, ...config }
109-
110-
return async function () {
111-
await outputFiles({
112-
'package.json': JSON.stringify({ type: 'module' }),
113-
...config.files,
114-
})
115-
if (config.nuxtVersion === 3) {
116-
await execaCommand('yarn add --dev nuxt')
117-
await fs.outputFile(
118-
'nuxt.config.js',
119-
`export default ${JSON.stringify({
120-
telemetry: false,
121-
...config.nuxtConfig,
122-
})}`
123-
)
124-
125-
const nuxtPath = P.resolve(
126-
'node_modules',
127-
'.bin',
128-
packageName`nuxt`
129-
)
130-
await execa(nuxtPath, ['build'])
131-
132-
const childProcess = execaCommand('node .output/server/index.mjs', {
133-
all: true,
134-
})
135-
await pEvent(childProcess.all, 'data')
136-
try {
137-
await config.test.call(this)
138-
} finally {
139-
await kill(childProcess.pid)
140-
}
141-
} else {
142-
const nuxt = new Nuxt({
143-
dev: false,
144-
...config.nuxtConfig,
145-
})
146-
if (config.error) {
147-
await expect(new Builder(nuxt).build()).rejects.toThrow(
148-
config.error
149-
)
150-
} else {
151-
await new Builder(nuxt).build()
152-
await nuxt.listen()
153-
try {
154-
await config.test.call(this)
155-
} finally {
156-
await nuxt.close()
157-
}
158-
}
159-
}
160-
}
161-
},
162-
},
163-
testerPluginPuppeteer(),
164-
]
96+
[testerPluginPuppeteer(), testerPluginNuxtConfig()]
16597
)

0 commit comments

Comments
 (0)