Don't override fs module, export constants as object#90
Merged
baudehlo merged 3 commits intobaudehlo:masterfrom Nov 7, 2019
ikokostya:dont-override-fs
Merged
Don't override fs module, export constants as object#90baudehlo merged 3 commits intobaudehlo:masterfrom ikokostya:dont-override-fs
baudehlo merged 3 commits intobaudehlo:masterfrom
ikokostya:dont-override-fs
Conversation
ikokostya
commented
Oct 31, 2019
| { | ||
| "name": "fs-ext", | ||
| "version": "1.2.2", | ||
| "version": "1.3.0", |
Collaborator
Author
There was a problem hiding this comment.
I don't touch this file. I think it was synchronized with package.json during execution of npm install command.
Closed
baudehlo
requested changes
Nov 7, 2019
Owner
baudehlo
left a comment
There was a problem hiding this comment.
Looks good, but needs a major version bump (package.json), and something in the README about the change.
Collaborator
Author
OK. Usually maintainer updates version of the package before publishing it to npm repository: npm version major
npm pubishBut I can update version manually in
I think that best place for this is new |
Collaborator
Author
|
@baudehlo Done. |
Owner
|
Thanks - I can't keep up with the way npm keeps changing how things are
done these days - back when I wrote this you had to edit package.json
manually.
…On Thu, Nov 7, 2019 at 2:16 PM ikokostya ***@***.***> wrote:
@baudehlo <https://github.com/baudehlo> Done.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#90?email_source=notifications&email_token=AAFBWY4W3ST2WHLZDEFSLGTQSRSRPA5CNFSM4JHT7T2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDNP7CY#issuecomment-551223179>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFBWYZGA4UWYUYKK5U4FC3QSRSRPANCNFSM4JHT7T2A>
.
|
baudehlo
approved these changes
Nov 7, 2019
Owner
$ npm publish
npm notice
npm notice 📦 fs-ext@2.0.0
npm notice === Tarball Contents ===
npm notice 986B package.json
npm notice 1.6kB .eslintrc
npm notice 404B .travis.yml
npm notice 242B appveyor.yml
npm notice 219B binding.gyp
npm notice 1.3kB example.js
npm notice 17.1kB fs-ext.cc
npm notice 3.4kB fs-ext.js
npm notice 1.0kB LICENSE.txt
npm notice 3.2kB README.md
npm notice 310B run_tests.js
npm notice 316B wscript
npm notice 7.7kB tests/test-fs-fcntl.js
npm notice 5.7kB tests/test-fs-flock_stress.js
npm notice 10.7kB tests/test-fs-flock.js
npm notice 9.1kB tests/test-fs-seek_stress.js
npm notice 14.8kB tests/test-fs-seek.js
npm notice 267B tests/test-fs-statvfs.js
npm notice === Tarball Details ===
npm notice name: fs-ext
npm notice version: 2.0.0
npm notice package size: 14.6 kB
npm notice unpacked size: 78.4 kB
npm notice shasum: e58168fcc37506a9358e0928f4aae60912af7caa
npm notice integrity: sha512-aK8NlpSO5LUdS[...]u1aGS8deJwzBQ==
npm notice total files: 18
npm notice
+ fs-ext@2.0.0 |
Owner
|
Thanks for this! Real nice change. |
Collaborator
Author
|
Thanks for review! |
Owner
|
I've also added you as a collaborator to the project.
…On Thu, Nov 7, 2019 at 4:27 PM ikokostya ***@***.***> wrote:
Thanks for review!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#90?email_source=notifications&email_token=AAFBWYZOSPBROXDXFBKBAJ3QSSB4DA5CNFSM4JHT7T2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDN36XY#issuecomment-551272287>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFBWY4S3MCK2ILGF2MQ3W3QSSB4DANCNFSM4JHT7T2A>
.
|
9 tasks
sheetalkamat
pushed a commit
to DefinitelyTyped/DefinitelyTyped
that referenced
this pull request
Nov 19, 2019
* [fs-ext] Update definition to v2 * Remove definitions for utime(), utimeSync(). * Add constants definition. * Add new values of `cmd` parameter to fcntl(), fcntlSync(). * Add overrides for more accurate types of `flags` parameter in flock(), flockSync(). * Add overrides for more accurate types of `cmd` parameter in fcntl(), fcntlSync(). * Add statVFS() defintion. * Rewrite tests. Refs baudehlo/node-fs-ext#90 * Use NodeJS.ErrnoException instead of Error See https://github.com/baudehlo/node-fs-ext/blob/3125353321c30bd35fc38e40ce76ffe3872e215b/fs-ext.cc#L366
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes override of
fsandconstantscore Node.js modules. Instead all functions and constants should be imported explicitly:In C++ binding all constants are placed to
constantsobject instead oftargetobject, e.g. on my machine:This helps to export constants on JavaScript side without pattern matching:
node-fs-ext/fs-ext.js
Line 142 in 42b8713
Other changes
fsExtmodule in tests insteadbindingdirectly.README.mdto use modern JavaScript (destructuring, arrow functions), because minimum supported version isNode.js 8.Please note that it's breaking change. Therefore, major version should be updated.
Fixes #89
Fixes #81