@actions/core
Advanced tools
Comparing version 1.8.2 to 1.9.0
@@ -195,1 +195,5 @@ /** | ||
export { markdownSummary } from './summary'; | ||
/** | ||
* Path exports | ||
*/ | ||
export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils'; |
@@ -322,2 +322,9 @@ "use strict"; | ||
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } }); | ||
/** | ||
* Path exports | ||
*/ | ||
var path_utils_1 = require("./path-utils"); | ||
Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } }); | ||
Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } }); | ||
Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }); | ||
//# sourceMappingURL=core.js.map |
{ | ||
"name": "@actions/core", | ||
"version": "1.8.2", | ||
"version": "1.9.0", | ||
"description": "Actions core lib", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -312,2 +312,25 @@ # `@actions/core` | ||
main: 'dist/index.js' | ||
``` | ||
``` | ||
#### Filesystem path helpers | ||
You can use these methods to manipulate file paths across operating systems. | ||
The `toPosixPath` function converts input paths to Posix-style (Linux) paths. | ||
The `toWin32Path` function converts input paths to Windows-style paths. These | ||
functions work independently of the underlying runner operating system. | ||
```js | ||
toPosixPath('\\foo\\bar') // => /foo/bar | ||
toWin32Path('/foo/bar') // => \foo\bar | ||
``` | ||
The `toPlatformPath` function converts input paths to the expected value on the runner's operating system. | ||
```js | ||
// On a Windows runner. | ||
toPlatformPath('/foo/bar') // => \foo\bar | ||
// On a Linux runner. | ||
toPlatformPath('\\foo\\bar') // => /foo/bar | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75796
24
1377
336