-
Notifications
You must be signed in to change notification settings - Fork 258
chore(NODE-5277): add definition clean up script #576
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
Conversation
const emptyDirectories = Array.from(walk(libPath)) | ||
.filter(filePath => fs.statSync(filePath).isDirectory() && fs.readdirSync(filePath).length === 0); |
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.
Unlike the driver, BSON has only the top-level bundles in lib/
so the lib/parser/
and lib/utils/
directories can be cleaned up.
@@ -0,0 +1,35 @@ | |||
#! /usr/bin/env node |
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.
just curious - any reason we're using a cjs module if we're not using top level await?
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.
A few non binding reasons:
- aligning with the choice made in the driver
- esm and await is slower for scripting tasks like this
- cjs has greater compatibility, it can be a nice-to-have that little scripts like this run fine on node 8 (still a common version on linux package managers) despite the package src having a higher node requirement.
test/node/release.test.ts
Outdated
let tarFileList; | ||
before(function () { | ||
this.timeout(120_000); // npm pack can be slow | ||
expect(fs.existsSync(packFile)).to.equal(false); |
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.
expect(fs.existsSync(packFile)).to.equal(false); | |
expect(fs.existsSync(packFile), 'expected pack file not to exist, but it does').to.equal(false); |
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.
I put the file name in the expectation
one question, one optional change |
Description
What is changing?
What is the motivation for this change?
Clean extraneous files
Double check the following
npm run lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript