-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: allow using streetmerchant as a library #2038
Changes from 3 commits
5cb95b4
bc770ec
a2f145e
606c9ed
9449481
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"name": "streetmerchant", | ||
"version": "3.4.1", | ||
"description": "The world's easiest, most powerful stock checker", | ||
"main": "src/index.ts", | ||
"scripts": { | ||
|
@@ -17,7 +18,7 @@ | |
"test:notification:production": "node build/test/functional/test-notification.js" | ||
}, | ||
"engines": { | ||
"node": ">=12.0.0 <15.0.0" | ||
"node": ">=12.0.0 <15.11.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand that there could be good reasons for keeping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was keep it below 15 only because some folks were having problems with |
||
}, | ||
"repository": { | ||
"type": "git", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import chalk from 'chalk'; | ||
import {readFileSync} from 'fs'; | ||
import path from 'path'; | ||
|
||
const version = readFileSync('version.txt', 'utf8'); | ||
const version = readFileSync(path.join(__dirname, '../../version.txt'), 'utf8'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would really like to get this change in if possible. I'm not terribly familiar with the typescript compiler nor the node runner, but when I run it from my other project, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting... Yeah I'm getting the version running as is, but if you're running within Docker, this could be an issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it was looking in the path of the project that wraps it. |
||
|
||
export const banner = { | ||
asciiVersion: ` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a version number here will increase the maintenance burden because it requires updating versions in two places. I can change
banner.ts
to use this number if that's preferable.The changes in this file aren't strictly necessary as it's easy to make them myself and then tell
git
to make themassume-unchanged
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we make this change, I'd like to update the pipeline to manage this for us. This is easy enough, but just needs an update.