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
10 changes: 5 additions & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ common:
- deno_matrix: &deno_matrix
matrix:
# - "ubuntu"
- "ubuntu-1.42.1"
- "ubuntu-2.0.4"
plugins:
- docker#v5.10.0:
image: "denoland/deno:{{matrix}}"
Expand Down Expand Up @@ -51,14 +51,14 @@ steps:
label: ":godmode: test project minimal"
build:
message: "test runreal ${BUILDKITE_BRANCH}-${BUILDKITE_COMMIT}"
env:
env:
RUNREAL_FROM_SOURCE: true
RUNREAL_FROM_REF: $BUILDKITE_COMMIT
- trigger: "test-project-minimal-p4"
label: ":godmode: test project minimal [p4]"
build:
message: "test runreal ${BUILDKITE_BRANCH}-${BUILDKITE_COMMIT}"
env:
env:
RUNREAL_FROM_SOURCE: true
RUNREAL_FROM_REF: $BUILDKITE_COMMIT

Expand All @@ -71,13 +71,13 @@ steps:
label: ":goberserk: test project full"
build:
message: "test runreal ${BUILDKITE_BRANCH}-${BUILDKITE_COMMIT}"
env:
env:
RUNREAL_FROM_SOURCE: true
RUNREAL_FROM_REF: $BUILDKITE_COMMIT
- trigger: "test-project-full-p4"
label: ":goberserk: test project full [p4]"
build:
message: "test runreal ${BUILDKITE_BRANCH}-${BUILDKITE_COMMIT}"
env:
env:
RUNREAL_FROM_SOURCE: true
RUNREAL_FROM_REF: $BUILDKITE_COMMIT
4 changes: 2 additions & 2 deletions .github/workflows/generate-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
deno-version: [1.41.3]
deno-version: [2.0.4]

steps:
- name: Checkout
Expand All @@ -25,7 +25,7 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup Deno ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno-version }}
- name: Run generate-schema
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ env:
jobs:
release:
runs-on: ubuntu-latest

strategy:
matrix:
deno-version: [1.42.1]
deno-version: [2.0.4]

steps:
- uses: google-github-actions/release-please-action@v3
Expand All @@ -34,13 +34,13 @@ jobs:

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- name: Setup Deno ${{ matrix.deno-version }}
if: ${{ steps.release.outputs.release_created }}
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno-version }}

- name: Deno Compile [windows]
if: ${{ steps.release.outputs.release_created }}
run: deno task compile-win
Expand All @@ -59,7 +59,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./build/runreal-win-x64.exe ./build/runreal-macos-arm ./build/runreal-linux-x64 schema.json

- name: Cache Deno dependencies
- name: Cache Deno dependencies
if: ${{ steps.release.outputs.release_created }}
uses: actions/cache@v3
with:
Expand Down
11 changes: 11 additions & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,16 @@
"singleQuote": true,
"proseWrap": "preserve",
"semiColons": false
},
"imports": {
"@cliffy/command": "jsr:@cliffy/command@1.0.0-rc.7",
"@rebeccastevens/deepmerge": "jsr:@rebeccastevens/deepmerge@^7.1.3",
"@std/assert": "jsr:@std/assert@^1.0.6",
"@std/dotenv": "jsr:@std/dotenv@^0.225.2",
"@std/fmt": "jsr:@std/fmt@^1.0.3",
"@std/jsonc": "jsr:@std/jsonc@^1.0.1",
"@std/path": "jsr:@std/path@^1.0.7",
"@std/streams": "jsr:@std/streams@^1.0.7",
"@std/testing": "jsr:@std/testing@^1.0.3",
}
}
320 changes: 151 additions & 169 deletions deno.lock

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/commands/workflow/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ async function executeCommand(step: { command: string; args: string[] }) {
await execCmd(baseCmd, [...step.command.split(' ').slice(1), ...step.args])
}
} catch (e) {
console.log(`[error] failed to exec :runreal ${step.command} ${step.args.join(' ')}: => ${e.message}`)
if (e instanceof Error) {
console.log(`[error] failed to exec :runreal ${step.command} ${step.args.join(' ')}: => ${e.message}`)
}
throw e
}
}
Expand All @@ -50,7 +52,7 @@ export const exec = new Command<GlobalOptions>()
.description('run')
.arguments('<workflow>')
.action(async (options, workflow) => {
const { dryRun, mode } = options as ExecOptions
const { dryRun, mode } = options
const cfg = config.get(options as CliOptions) as any

const run = cfg.workflows.find((w: any) => w.name === workflow)
Expand Down
19 changes: 11 additions & 8 deletions src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
export * as path from 'https://deno.land/std@0.222.1/path/mod.ts'
export { mergeReadableStreams } from 'https://deno.land/std@0.204.0/streams/merge_readable_streams.ts'
export * as fmt from 'https://deno.land/std@0.204.0/fmt/colors.ts'
export * as dotenv from 'https://deno.land/std@0.204.0/dotenv/mod.ts'
export { parse } from 'https://deno.land/std@0.204.0/jsonc/parse.ts'
export * as path from 'jsr:@std/path'
export { mergeReadableStreams } from 'jsr:@std/streams'

export * as dotenv from 'jsr:@std/dotenv'
export * as fmt from 'jsr:@std/fmt/colors'

export { parse } from 'jsr:@std/jsonc'
// Maybe use npm specifier

export { xml2js } from 'https://deno.land/x/xml2js@1.0.0/mod.ts'
export { Command, EnumType, ValidationError } from 'https://deno.land/x/cliffy@v1.0.0-rc.3/command/mod.ts'
export { deepmerge } from 'https://deno.land/x/deepmergets@v5.1.0/dist/deno/index.ts'
export { Command, EnumType, ValidationError } from 'jsr:@cliffy/command@1.0.0-rc.7'
export { deepmerge } from 'jsr:@rebeccastevens/deepmerge'
export { readNdjson } from 'https://deno.land/x/ndjson@1.1.0/mod.ts'

import { monotonicFactory } from 'https://deno.land/x/ulid@v0.3.0/mod.ts'
const ulid = monotonicFactory()
export { ulid }

export { z } from 'https://deno.land/x/zod@v3.22.4/mod.ts'
export { z } from 'https://deno.land/x/zod@v3.23.8/mod.ts'
export { globber } from 'https://deno.land/x/globber@0.1.0/mod.ts'
export { zodToJsonSchema } from 'npm:zod-to-json-schema'
2 changes: 1 addition & 1 deletion src/lib/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class Perforce extends Base {
}
return parts.join('/')
}
safeRef(): string {
override safeRef(): string {
return this.changelist()
}
safeFullRef(): string {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class DefaultMap<K, V> extends Map<K, V> {
super(entries)
}

get(key: K): V {
override get(key: K): V {
if (!super.has(key)) {
super.set(key, this.defaultFn(key))
}
Expand Down
4 changes: 2 additions & 2 deletions tests/config.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assert, assertEquals } from 'https://deno.land/std/assert/mod.ts'
import { assert, assertEquals } from '@std/assert'
import { Config } from '../src/lib/config.ts'
import { path, ulid } from '../src/deps.ts'
import { CliOptions } from '../src/lib/types.ts'
import { FakeTime } from 'https://deno.land/std@0.224.0/testing/time.ts'
import { FakeTime } from '@std/testing/time'

Deno.test('Config.create should initialize with default values', async () => {
using time = new FakeTime()
Expand Down
4 changes: 2 additions & 2 deletions tests/source.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from 'https://deno.land/std/assert/mod.ts'
import { returnsNext, stub } from 'https://deno.land/std/testing/mock.ts'
import { assertEquals } from '@std/assert'
import { returnsNext, stub } from '@std/testing/mock'
import { Perforce, Source } from '../src/lib/source.ts'

Deno.test('source git', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/template.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from 'https://deno.land/std/assert/mod.ts'
import { assertEquals } from '@std/assert'
import { getSubstitutions, normalizePaths, render, renderConfig } from '../src/lib/template.ts'
import { RunrealConfig } from '../src/lib/types.ts'

Expand Down