Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .baserc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"name": "@dword-design/node",
"supportedNodeVersions": [14, 16]
}
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
github.event.pull_request.head.ref || '' }}
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
- run: git config --global user.email "actions@github.com"
- run: git config --global user.name "GitHub Actions"
- run: yarn --frozen-lockfile
Expand Down Expand Up @@ -54,10 +54,9 @@ jobs:
with:
name: Image Snapshot Diffs
path: "**/__image_snapshots__/__diff_output__"
- if: matrix.os == 'ubuntu-latest' && matrix.node == 14
uses: codecov/codecov-action@v2
- if: matrix.os == 'ubuntu-latest' && matrix.node == 16
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
strategy:
matrix:
Expand All @@ -66,10 +65,10 @@ jobs:
os: ubuntu-latest
- node: 16
os: ubuntu-latest
- os: macos-latest
version: 14
- os: windows-latest
version: 14
- node: 16
os: macos-latest
- node: 16
os: windows-latest
name: build
on:
pull_request: {}
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN sudo apt-get install git-lfs
RUN git lfs install

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

RUN echo "\nexport PATH=$(yarn global bin):\$PATH" >> /home/gitpod/.bashrc
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,20 @@
},
"dependencies": {
"@dword-design/functions": "^4.0.0",
"@nuxt/kit": "^3.0.0-rc.11"
"@nuxt/kit": "^3.0.0"
},
"devDependencies": {
"@dword-design/base": "^8.0.0",
"@dword-design/base": "^9.1.10",
"@dword-design/puppeteer": "^5.0.0",
"@dword-design/tester": "^2.0.11",
"@dword-design/tester-plugin-puppeteer": "^2.1.21",
"@dword-design/tester-plugin-tmp-dir": "^2.1.6",
"depcheck-package-name": "^2.0.6",
"execa": "^5",
"fs-extra": "^10.1.0",
"execa": "^6.1.0",
"fs-extra": "^11.1.0",
"nuxt": "^2.15.8",
"output-files": "^2.0.0",
"p-event": "^5.0.1",
"tree-kill-promise": "^2.0.8"
},
"engines": {
Expand Down
19 changes: 11 additions & 8 deletions src/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { delay, endent } from '@dword-design/functions'
import { endent } from '@dword-design/functions'
import tester from '@dword-design/tester'
import testerPluginPuppeteer from '@dword-design/tester-plugin-puppeteer'
import testerPluginTmpDir from '@dword-design/tester-plugin-tmp-dir'
import packageName from 'depcheck-package-name'
import execa from 'execa'
import { outputFile } from 'fs-extra'
import { execa, execaCommand } from 'execa'
import fs from 'fs-extra'
import { Builder, Nuxt } from 'nuxt'
import outputFiles from 'output-files'
import { pEvent } from 'p-event'
import P from 'path'
import kill from 'tree-kill-promise'

Expand Down Expand Up @@ -112,8 +113,8 @@ export default tester(
...config.files,
})
if (config.nuxtVersion === 3) {
await execa.command('yarn add --dev nuxt@3.0.0-rc.12')
await outputFile(
await execaCommand('yarn add --dev nuxt')
await fs.outputFile(
'nuxt.config.js',
`export default ${JSON.stringify({
telemetry: false,
Expand All @@ -126,10 +127,12 @@ export default tester(
'.bin',
packageName`nuxt`
)
await execa(nuxtPath, ['build'])
await execa(nuxtPath, ['build'], { stdio: 'inherit' })

const childProcess = execa(nuxtPath, ['start'])
await delay(5000)
const childProcess = execaCommand('node .output/server/index.mjs', {
all: true,
})
await pEvent(childProcess.all, 'data')
try {
await config.test.call(this)
} finally {
Expand Down
Loading