Skip to content

Commit

Permalink
📦 lockfix
Browse files Browse the repository at this point in the history
  • Loading branch information
kellymears committed Jul 11, 2023
2 parents b0042d6 + b5535b2 commit ad5af83
Show file tree
Hide file tree
Showing 34 changed files with 656 additions and 1,198 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
platform:
- ubuntu-latest
node:
- 18.12.1
- 18.16.1

name: format-check (node@v${{matrix.node}}/${{matrix.platform}})
runs-on: ${{matrix.platform}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-deprecate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup
uses: actions/setup-node@v3
with:
node-version: 18.12.1
node-version: 18.16.1
cache: yarn

- name: Auth
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 18.16.1
cache: yarn

- run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 18.16.1
cache: yarn

- run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 18.16.1
cache: yarn

- run: npm install -g npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
platform:
- ubuntu-latest
node:
- 18.12.1
- 18.16.1

name: test node@${{matrix.node}}/${{matrix.platform}}
runs-on: ${{matrix.platform}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
platform:
- ubuntu-latest
node:
- 18.12.1
- 18.16.1

name: integration test (node@v${{matrix.node}}/${{matrix.platform}})
runs-on: ${{matrix.platform}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
platform:
- ubuntu-latest
node:
- 18.12.1
- 18.16.1

name: unit test (node@v${{matrix.node}}/${{matrix.platform}})
runs-on: ${{matrix.platform}}
Expand Down
4 changes: 2 additions & 2 deletions config/vitest.unit.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default defineConfig({
hookTimeout: 60000,
include: [
`sources/@roots/*/src/**/*.test.{ts,tsx}`,
`sources/@roots/*/test/**/*.{ts,tsx}`,
`sources/@roots/*/tests/**/*.{ts,tsx}`,
`sources/@roots/*/test/**/*.test.{ts,tsx}`,
`sources/@roots/*/tests/**/*.test.{ts,tsx}`,
`tests/unit/**/*.test.ts`,
`tests/reproductions/**/*.test.ts`,
],
Expand Down
3 changes: 1 addition & 2 deletions examples/stylelint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
],
"devDependencies": {
"@roots/bud": "latest",
"@roots/bud-stylelint": "latest",
"@roots/stylelint-config": "latest"
"@roots/bud-stylelint": "latest"
}
}
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"description": "⚡️ Lightning fast frontend build tools combining the best parts of Symfony Encore and Laravel Mix",
"engines": {
"node": "18.12.1",
"node": "18.16.1",
"yarn": "1.22.19",
"npm": "8.19.2"
},
Expand Down Expand Up @@ -45,7 +45,7 @@
"playwright": "1.35.1",
"pm2": "5.3.0",
"prettier": "2.8.8",
"syncpack": "10.6.1",
"syncpack": "10.7.3",
"ts-node": "10.9.1",
"tslib": "2.6.0",
"typescript": "5.1.6",
Expand All @@ -61,14 +61,12 @@
"sources/@roots/*/test/**/*",
"sources/@roots/*/src/__fixtures__/*",
"sources/create-bud-app",
"sources/deprecated/bud-terser",
"tests/util/project",
"tests/reproductions/*"
]
},
"volta": {
"node": "18.12.1",
"yarn": "1.22.19",
"npm": "8.19.2"
"node": "18.16.1",
"yarn": "1.22.19"
}
}
27 changes: 27 additions & 0 deletions sources/@repo/test-kit/integration-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,29 @@ interface Entrypoints {
}

class Project {
/**
* Compiled modules keyed by asset name
*/
public assets: Record<string, string> = {}

/**
* entrypoints.json contents
*/
public entrypoints: Entrypoints = {}

/**
* manifest.json contents
*/
public manifest: Record<string, any> = {}

/**
* Class constructor
*/
public constructor(public options: Options) {}

/**
* Build the project
*/
@bind
public async build() {
const build = this.options.buildCommand ?? [
Expand Down Expand Up @@ -65,6 +80,9 @@ class Project {
return this
}

/**
* Get the project directory
*/
public get directory(): string {
return path(
`storage`,
Expand All @@ -73,16 +91,25 @@ class Project {
)
}

/**
* Get an asset by name
*/
@bind
public getAsset(name: string) {
return this.assets[name]
}

/**
* Get an entrypoint by name
*/
@bind
public getEntrypoint(name: string) {
return this.entrypoints[name]
}

/**
* Get the path to a file in the project
*/
@bind
public getPath(...file: Array<string>) {
return join(this.directory, ...file)
Expand Down
48 changes: 27 additions & 21 deletions sources/@roots/bud-dashboard/src/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@ import type {Bud} from '@roots/bud-framework'
import type {StatsCompilation} from '@roots/bud-framework/config'
import type {BudHandler} from '@roots/bud-support/errors'

import {exit, stdout} from 'node:process'
import {exit} from 'node:process'

import Compilation from '@roots/bud-dashboard/views/compilation'
import Debug from '@roots/bud-dashboard/views/debug'
import Error from '@roots/bud-dashboard/views/node-error'
import Server from '@roots/bud-dashboard/views/server'
import {
Box,
Fragment,
type PropsWithChildren,
Spinner,
Text,
useApp,
useInput,
useState,
Expand Down Expand Up @@ -62,19 +59,12 @@ export const Application = ({
}: Props) => {
if (error) return <Error error={error} />

return (
<Box flexDirection="column" gap={1} marginY={1} width={stdout.columns}>
{!compilations?.length && status && (
<Text dimColor wrap="truncate-end">
<Spinner type="simpleDots" />
{` `}
{status}
</Text>
)}
if (!compilations?.length) return null

return (
<Box flexDirection="column" gap={1} marginY={1}>
{compilations?.map((compilation, id) => {
if (isolated > 0 && id + 1 !== isolated)
return <Fragment key={id}></Fragment>
if (isolated > 0 && id + 1 !== isolated) return null

return (
<Box flexDirection="column" gap={1} key={id}>
Expand Down Expand Up @@ -124,12 +114,28 @@ export const TeletypeApplication = ({
const [isolated, setIsolated] = useState(0)

useInput((key, input) => {
key === `a` && setDisplayAssets(!displayAssets)
key === `e` && setDisplayEntrypoints(!displayEntrypoints)
key === `d` && setDisplayDebug(!debug)
key === `s` && setDisplayServerInfo(!displayServerInfo)
key === `c` && setCompact(!compact)
key === `0` && setIsolated(0)
switch (key) {
case `a`:
setDisplayAssets(!displayAssets)
break
case `e`:
setDisplayEntrypoints(!displayEntrypoints)
break
case `d`:
setDisplayDebug(!debug)
break
case `s`:
setDisplayServerInfo(!displayServerInfo)
break
case `c`:
setCompact(!compact)
break
case `0`:
setIsolated(0)
break
default:
break
}

new Array(9)
.fill(0)
Expand Down
5 changes: 4 additions & 1 deletion sources/@roots/bud-dashboard/src/components/asset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Asset = (asset: Props) => {
>
<Box flexDirection="row" overflowX="hidden">
<Text dimColor={!asset.emitted} wrap="truncate-end">
{` `}
{!asset.emitted ? figures.almostEqual : figures.pointerSmall}
{` `}
{asset.name}
Expand All @@ -37,7 +38,9 @@ const Asset = (asset: Props) => {
</Text>
)}
</Box>
<Text dimColor>{`${formatSize(asset.size)}`.trim()}</Text>
<Text dimColor>
{`${asset.size > 0 ? formatSize(asset.size) : `ø`}`.trim()}
</Text>
</Box>
</Box>
)
Expand Down
30 changes: 0 additions & 30 deletions sources/@roots/bud-dashboard/src/components/assets.component.tsx

This file was deleted.

28 changes: 15 additions & 13 deletions sources/@roots/bud-dashboard/src/components/view.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
import figures from '@roots/bud-support/figures'
import {Box, Text} from '@roots/bud-support/ink'

export interface Props {
borderColor?: string
children?: any
compact?: boolean
footer?: any
head?: any
paddingY?: number
}

const View = ({
borderColor = `dim`,
children,
compact,
footer,
head,
}: {
borderColor?: string
children?: any
compact?: boolean
footer?: any
head?: any
}) => {
paddingY = 0,
}: Props) => {
return (
<Box flexDirection="column" overflowX="hidden" width="100%">
<Box flexDirection="row" gap={1} overflowX="hidden" width="100%">
<Box flexDirection="row" gap={0} minWidth={2}>
<Box flexDirection="row" gap={0} minWidth={1}>
<Text color={borderColor}>{figures.lineDownRightArc}</Text>
<Text color={borderColor}>{figures.line}</Text>
</Box>
{head}
</Box>
Expand All @@ -35,19 +38,18 @@ const View = ({
flexDirection="column"
gap={1}
overflowX="hidden"
paddingBottom={1}
paddingBottom={paddingY}
paddingLeft={1}
paddingTop={1}
paddingTop={paddingY}
width="100%"
>
{children}
</Box>
)}

<Box flexDirection="row" gap={1} overflowX="hidden" width="100%">
<Box flexDirection="row" gap={0} minWidth={2}>
<Box flexDirection="row" gap={0} minWidth={1}>
<Text color={borderColor}>{figures.lineUpRightArc}</Text>
<Text color={borderColor}>{figures.line}</Text>
</Box>

{footer}
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-dashboard/src/service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export class Dashboard extends Service implements BudDashboard {
* the current state.
*/
renderApplication(
<Box flexDirection="column" width="100%">
<Box flexDirection="column">
<Console messages={this.messages} />

<App
Expand Down
Loading

0 comments on commit ad5af83

Please sign in to comment.