Skip to content
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
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
script:
# ----- Build: non-TypeScript projects -----
- name: 'build (non-TS)'
run: pnpm --filter '!*typescript*' --filter '!*nightwatch*' build
run: pnpm --filter '!*typescript*' build
# ----- Build: TypeScript projects (sampled) -----
# Covers key tsconfig variations:
# typescript - minimal base case
Expand Down Expand Up @@ -89,9 +89,9 @@ jobs:
run: pnpm --filter '*vitest*' test:unit
# ----- ESLint -----
- name: 'lint:oxlint'
run: pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:oxlint --max-warnings=0 -A no-empty-file
run: pnpm --filter '*eslint*' lint:oxlint --max-warnings=0 -A no-empty-file
- name: 'lint:eslint'
run: pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:eslint --no-fix --max-warnings=0
run: pnpm --filter '*eslint*' lint:eslint --no-fix --max-warnings=0
# ----- Prettier -----
- name: 'format (prettier)'
run: pnpm --filter '*prettier*' format
Expand Down Expand Up @@ -121,6 +121,10 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: remove playground to avoid conflicts with downloaded artifact
run: >-
node -e "require('fs').rmSync('./playground', { recursive: true, force: true })"

- uses: atos-actions/download-artifact@v2
with:
name: build-output
Expand Down Expand Up @@ -166,6 +170,10 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: remove playground to avoid conflicts with downloaded artifact
run: >-
node -e "require('fs').rmSync('./playground', { recursive: true, force: true })"

- uses: atos-actions/download-artifact@v2
with:
name: build-output
Expand Down Expand Up @@ -273,6 +281,10 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: remove playground to avoid conflicts with downloaded artifact
run: >-
node -e "require('fs').rmSync('./playground', { recursive: true, force: true })"

- uses: atos-actions/download-artifact@v2
with:
name: build-output
Expand Down
36 changes: 1 addition & 35 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const FEATURE_FLAGS = [
'with-tests',
'vitest',
'cypress',
'nightwatch',
'playwright',
'eslint',
'prettier',
Expand Down Expand Up @@ -106,7 +105,7 @@ type PromptResult = {
packageName?: string
needsTypeScript?: boolean
features?: (typeof FEATURE_OPTIONS)[number]['value'][]
e2eFramework?: 'cypress' | 'nightwatch' | 'playwright'
e2eFramework?: 'cypress' | 'playwright'
experimentFeatures?: (typeof EXPERIMENTAL_FEATURE_OPTIONS)[number]['value'][]
needsBareboneTemplates?: boolean
packageManager?: PackageManager
Expand Down Expand Up @@ -198,9 +197,6 @@ Available feature flags:
If used without ${cyan('--vitest')}, it will also add Cypress Component Testing.
--playwright
Add Playwright for end-to-end testing.
--nightwatch
Add Nightwatch for end-to-end testing.
If used without ${cyan('--vitest')}, it will also add Nightwatch Component Testing.
--eslint
Add ESLint for code quality.
--prettier
Expand Down Expand Up @@ -362,13 +358,6 @@ async function init() {
? language.e2eSelection.selectOptions.cypress.desc
: language.e2eSelection.selectOptions.cypress.hintOnComponentTesting!,
},
{
value: 'nightwatch',
label: language.e2eSelection.selectOptions.nightwatch.title,
hint: hasVitest
? language.e2eSelection.selectOptions.nightwatch.desc
: language.e2eSelection.selectOptions.nightwatch.hintOnComponentTesting!,
},
],
}),
)
Expand Down Expand Up @@ -429,8 +418,6 @@ async function init() {
const needsCypress =
argv.cypress || argv.tests || argv['with-tests'] || e2eFramework === 'cypress'
const needsCypressCT = needsCypress && !needsVitest
const needsNightwatch = argv.nightwatch || e2eFramework === 'nightwatch'
const needsNightwatchCT = needsNightwatch && !needsVitest
const needsPlaywright = argv.playwright || e2eFramework === 'playwright'

const root = path.join(cwd, targetDir)
Expand Down Expand Up @@ -481,12 +468,6 @@ async function init() {
if (needsCypressCT) {
render('config/cypress-ct')
}
if (needsNightwatch) {
render('config/nightwatch')
}
if (needsNightwatchCT) {
render('config/nightwatch-ct')
}
if (needsPlaywright) {
render('config/playwright')
}
Expand Down Expand Up @@ -530,16 +511,6 @@ async function init() {
path: './tsconfig.vitest.json',
})
}
if (needsNightwatch) {
render('tsconfig/nightwatch')
// Nightwatch needs a standalone tsconfig, but in a different folder.
rootTsConfig.references.push({
path: './nightwatch/tsconfig.json',
})
}
if (needsNightwatchCT) {
render('tsconfig/nightwatch-ct')
}
fs.writeFileSync(
path.resolve(root, 'tsconfig.json'),
JSON.stringify(rootTsConfig, null, 2) + '\n',
Expand Down Expand Up @@ -647,9 +618,6 @@ async function init() {
if (needsCypressCT) {
render('bare/cypress-ct')
}
if (needsNightwatchCT) {
render('bare/nightwatch-ct')
}
}

// Cleanup.
Expand Down Expand Up @@ -728,9 +696,7 @@ async function init() {
needsTypeScript,
needsVitest,
needsCypress,
needsNightwatch,
needsPlaywright,
needsNightwatchCT,
needsCypressCT,
needsEslint,
}),
Expand Down
5 changes: 0 additions & 5 deletions locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
"title": "Cypress",
"desc": "https://www.cypress.io/",
"hintOnComponentTesting": "also supports unit testing with Cypress Component Testing - https://www.cypress.io/"
},
"nightwatch": {
"title": "Nightwatch",
"desc": "https://nightwatchjs.org/",
"hintOnComponentTesting": "also supports unit testing with Nightwatch Component Testing - https://nightwatchjs.org/"
}
}
},
Expand Down
5 changes: 0 additions & 5 deletions locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
"title": "Cypress",
"desc": "https://www.cypress.io/",
"hintOnComponentTesting": "prend également en charge les tests unitaires avec Cypress Component Testing - https://www.cypress.io/"
},
"nightwatch": {
"title": "Nightwatch",
"desc": "https://nightwatchjs.org/",
"hintOnComponentTesting": "prend également en charge les tests unitaires avec Nightwatch Component Testing - https://nightwatchjs.org/"
}
}
},
Expand Down
5 changes: 0 additions & 5 deletions locales/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
"title": "Cypress",
"desc": "https://www.cypress.io/",
"hintOnComponentTesting": "ayrıca Cypress Bileşen Testi ile birim testini de destekler - https://www.cypress.io/"
},
"nightwatch": {
"title": "Nightwatch",
"desc": "https://nightwatchjs.org/",
"hintOnComponentTesting": "ayrıca Nightwatch Bileşen Testi ile birim testini de destekler - https://nightwatchjs.org/"
}
}
},
Expand Down
5 changes: 0 additions & 5 deletions locales/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
"title": "Cypress",
"desc": "https://www.cypress.io/",
"hintOnComponentTesting": "同时支持基于 Cypress Component Testing 的单元测试 - https://www.cypress.io/"
},
"nightwatch": {
"title": "Nightwatch",
"desc": "https://nightwatchjs.org/",
"hintOnComponentTesting": "同时支持基于 Nightwatch Component Testing 的单元测试 - https://nightwatchjs.org/"
}
}
},
Expand Down
5 changes: 0 additions & 5 deletions locales/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
"title": "Cypress",
"desc": "https://www.cypress.io/",
"hintOnComponentTesting": "同時支援基於 Cypress Component Testing 的單元測試 - https://www.cypress.io/"
},
"nightwatch": {
"title": "Nightwatch",
"desc": "https://nightwatchjs.org/",
"hintOnComponentTesting": "同時支援基於 Nightwatch Component Testing 的單元測試 - https://nightwatchjs.org/"
}
}
},
Expand Down
Loading