Skip to content

Commit

Permalink
🗝️ lock node
Browse files Browse the repository at this point in the history
  • Loading branch information
kellymears committed Jul 8, 2023
1 parent a8892ba commit e0662f5
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 669 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
8 changes: 3 additions & 5 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 @@ -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
Loading

0 comments on commit e0662f5

Please sign in to comment.