pax_global_header00006660000000000000000000000064134257116070014520gustar00rootroot0000000000000052 comment=fc9adecc6a81cee54e23f9dbea495755f51b2afa ensure-posix-path-1.1.1/000077500000000000000000000000001342571160700151135ustar00rootroot00000000000000ensure-posix-path-1.1.1/.gitignore000066400000000000000000000000221342571160700170750ustar00rootroot00000000000000**/*.js **/*.d.ts ensure-posix-path-1.1.1/.travis.yml000066400000000000000000000004251342571160700172250ustar00rootroot00000000000000sudo: false language: node_js node_js: - "0.12" - "iojs" - "4.2" - "6" - "8" - "10" - "11" os: - linux script: npm test before_install: - npm config set spin false install: - node --version - npm --version - git --version - npm install --no-optional ensure-posix-path-1.1.1/README.md000066400000000000000000000004541342571160700163750ustar00rootroot00000000000000# ensure-posix-path [![Build Status](https://travis-ci.org/stefanpenner/ensure-posix-path.svg)](https://travis-ci.org/stefanpenner/ensure-posix-path) [![Build status](https://ci.appveyor.com/api/projects/status/bt015k54b2ohk1oi?svg=true)](https://ci.appveyor.com/project/embercli/ensure-posix-path) ensure-posix-path-1.1.1/appveyor.yml000066400000000000000000000013341342571160700175040ustar00rootroot00000000000000# http://www.appveyor.com/docs/appveyor-yml # Fix line endings in Windows. (runs before repo cloning) init: - git config --global core.autocrlf true # Test against these versions of Node.js. environment: matrix: - nodejs_version: "0.12" - nodejs_version: "4.2" - nodejs_version: "5.0" # Install scripts. (runs after repo cloning) install: - git rev-parse HEAD # Typical npm stuff. - md C:\nc - npm config set cache C:\nc - npm version - npm install --no-optional # Post-install test scripts. test_script: # Output useful info for debugging. - npm version - cmd: npm run test # Don't actually build. build: off # Set build version format here instead of in the admin panel. version: "{build}" ensure-posix-path-1.1.1/index.ts000066400000000000000000000002661342571160700165760ustar00rootroot00000000000000import path = require('path'); export = function ensurePosix(filepath: string) { if (path.sep !== '/') { return filepath.split(path.sep).join('/'); } return filepath; }; ensure-posix-path-1.1.1/node.d.ts000066400000000000000000000003541342571160700166340ustar00rootroot00000000000000declare module 'path-win32' { let sep: string; export function join(x: string, y: string, z: string) : string; } declare module 'path-posix' { let sep: string; export function join(x: string, y: string, z: string) : string; } ensure-posix-path-1.1.1/package.json000066400000000000000000000015561342571160700174100ustar00rootroot00000000000000{ "name": "ensure-posix-path", "version": "1.1.1", "description": "", "main": "index.js", "scripts": { "build": "tsc -b .", "test": "tsc -b . && mocha test", "test:debug": "tsc -b . && mocha debug test" }, "files": [ "index.js", "index.d.ts" ], "repository": { "type": "git", "url": "git+https://github.com/stefanpenner/ensure-posix-path.git" }, "author": "Stefan Penner ", "license": "ISC", "bugs": { "url": "https://github.com/stefanpenner/ensure-posix-path/issues" }, "homepage": "https://github.com/stefanpenner/ensure-posix-path#readme", "devDependencies": { "@types/chai": "^4.1.7", "@types/mocha": "^5.2.5", "@types/node": "^10.12.21", "chai": "^3.4.1", "mocha": "^2.3.4", "path-posix": "^1.0.0", "path-win32": "^1.0.1", "typescript": "~3.3.1" } } ensure-posix-path-1.1.1/test.ts000066400000000000000000000030401342571160700164370ustar00rootroot00000000000000import ensurePosix = require('./'); import path = require('path'); import chai = require('chai'); import path32 = require('path-win32'); import pathPosix = require('path-posix'); const { expect } = chai; describe('ensurePosixPath', function() { describe('in win32', function() { let old: string; before(function() { old = path.sep; (path as any).sep = path32.sep; }); after(function() { (path as any).sep = old; }); it('leaves posix paths untouched', function() { expect(ensurePosix('/foo/bar/baz')).to.eql('/foo/bar/baz'); }); it('converts win32 paths to posix', function() { expect(ensurePosix(path32.join('foo', 'bar', 'baz'))).to.eql('foo/bar/baz'); }); it('converts win32 & posix mixed paths to posix', function() { expect(ensurePosix(pathPosix.join(path32.join('foo', 'bar', 'baz'), 'apple', 'pie'))).to.eql('foo/bar/baz/apple/pie'); }); }); describe('unknown sep', function() { var old: string; before(function() { old = path.sep; (path as any).sep = '☃'; }); after(function() { (path as any).sep = old; }); it('leaves posix paths untouched', function() { expect(ensurePosix('/foo/bar/baz')).to.eql('/foo/bar/baz'); }); it('converts win32 paths to posix', function() { expect(ensurePosix("☃foo☃bar☃baz")).to.eql('/foo/bar/baz'); }); it('converts mixed win32 & posix paths to posix', function() { expect(ensurePosix('☃foo/bar☃baz')).to.eql('/foo/bar/baz'); }); }) }); ensure-posix-path-1.1.1/tsconfig.json000066400000000000000000000002321342571160700176170ustar00rootroot00000000000000{ "compilerOptions": { "declaration": true, "strict": true, "moduleResolution": "node", "module": "commonjs", "target": "es5" } } ensure-posix-path-1.1.1/yarn.lock000066400000000000000000000153321342571160700167420ustar00rootroot00000000000000# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@types/chai@^4.1.7": version "4.1.7" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.7.tgz#1b8e33b61a8c09cbe1f85133071baa0dbf9fa71a" integrity sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA== "@types/mocha@^5.2.5": version "5.2.5" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073" integrity sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww== "@types/node@^10.12.21": version "10.12.21" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e" integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ== assertion-error@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== chai@^3.4.1: version "3.5.0" resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" integrity sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc= dependencies: assertion-error "^1.0.1" deep-eql "^0.1.3" type-detect "^1.0.0" commander@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" integrity sha1-+mihT2qUXVTbvlDYzbMyDp47GgY= commander@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" integrity sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM= debug@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" integrity sha1-+HBX6ZWxofauaklgZkE3vFbwOdo= dependencies: ms "0.7.1" deep-eql@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" integrity sha1-71WKyrjeJSBs1xOQbXTlaTDrafI= dependencies: type-detect "0.1.1" diff@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" integrity sha1-fyjS657nsVqX79ic5j3P2qPMur8= escape-string-regexp@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" integrity sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE= glob@3.2.11: version "3.2.11" resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" integrity sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0= dependencies: inherits "2" minimatch "0.3" growl@1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" integrity sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8= inherits@2: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= jade@0.26.3: version "0.26.3" resolved "https://registry.yarnpkg.com/jade/-/jade-0.26.3.tgz#8f10d7977d8d79f2f6ff862a81b0513ccb25686c" integrity sha1-jxDXl32NefL2/4YqgbBRPMslaGw= dependencies: commander "0.6.1" mkdirp "0.3.0" lru-cache@2: version "2.7.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" integrity sha1-bUUk6LlV+V1PW1iFHOId1y+06VI= minimatch@0.3: version "0.3.0" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" integrity sha1-J12O2qxPG7MyZHIInnlJyDlGmd0= dependencies: lru-cache "2" sigmund "~1.0.0" minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= mkdirp@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" integrity sha1-G79asbqCevI1dRQ0kEJkVfSB/h4= mkdirp@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" mocha@^2.3.4: version "2.5.3" resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58" integrity sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg= dependencies: commander "2.3.0" debug "2.2.0" diff "1.4.0" escape-string-regexp "1.0.2" glob "3.2.11" growl "1.9.2" jade "0.26.3" mkdirp "0.5.1" supports-color "1.2.0" to-iso-string "0.0.2" ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" integrity sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg= path-posix@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f" integrity sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8= path-win32@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-win32/-/path-win32-1.0.1.tgz#a41985837937f0603025c04914031ce29cb42f3a" integrity sha1-pBmFg3k38GAwJcBJFAMc4py0Lzo= sigmund@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= supports-color@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" integrity sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4= to-iso-string@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1" integrity sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE= type-detect@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" integrity sha1-C6XsKohWQORw6k6FBZcZANrFiCI= type-detect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" integrity sha1-diIXzAbbJY7EiQihKY6LlRIejqI= typescript@~3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.1.tgz#6de14e1db4b8a006ac535e482c8ba018c55f750b" integrity sha512-cTmIDFW7O0IHbn1DPYjkiebHxwtCMU+eTy30ZtJNBPF9j2O1ITu5XH2YnBeVRKWHqF+3JQwWJv0Q0aUgX8W7IA==