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

chore(import-export): remove production dependency on temp COMPASS-7975 #5826

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

mcasimir
Copy link
Contributor

Description

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

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();
Copy link
Contributor

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');
Copy link
Contributor

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?

Copy link
Contributor Author

@mcasimir mcasimir Jun 5, 2024

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",
Copy link
Contributor

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.

@mcasimir mcasimir changed the title chore(import-export): remove production dependency on temp chore(import-export): remove production dependency on temp COMPASS-7975 Jun 5, 2024
@mcasimir mcasimir merged commit 1a91160 into main Jun 5, 2024
14 of 16 checks passed
@mcasimir mcasimir deleted the dont-use-temp-outside-tests branch June 5, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants