Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix yarn run build, Docker build #25

Merged
merged 2 commits into from
Sep 18, 2024
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
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;
Copy link
Author

Choose a reason for hiding this comment

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

tsc whines about this. We don't run e2e tests anyway, they are horribly broken

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": "./",
Copy link
Author

Choose a reason for hiding this comment

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

I put this back to what it was originally just to see if that was part of the problem, and I figured why not leave it

"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