Skip to content

Commit

Permalink
feat: Node types
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Nov 3, 2023
1 parent a75ba58 commit cdcc2ee
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 10 deletions.
3 changes: 1 addition & 2 deletions buildTestImages.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env tsx
// @ts-check

import { parseArgs } from 'node:util';
import { execSync } from 'node:child_process';
Expand All @@ -11,7 +10,7 @@ refreshDockerfile();
const options = {
match: { short: 'm', type: 'string' },
dry: { type: 'boolean' },
};
} as const;
const { values } = parseArgs({ options });

const { match, dry } = values;
Expand Down
3 changes: 1 addition & 2 deletions common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env tsx
// @ts-check

import fs from 'node:fs';
import * as fs from 'node:fs';
import * as path from 'node:path';

export const repository = 'ghcr.io/agoric/agoric-3-proposals';
Expand Down
3 changes: 1 addition & 2 deletions makeDockerfile.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env tsx
// @ts-check

import assert from 'node:assert';
import fs from 'node:fs';
import * as fs from 'node:fs';
import { readProposals } from './common';
import type {
ProposalInfo,
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"engines": {
"node": ">=18.0.0"
},
"devDependencies": {
"@types/node": "^18.0.0"
}
}
1 change: 0 additions & 1 deletion proposals/34:upgrade-10/performActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env tsx

// FIXME get TypeScript to resolve these, probably with lib:ES2022
import assert from 'node:assert/strict';
import {
provisionWallet,
Expand Down
1 change: 0 additions & 1 deletion proposals/43:upgrade-11/performActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env tsx

// FIXME get TypeScript to resolve these, probably with lib:ES2022
import assert from 'node:assert/strict';

import { agoric, agops } from '../../upgrade-test-scripts/lib/cliHelper.js';
Expand Down
3 changes: 1 addition & 2 deletions runTestImages.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env tsx
// @ts-check

import { parseArgs } from 'node:util';
import { execSync } from 'node:child_process';
import { imageNameForProposalTest, readProposals } from './common';

const options = {
match: { short: 'm', type: 'string' },
};
} as const;
const { values } = parseArgs({ options });

const { match } = values;
Expand Down
10 changes: 10 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"lib": [
"ES2022"
],
"module": "nodenext",
// ES2022 per Node 18 in https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
"target": "ES2022"
}
}
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"@types/node@^20.8.10":
version "20.8.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e"
integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==
dependencies:
undici-types "~5.26.4"

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

0 comments on commit cdcc2ee

Please sign in to comment.