-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further fixes and refactors for 1.4.0 (#63)
* headers integration testing * better encapsulation on the core classes * updated non-astra example to use updateDbNamespace * reinstated example deps to npm versions * overhauled how tests run * added some missing typescript lang specifiers in tsdoc examples * throw error on missing namespace * more work on test overhaul * tiny bit of tweaking to the test script * commented test script a bit * version script + increase a tests timeout * a * change default test timeout to 1m * use export type where possible * tiny tweak to build script * update to build pipeline to delete "empty" files * fixed bug with datapidbadmin * fixed a couple documentation errors * reverted example deps to npm versions * added exit to if invalid flag passed to test script * better help/error msg for test script * updated vectorize tests to work with non-astra * updated vectorize tests to work with bedrock * linting fix * added missing export
- Loading branch information
Showing
66 changed files
with
455 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"testScript": "test:prerelease" | ||
"testScript": "test -- --prerelease" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const targetContent = `"use strict"; | ||
// Copyright Datastax, Inc | ||
// SPDX-License-Identifier: Apache-2.0 | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
`; | ||
|
||
function deleteEmptyFiles(dirPath) { | ||
fs.readdir(dirPath, (err, files) => { | ||
if (err) { | ||
return console.error('Unable to scan directory: ' + err); | ||
} | ||
|
||
files.forEach(file => { | ||
const filePath = path.join(dirPath, file); | ||
|
||
fs.stat(filePath, (err, stat) => { | ||
if (err) { | ||
return console.error('Error stating file: ' + err); | ||
} | ||
|
||
if (stat.isDirectory()) { | ||
deleteEmptyFiles(filePath); | ||
return; | ||
} | ||
|
||
fs.readFile(filePath, 'utf8', (err, data) => { | ||
if (err) { | ||
return console.error('Error reading file: ' + err); | ||
} | ||
|
||
if (data === targetContent) { | ||
fs.unlink(filePath, (err) => err && console.error('Error deleting file: ' + err)); | ||
} | ||
}); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
deleteEmptyFiles('./dist'); |
Oops, something went wrong.