-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove polyfills which are out of range of our engines (#35)
The polyfills removed are: - file-url-to-path.js - mkdir.js
- Loading branch information
1 parent
957d1ac
commit be1e7b2
Showing
13 changed files
with
29 additions
and
560 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
const fs = require('./fs.js') | ||
const getOptions = require('./common/get-options.js') | ||
const withOwner = require('./with-owner.js') | ||
|
||
// extends mkdir with the ability to specify an owner of the new dir | ||
const mkdir = async (path, opts) => { | ||
const options = getOptions(opts, { | ||
copy: ['mode', 'recursive'], | ||
wrap: 'mode', | ||
}) | ||
|
||
return withOwner( | ||
path, | ||
() => fs.mkdir(path, options), | ||
opts | ||
) | ||
} | ||
|
||
module.exports = mkdir |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
7 changes: 3 additions & 4 deletions
7
test/common/file-url-to-path/index.js → test/common/file-url-to-path.js
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,11 +1,10 @@ | ||
const t = require('tap') | ||
|
||
const fileURLToPath = require('../../../lib/common/file-url-to-path/index.js') | ||
const url = require('url') | ||
|
||
t.test('can convert a file url to a path', async (t) => { | ||
const url = process.platform === 'win32' | ||
const u = process.platform === 'win32' | ||
? 'file://c:/some/path' // windows requires an absolute path, or hostname | ||
: 'file:///some/path' // posix cannot have a hostname | ||
const path = fileURLToPath(url) | ||
const path = url.fileURLToPath(u) | ||
t.type(path, 'string', 'result is a string') | ||
}) |
Oops, something went wrong.