Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lit build #42

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
ci: choose kit source and version
Ni55aN committed Aug 20, 2024
commit d2a2f3ff91ef1cc7da8361519a29c3a2a588373d
37 changes: 34 additions & 3 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -24,6 +24,14 @@ on:
description: 'Node version'
type: string
required: true
kit-source:
description: 'Rete Kit version source (npm or github)'
type: string
default: 'npm'
kit-version:
description: 'Rete Kit version/reference'
type: string
default: 'latest'
workflow_dispatch:
inputs:
os:
@@ -60,7 +68,17 @@ on:
description: 'Node version'
type: string
required: true

kit-source:
description: 'Rete Kit version source (npm or github)'
type: choice
options:
- npm
- github
default: 'npm'
kit-version:
description: 'Rete Kit version/reference'
type: string
default: 'latest'

jobs:
build-app:
@@ -71,8 +89,21 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node }}
- name: Install Rete Kit
run: npm i -g rete-kit
- name: Install Rete Kit from NPM
if: inputs.kit-source == 'npm'
run: npm i -g rete-kit@${{ inputs.kit-version }}
- uses: actions/checkout@v3
if: inputs.kit-source == 'github'
with:
repository: retejs/rete-kit
token: ${{ secrets.RETE_QA_PUBLIC_PULL }}
ref: ${{ inputs.kit-version }}
- name: Install Rete Kit from GitHub
if: inputs.kit-source == 'github'
run: |
npm ci
npm run build
npm i -g .
- name: Rete Kit version
run: rete-kit -V
- name: Bootstrapp application

Unchanged files with check annotations Beta

return Object.fromEntries(entries)
}
export async function install(cwd: string, dependencies: string[], aliases?: DependenciesAlias | string, force?: boolean) {

Check warning on line 20 in src/app/dependencies-installer.ts

GitHub Actions / ci / ci

This line has a length of 123. Maximum allowed is 120
const aliasesMap = typeof aliases === 'string'
? resolvePaths(JSON.parse(await fs.promises.readFile(aliases, { encoding: 'utf-8' })), dirname(aliases))
: aliases
}
// eslint-disable-next-line max-statements, complexity
export async function createApp({ name, stack, version, features, depsAlias, forceInstall = false, next = false }: Options) {

Check warning on line 43 in src/app/index.ts

GitHub Actions / ci / ci

This line has a length of 125. Maximum allowed is 120
const appName = name || await input('Name')
const selectedStack = stack || await select('Stack (framework)', appStacks.map(key => ({
name: builders[key].name,
const featuresList: Features.Feature[] = [
new Features.Default(builder.foundation, next),
new Features.Area3D(!(builder instanceof AngularBuilder && selectedVersion < 13), next),
new Features.Angular(builder.foundation === 'angular' ? selectedVersion as 12 | 13 | 14 | 15 | 16 | 17 : null, next),

Check warning on line 63 in src/app/index.ts

GitHub Actions / ci / ci

This line has a length of 121. Maximum allowed is 120
new Features.React(builder.foundation === 'react' ? selectedVersion : 18, selectedStack, next),
new Features.Vue(builder.foundation === 'vue' ? selectedVersion as 2 : 3, next),
new Features.Svelte(builder.foundation === 'svelte' ? selectedVersion as 4 : 4, next),
const descriptorPath = join(name, patchDescriptor)
if (folderExists) {
console.log('\n', chalk.bgGreen(' PATCH '), chalk.yellow('The app directory exists. Checking if it can be patched...'))

Check warning on line 63 in src/app/patch.ts

GitHub Actions / ci / ci

This line has a length of 123. Maximum allowed is 120
} else {
return { exists: false }
}
import { join } from 'path'

Check warning on line 1 in src/app/stack/angular/budgets.ts

GitHub Actions / ci / ci

Run autofix to sort these imports!
import fse from 'fs-extra'
export async function removeBudgets(name: string) {
import { getTSConfig, setTSConfig } from '../../../shared/ts-config'
export async function installCompatibleTS(path: string, version: string) {
console.log(chalk.bgGreen(' INFO '), chalk.green(`Enforcing the installation of TypeScript ${version} for the specified Angular version (adding "overrides" and "disableTypeScriptVersionCheck")`))

Check warning on line 9 in src/app/stack/angular/compatibility.ts

GitHub Actions / ci / ci

This line has a length of 197. Maximum allowed is 120
const config = await getPackageConfig(path)
const tsOverride = {
if (version === 17) options.push('--no-standalone')
await execa('npx', ['--package', `@angular/cli@${version}`, 'ng', 'new', name, ...options], { stdio: 'inherit' })
await execa('npx', ['npm-check-updates', '--upgrade', '--target', 'minor', '--filter', '/@angular.*/'], { stdio: 'inherit', cwd: name })

Check warning on line 23 in src/app/stack/angular/index.ts

GitHub Actions / ci / ci

This line has a length of 140. Maximum allowed is 120
await execa('npm', ['i'], { cwd: name })
if (version < 13) {
const assets = join(assetsStack, 'vue')
const presetFolder = join(assets, version === 2 ? 'vue2' : 'vue3')
await execa('npx', ['--package', `@vue/cli@`, 'vue', 'create', name, '--preset', presetFolder], { stdio: 'inherit' })

Check warning on line 20 in src/app/stack/vue/legacy.ts

GitHub Actions / ci / ci

This line has a length of 121. Maximum allowed is 120
}
// eslint-disable-next-line @typescript-eslint/naming-convention
import execa from 'execa'

Check warning on line 1 in src/app/stack/vue/vite.ts

GitHub Actions / ci / ci

Run autofix to sort these imports!
import fs from 'fs'
import fse from 'fs-extra'
import { dirname, join } from 'path'