Conversation
Unpin upon merge and republication of 0xProject/quote-server#5
CHANGELOG.json
Outdated
| @@ -0,0 +1,20 @@ | |||
| [ | |||
| { | |||
| "version": "0.1.0", | |||
There was a problem hiding this comment.
sup w/ these duplicate entries?
steveklebanoff
left a comment
There was a problem hiding this comment.
Two minor comments but otherwise LGTM -- nice work
| "prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc", | ||
| "tslint": "tslint --format stylish --project .", | ||
| "tslint:fix": "yarn tslint --fix", | ||
| "prettier": "prettier '**/*.{ts,tsx,json,md}' --config .prettierrc", |
There was a problem hiding this comment.
I know we've had this convo before, but I personally would like to keep our script patterns the same as the monorepo.
If you feel strongly about grouping prettier & tslint into one "lint" command I see your point, but I do think it is a bit strange to have different patterns between this repo & the monorepo
There was a problem hiding this comment.
I appreciate your effort to keep us consistent. FYI I'm on a crusade to do this everywhere now. Every time I work in a monorepo package I'm updating it to include prettier in lint. Though, so far I've only done it to asset-swapper and migrations :)
I forgot to update the version number and changes in a recent commit.
CHANGELOG.json
Outdated
| @@ -0,0 +1,29 @@ | |||
| [ | |||
There was a problem hiding this comment.
Does this CHANGELOG.json actually do anything? I was expecting a publish entry in scripts to investigate, but I don't see one 🤔
There was a problem hiding this comment.
Nope, it's just me keeping a manual record. Having it actually do something would be great, but I figured doing things manually would be better than doing nothing at all.
steveklebanoff
left a comment
There was a problem hiding this comment.
I'm curious about CHANGELOG.json and the absence of a publish script but LGTM regardless
21May12:46:46 [2 jobs] ~/dev/quote-server[feat/rename-indicative-quote-params>]$ git log -1
commit 6f94cfd1b9f8f50fdb61ead4f498f567dd268b8e
Author: F. Eugene Aumson <feuGeneA@users.noreply.github.com>
Date: Thu May 21 12:45:31 2020 -0400
Migrate CHANGELOG from .json to .md
21May12:46:47 [2 jobs] ~/dev/quote-server[feat/rename-indicative-quote-params>]$ git status
On branch feat/rename-indicative-quote-params
Your branch is ahead of 'origin/feat/rename-indicative-quote-params' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
21May12:46:53 [2 jobs] ~/dev/quote-server[feat/rename-indicative-quote-params>]$ yarn lint
yarn run v1.19.1
$ run-p tslint prettier:lint
$ tslint --format stylish --project .
$ yarn prettier --list-different
$ prettier '**/*.{ts,tsx,json,md}' --config .prettierrc --list-different
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
Done in 3.12s.
That is, from devDependencies to regular dependencies.
This is needed because we export an interface (serverRoutes()) that
depends on those types. Without this change, the monorepo's
`test-publish`, running with an asset-swapper modified to depend on this
package, gave:
node_modules/@0x/quote-server/lib/src/router.d.ts:2:70 - error TS2307: Cannot find module 'express-serve-static-core'.
2 export declare const serverRoutes: (quoteStrategy: Quoter) => import("express-serve-static-core").Router;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
("express-serve-static-core" is a direct dependency of @types/express.)
81f968d to
ccf3819
Compare
Clean test run:
28May18:01:47 [2 jobs] ~/dev/quote-server[feat/rename-indicative-quote-params>]$ git status
On branch feat/rename-indicative-quote-params
Your branch is ahead of 'origin/feat/rename-indicative-quote-params' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
28May18:01:49 [2 jobs] ~/dev/quote-server[feat/rename-indicative-quote-params>]$ git log -1
commit 6bce4da342c3369c67e990d583b2add8a04a9978
Author: F. Eugene Aumson <feuGeneA@users.noreply.github.com>
Date: Wed May 27 18:33:18 2020 -0400
Add distinctive types for RFQM requests
28May18:01:53 [2 jobs] ~/dev/quote-server[feat/rename-indicative-quote-params>]$ btl
yarn run v1.19.1
$ tsc -b
Done in 0.35s.
yarn run v1.19.1
$ NODE_ENV=test mocha --require source-map-support/register --require make-promises-safe ./lib/test/**/**/*_test.js --exit
api key handler
✓ reject when canMakerControlSettlement == false & no API key specified
✓ accept when canMakerControlSettlement == false & API Key specified
✓ accept when canMakerControlSettlement == true & no API Key specified
✓ accept when canMakerControlSettlement == true & API Key specified
taker request handler
✓ should defer to quoter and return response for firm quote (41ms)
✓ should succeed without an API key if `canMakerControlSettlement` is set to `true` when requesting a firm quote
✓ should defer to quoter and return response for indicative quote
✓ should handle empty indicative quote
✓ should handle empty firm quote
✓ should invalidate a bad request
submit request handler
✓ should defer to quoter and return response for submit request
✓ should succeed without an API key when submitting a fill
✓ should invalidate a bad request
✓ should handle empty indicative quote
14 passing (166ms)
Done in 0.77s.
yarn run v1.19.1
$ run-p tslint prettier:lint
$ yarn prettier --list-different
$ tslint --format stylish --project .
$ prettier '**/*.{ts,tsx,json,md}' --config .prettierrc --list-different
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
Done in 4.35s.
ccf3819 to
37f5d6c
Compare
| quoteExpiry: number; | ||
| } | ||
|
|
||
| export type FirmQuote = RFQTFirmQuote | RFQMFirmQuote; |
In lieu of CI, a log of a test run on the latest commit: