Skip to content

Commit

Permalink
fix yarn run build, Docker build (#25)
Browse files Browse the repository at this point in the history
1. Fix the build by backing down a version of tsc and friends until other tools catch up
2. Add a `yarn run build` step to verify-pr workflow.
  • Loading branch information
shannonwells authored Sep 18, 2024
1 parent f2fbf3a commit a1c9b77
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ permissions:

jobs:
build-faucet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install --frozen-lockfile
- run: yarn run build
build-faucet-client:
runs-on: ubuntu-latest
defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"ts-jest": "^29.0.5",
"ts-node": "^10.9.2",
"ts-patch": "^3.2.1",
"typescript": "^5.1.3",
"typescript-transform-paths": "^3.5.1"
"typescript": "^4.9.3",
"typescript-transform-paths": "^3.4.6"
}
}
4 changes: 2 additions & 2 deletions src/faucet.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ describe("Faucet E2E", () => {

const oldDrip = new Drip();
oldDrip.addressSha256 = sha256(userAddress);
oldDrip.timestamp = BigInt(Date.now() - 30 * 60 * 60 * 1000);
oldDrip.timestamp = Date.now() - 30 * 60 * 60 * 1000;
dripRepository.insert(oldDrip);

const result = await drip(webEndpoint, userAddress);
Expand All @@ -227,7 +227,7 @@ describe("Faucet E2E", () => {

const oldDrip = new Drip();
oldDrip.addressSha256 = sha256(userAddress);
oldDrip.timestamp = BigInt(Date.now() - 5 * 60 * 60 * 1000);
oldDrip.timestamp = Date.now() - 5 * 60 * 60 * 1000;
await dripRepository.insert(oldDrip);

await expect(drip(webEndpoint, userAddress)).rejects.toThrow(
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"baseUrl": ".",
"baseUrl": "./",
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
Expand All @@ -11,7 +11,7 @@
"moduleResolution": "node",
"outDir": "./build",
"paths": {
"src/*": ["/src/*"]
"src/*": ["./src/*"]
},
"plugins": [
// Transform paths in output .js files
Expand All @@ -27,5 +27,6 @@
"typeRoots": ["./node_modules/@types", "./src/types"]
},
"include": ["src/**/*"],
"exclude": ["node_modules/**/*"]
// e2e tests don't compile and aren't run by us
"exclude": ["node_modules/**/*", "src/faucet.e2e.ts"]
}
9 changes: 7 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8641,7 +8641,7 @@ [email protected]:
uuid "^9.0.0"
yargs "^17.6.2"

typescript-transform-paths@^3.5.1:
typescript-transform-paths@^3.4.6:
version "3.5.1"
resolved "https://registry.yarnpkg.com/typescript-transform-paths/-/typescript-transform-paths-3.5.1.tgz#472a4223ad9463b88fd9ef3dc1ec0616018c4294"
integrity sha512-nq+exuF+38rAby9zrP+S6t0HWuwv69jeFu0I5UwjdoCIDPmnKIAr6a7JfYkbft7h5OzYKEDRhT/jLvvtTvWF4Q==
Expand All @@ -8653,7 +8653,12 @@ [email protected]:
resolved "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz"
integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==

typescript@^5.1.3, typescript@^5.3.2, typescript@^5.5.4:
typescript@^4.9.3:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

typescript@^5.3.2, typescript@^5.5.4:
version "5.6.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz"
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==
Expand Down

0 comments on commit a1c9b77

Please sign in to comment.