Skip to content
Open
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
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@

version: 2
updates:
- package-ecosystem: "mix" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "mix"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "mix"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)

- package-ecosystem: "npm"
directory: "/assets"
schedule:
interval: "weekly"

interval: "daily"
allow:
- dependency-name: "@openfn/*"

- package-ecosystem: "github-actions"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
directory: "/"
schedule:
interval: "weekly"
1 change: 1 addition & 0 deletions assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
"@eslint/js": "^9.21.0",
"@openfn/cli": "1.35.3",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. I liked this at first, but these are dependencies of the app frontend. The CLI isn't a dependency of that at all. So I'm not sure this is the right place.

And actually, given that lightning depends on the CLI in production, shouldn't it be a prod dependency?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait - also, install_runtime will install the CLI globally. But npm install --prefix assets will install a local CLI in this folder. I'm not actually sure which bin will get used when running openfn (probably the global one).

"@openfn/ws-worker": "^1.25.0",
"@playwright/test": "^1.55.0",
"@redux-devtools/extension": "^3.3.0",
Expand Down
13 changes: 12 additions & 1 deletion lib/mix/tasks/install_runtime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ defmodule Mix.Tasks.Lightning.InstallRuntime do
use Mix.Task

@default_path "priv/openfn"
@cli_version "1.35.3"

# Single source of truth for the `@openfn/cli` version: `assets/package.json`.
# Putting it there lets Dependabot track it like any other npm dependency
# and open bump PRs when a new release ships.
@package_json Path.expand("../../../assets/package.json", __DIR__)
@external_resource @package_json
@cli_version @package_json
|> File.read!()
|> Jason.decode!()
|> get_in(["devDependencies", "@openfn/cli"])
|> String.trim_leading("^")
|> String.trim_leading("~")

def run(args) do
case Rambo.run("/usr/bin/env", ~w(which node)) do
Expand Down
9 changes: 5 additions & 4 deletions test/integration/web_and_worker_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,11 @@ defmodule Lightning.WebAndWorkerTest do
end

version_logs = pick_out_version_logs(run)
assert version_logs["@openfn/language-http"] =~ "3.1.12"
assert version_logs["worker"] =~ "1.25"
assert version_logs["node.js"] =~ "22.12"
assert version_logs["@openfn/language-common"] == "3.0.2"

for key <- ~w(@openfn/language-http worker node.js @openfn/language-common) do
assert version_logs[key] =~ ~r/\d+\.\d+/,
"expected #{key} log line to contain a version, got #{inspect(version_logs[key])}"
end

[step_1, step_2, step_3, step_4] = run.steps

Expand Down
Loading