Skip to content

Commit

Permalink
chore: modernize for wing v0.50.4 (#17)
Browse files Browse the repository at this point in the history
* chore: modernize for wing v0.50.4

- replace `${}` with `{}`
- replace `init` with `new`
- some changes around `std.Node.of()`.

bump all libs that were changed

* add "constructs"

* update package.json

* update

* include dev

* make constructs a normal dep for now

* remove constructs damn it
  • Loading branch information
eladb authored Nov 26, 2023
1 parent 23db207 commit 2683296
Show file tree
Hide file tree
Showing 27 changed files with 13,727 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
run: npm install --include=dev
working-directory: checks
- name: Test
run: wing test **/*.test.w
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
run: npm install --include=dev
working-directory: checks
- name: Test
run: wing test **/*.test.w
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/containers-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
run: npm install --include=dev
working-directory: containers
- name: Test
run: wing test **/*.test.w
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/containers-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
run: npm install --include=dev
working-directory: containers
- name: Test
run: wing test **/*.test.w
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postgres-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
run: npm install --include=dev
working-directory: postgres
- name: Test
run: wing test **/*.test.w
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postgres-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
run: npm install --include=dev
working-directory: postgres
- name: Test
run: wing test **/*.test.w
Expand Down
4 changes: 2 additions & 2 deletions checks/check-http.w
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ pub class CheckHttp impl c.ICheck {
}

let method = options?.method ?? http.HttpMethod.GET;
log("http ${method} ${full_url}");
log("http {method} {full_url}");
let response = http.fetch(full_url, method: method);
log("status ${response.status}");
log("status {response.status}");

expect.equal(response.status, options?.status ?? 200);

Expand Down
4 changes: 2 additions & 2 deletions checks/check.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ api.get("/foo", inflight (req) => {
new cloud.Function(simulateFailure) as "simulate failure";

let check = new c.Check(inflight () => {
let response = http.get("${api.url}/foo");
let response = http.get("{api.url}/foo");
if !response.ok {
throw "response status ${response.status}";
throw "response status {response.status}";
}

log(response.body);
Expand Down
4 changes: 2 additions & 2 deletions checks/check.w
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub class Check impl ICheck {
this.results = r.Results.of(this);

let wrapper = inflight (): str => {
log("running check ${this.node.path} (${this.checkid})...");
log("running check {this.node.path} ({this.checkid})...");
let ts = datetime.utcNow().toIso();

let var result: r.CheckResult = {
Expand All @@ -52,7 +52,7 @@ pub class Check impl ICheck {
try {
handler();
} catch e {
log("check failed: ${e}");
log("check failed: {e}");

result = {
checkid: this.checkid,
Expand Down
Loading

0 comments on commit 2683296

Please sign in to comment.