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

Removed insecure dependency . #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion dynamodb/starter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var starter = {
preArgs.push(`-Xms${options.heapInitial}`);
}
if (options.heapMax) {
preArgs.push(`-Xmx${options.heapMax}`)
preArgs.push(`-Xmx${options.heapMax}`);
}
if (options.dbPath) {
additionalArgs.push('-dbPath', options.dbPath);
Expand Down
6 changes: 3 additions & 3 deletions dynamodb/utils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

var path = require('path'),
rmdir = require('rmdir'),
fs = require('fs');
fs = require('fs'),
exec = require('child_process').exec;

var absPath = function (p) {
if (path.isAbsolute(p)) {
Expand All @@ -14,7 +14,7 @@ var absPath = function (p) {

var removeDir = function (relPath, callback) {
var path = absPath(relPath);
rmdir(path, callback);
exec('rm -r ' + path, callback);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wanted to check if this will work in Windows.

Copy link
Author

Choose a reason for hiding this comment

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

@rehrumesh thanks for this question. It almost certainly does not work on Windows and I have no way to test it anyways. Do you have any ideas for how to address this?

Choose a reason for hiding this comment

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

Take a look at this gist I found today: https://gist.github.com/laazebislam/845e61a18541255c0a29eeeb4e0141f4
It looks like it would work and remove a dependency.

Choose a reason for hiding this comment

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

How about using rimraf?

Copy link

@markcarroll markcarroll Apr 3, 2019

Choose a reason for hiding this comment

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

PR #40 has done just that. Can the maintainer please close this one and approve #40?

};

var createDir = function (relPath) {
Expand Down
145 changes: 145 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@
"url": "https://github.com/99xt/dynamodb-localhost"
},
"keywords": [
"aws",
"dynamodb",
"dynamo",
"testing",
"development",
"tool",
"local",
"localhost",
"local-dynamodb",
"dynamodb-local",
"dynamodb-localhost"
],
"aws",
"dynamodb",
"dynamo",
"testing",
"development",
"tool",
"local",
"localhost",
"local-dynamodb",
"dynamodb-local",
"dynamodb-localhost"
],
"main": "index.js",
"bin": {},
"dependencies": {
"mkdirp": "^0.5.0",
"progress": "^1.1.8",
"rmdir": "^1.2.0",
"tar": "^2.0.0"
}
}