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

Commit 62015c1

Browse files
fix: lock file maintenance (#93)
1 parent cea76f9 commit 62015c1

File tree

6 files changed

+2049
-1418
lines changed

6 files changed

+2049
-1418
lines changed

.baserc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2+
"name": "@dword-design/node",
23
"supportedNodeVersions": [14, 16]
34
}

.github/workflows/build.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
github.event.pull_request.head.ref || '' }}
1818
- uses: actions/setup-node@v3
1919
with:
20-
node-version: 14
20+
node-version: 16
2121
- run: git config --global user.email "actions@github.com"
2222
- run: git config --global user.name "GitHub Actions"
2323
- run: yarn --frozen-lockfile
@@ -54,10 +54,9 @@ jobs:
5454
with:
5555
name: Image Snapshot Diffs
5656
path: "**/__image_snapshots__/__diff_output__"
57-
- if: matrix.os == 'ubuntu-latest' && matrix.node == 14
58-
uses: codecov/codecov-action@v2
57+
- if: matrix.os == 'ubuntu-latest' && matrix.node == 16
58+
uses: codecov/codecov-action@v3
5959
with:
60-
fail_ci_if_error: true
6160
token: ${{ secrets.CODECOV_TOKEN }}
6261
strategy:
6362
matrix:
@@ -66,10 +65,10 @@ jobs:
6665
os: ubuntu-latest
6766
- node: 16
6867
os: ubuntu-latest
69-
- os: macos-latest
70-
version: 14
71-
- os: windows-latest
72-
version: 14
68+
- node: 16
69+
os: macos-latest
70+
- node: 16
71+
os: windows-latest
7372
name: build
7473
on:
7574
pull_request: {}

.gitpod.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN sudo apt-get install git-lfs
66
RUN git lfs install
77

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

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

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,20 @@
4141
},
4242
"dependencies": {
4343
"@dword-design/functions": "^4.0.0",
44-
"@nuxt/kit": "^3.0.0-rc.11"
44+
"@nuxt/kit": "^3.0.0"
4545
},
4646
"devDependencies": {
47-
"@dword-design/base": "^8.0.0",
47+
"@dword-design/base": "^9.1.10",
4848
"@dword-design/puppeteer": "^5.0.0",
4949
"@dword-design/tester": "^2.0.11",
5050
"@dword-design/tester-plugin-puppeteer": "^2.1.21",
5151
"@dword-design/tester-plugin-tmp-dir": "^2.1.6",
5252
"depcheck-package-name": "^2.0.6",
53-
"execa": "^5",
54-
"fs-extra": "^10.1.0",
53+
"execa": "^6.1.0",
54+
"fs-extra": "^11.1.0",
5555
"nuxt": "^2.15.8",
5656
"output-files": "^2.0.0",
57+
"p-event": "^5.0.1",
5758
"tree-kill-promise": "^2.0.8"
5859
},
5960
"engines": {

src/index.spec.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { delay, endent } from '@dword-design/functions'
1+
import { endent } from '@dword-design/functions'
22
import tester from '@dword-design/tester'
33
import testerPluginPuppeteer from '@dword-design/tester-plugin-puppeteer'
44
import testerPluginTmpDir from '@dword-design/tester-plugin-tmp-dir'
55
import packageName from 'depcheck-package-name'
6-
import execa from 'execa'
7-
import { outputFile } from 'fs-extra'
6+
import { execa, execaCommand } from 'execa'
7+
import fs from 'fs-extra'
88
import { Builder, Nuxt } from 'nuxt'
99
import outputFiles from 'output-files'
10+
import { pEvent } from 'p-event'
1011
import P from 'path'
1112
import kill from 'tree-kill-promise'
1213

@@ -112,8 +113,8 @@ export default tester(
112113
...config.files,
113114
})
114115
if (config.nuxtVersion === 3) {
115-
await execa.command('yarn add --dev nuxt@3.0.0-rc.12')
116-
await outputFile(
116+
await execaCommand('yarn add --dev nuxt')
117+
await fs.outputFile(
117118
'nuxt.config.js',
118119
`export default ${JSON.stringify({
119120
telemetry: false,
@@ -126,10 +127,12 @@ export default tester(
126127
'.bin',
127128
packageName`nuxt`
128129
)
129-
await execa(nuxtPath, ['build'])
130+
await execa(nuxtPath, ['build'], { stdio: 'inherit' })
130131

131-
const childProcess = execa(nuxtPath, ['start'])
132-
await delay(5000)
132+
const childProcess = execaCommand('node .output/server/index.mjs', {
133+
all: true,
134+
})
135+
await pEvent(childProcess.all, 'data')
133136
try {
134137
await config.test.call(this)
135138
} finally {

0 commit comments

Comments
 (0)