-
Notifications
You must be signed in to change notification settings - Fork 171
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
chore(import-export): remove production dependency on temp COMPASS-7975 #5826
Conversation
import fs from 'fs'; | ||
import path from 'path'; | ||
import Sinon from 'sinon'; | ||
import type { DataService } from 'mongodb-data-service'; | ||
import { connect } from 'mongodb-data-service'; | ||
import AppRegistry from 'hadron-app-registry'; | ||
|
||
temp.track(); |
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.
oof. missed this.
@@ -223,7 +230,7 @@ async function loadEJSONFileAndColumns({ | |||
// while simultaneously determining the unique set of columns in the order | |||
// we'll have to write to the file. | |||
const inputStream = cursor.stream(); | |||
const filename = temp.path({ suffix: '.jsonl' }); | |||
const filename = generateTempFilename('.jsonl'); |
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.
This package depends on temp
already, why not just use that?
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.
it brings 1000 dependencies and has a vulnerability. I really wish the vulnerability task to create jira tickets
@@ -106,6 +105,7 @@ | |||
"react-dom": "^17.0.2", | |||
"sinon": "^9.2.3", | |||
"sinon-chai": "^3.7.0", | |||
"temp": "^0.9.4", |
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.
Makes sense. Should always have been a dev dep.
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes