Fix action.test.ts to accept windows as a base platform
							parent
							
								
									c63ab9855a
								
							
						
					
					
						commit
						18a1268d20
					
				|  | @ -129307,8 +129307,6 @@ module.exports.MaxBufferError = MaxBufferError; | ||||||
| /***/ 47625: | /***/ 47625: | ||||||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||||||
| 
 | 
 | ||||||
| exports.alphasort = alphasort |  | ||||||
| exports.alphasorti = alphasorti |  | ||||||
| exports.setopts = setopts | exports.setopts = setopts | ||||||
| exports.ownProp = ownProp | exports.ownProp = ownProp | ||||||
| exports.makeAbs = makeAbs | exports.makeAbs = makeAbs | ||||||
|  | @ -129321,17 +129319,14 @@ function ownProp (obj, field) { | ||||||
|   return Object.prototype.hasOwnProperty.call(obj, field) |   return Object.prototype.hasOwnProperty.call(obj, field) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | var fs = __webpack_require__(35747) | ||||||
| var path = __webpack_require__(85622) | var path = __webpack_require__(85622) | ||||||
| var minimatch = __webpack_require__(83973) | var minimatch = __webpack_require__(83973) | ||||||
| var isAbsolute = __webpack_require__(38714) | var isAbsolute = __webpack_require__(38714) | ||||||
| var Minimatch = minimatch.Minimatch | var Minimatch = minimatch.Minimatch | ||||||
| 
 | 
 | ||||||
| function alphasorti (a, b) { |  | ||||||
|   return a.toLowerCase().localeCompare(b.toLowerCase()) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function alphasort (a, b) { | function alphasort (a, b) { | ||||||
|   return a.localeCompare(b) |   return a.localeCompare(b, 'en') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function setupIgnores (self, options) { | function setupIgnores (self, options) { | ||||||
|  | @ -129390,6 +129385,7 @@ function setopts (self, pattern, options) { | ||||||
|   self.stat = !!options.stat |   self.stat = !!options.stat | ||||||
|   self.noprocess = !!options.noprocess |   self.noprocess = !!options.noprocess | ||||||
|   self.absolute = !!options.absolute |   self.absolute = !!options.absolute | ||||||
|  |   self.fs = options.fs || fs | ||||||
| 
 | 
 | ||||||
|   self.maxLength = options.maxLength || Infinity |   self.maxLength = options.maxLength || Infinity | ||||||
|   self.cache = options.cache || Object.create(null) |   self.cache = options.cache || Object.create(null) | ||||||
|  | @ -129459,7 +129455,7 @@ function finish (self) { | ||||||
|     all = Object.keys(all) |     all = Object.keys(all) | ||||||
| 
 | 
 | ||||||
|   if (!self.nosort) |   if (!self.nosort) | ||||||
|     all = all.sort(self.nocase ? alphasorti : alphasort) |     all = all.sort(alphasort) | ||||||
| 
 | 
 | ||||||
|   // at *some* point we statted all of these
 |   // at *some* point we statted all of these
 | ||||||
|   if (self.mark) { |   if (self.mark) { | ||||||
|  | @ -129596,7 +129592,6 @@ function childrenIgnored (self, path) { | ||||||
| 
 | 
 | ||||||
| module.exports = glob | module.exports = glob | ||||||
| 
 | 
 | ||||||
| var fs = __webpack_require__(35747) |  | ||||||
| var rp = __webpack_require__(46863) | var rp = __webpack_require__(46863) | ||||||
| var minimatch = __webpack_require__(83973) | var minimatch = __webpack_require__(83973) | ||||||
| var Minimatch = minimatch.Minimatch | var Minimatch = minimatch.Minimatch | ||||||
|  | @ -129607,8 +129602,6 @@ var assert = __webpack_require__(42357) | ||||||
| var isAbsolute = __webpack_require__(38714) | var isAbsolute = __webpack_require__(38714) | ||||||
| var globSync = __webpack_require__(29010) | var globSync = __webpack_require__(29010) | ||||||
| var common = __webpack_require__(47625) | var common = __webpack_require__(47625) | ||||||
| var alphasort = common.alphasort |  | ||||||
| var alphasorti = common.alphasorti |  | ||||||
| var setopts = common.setopts | var setopts = common.setopts | ||||||
| var ownProp = common.ownProp | var ownProp = common.ownProp | ||||||
| var inflight = __webpack_require__(52492) | var inflight = __webpack_require__(52492) | ||||||
|  | @ -130059,7 +130052,7 @@ Glob.prototype._readdirInGlobStar = function (abs, cb) { | ||||||
|   var lstatcb = inflight(lstatkey, lstatcb_) |   var lstatcb = inflight(lstatkey, lstatcb_) | ||||||
| 
 | 
 | ||||||
|   if (lstatcb) |   if (lstatcb) | ||||||
|     fs.lstat(abs, lstatcb) |     self.fs.lstat(abs, lstatcb) | ||||||
| 
 | 
 | ||||||
|   function lstatcb_ (er, lstat) { |   function lstatcb_ (er, lstat) { | ||||||
|     if (er && er.code === 'ENOENT') |     if (er && er.code === 'ENOENT') | ||||||
|  | @ -130100,7 +130093,7 @@ Glob.prototype._readdir = function (abs, inGlobStar, cb) { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   var self = this |   var self = this | ||||||
|   fs.readdir(abs, readdirCb(this, abs, cb)) |   self.fs.readdir(abs, readdirCb(this, abs, cb)) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function readdirCb (self, abs, cb) { | function readdirCb (self, abs, cb) { | ||||||
|  | @ -130304,13 +130297,13 @@ Glob.prototype._stat = function (f, cb) { | ||||||
|   var self = this |   var self = this | ||||||
|   var statcb = inflight('stat\0' + abs, lstatcb_) |   var statcb = inflight('stat\0' + abs, lstatcb_) | ||||||
|   if (statcb) |   if (statcb) | ||||||
|     fs.lstat(abs, statcb) |     self.fs.lstat(abs, statcb) | ||||||
| 
 | 
 | ||||||
|   function lstatcb_ (er, lstat) { |   function lstatcb_ (er, lstat) { | ||||||
|     if (lstat && lstat.isSymbolicLink()) { |     if (lstat && lstat.isSymbolicLink()) { | ||||||
|       // If it's a symlink, then treat it as the target, unless
 |       // If it's a symlink, then treat it as the target, unless
 | ||||||
|       // the target does not exist, then treat it as a file.
 |       // the target does not exist, then treat it as a file.
 | ||||||
|       return fs.stat(abs, function (er, stat) { |       return self.fs.stat(abs, function (er, stat) { | ||||||
|         if (er) |         if (er) | ||||||
|           self._stat2(f, abs, null, lstat, cb) |           self._stat2(f, abs, null, lstat, cb) | ||||||
|         else |         else | ||||||
|  | @ -130354,7 +130347,6 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { | ||||||
| module.exports = globSync | module.exports = globSync | ||||||
| globSync.GlobSync = GlobSync | globSync.GlobSync = GlobSync | ||||||
| 
 | 
 | ||||||
| var fs = __webpack_require__(35747) |  | ||||||
| var rp = __webpack_require__(46863) | var rp = __webpack_require__(46863) | ||||||
| var minimatch = __webpack_require__(83973) | var minimatch = __webpack_require__(83973) | ||||||
| var Minimatch = minimatch.Minimatch | var Minimatch = minimatch.Minimatch | ||||||
|  | @ -130364,8 +130356,6 @@ var path = __webpack_require__(85622) | ||||||
| var assert = __webpack_require__(42357) | var assert = __webpack_require__(42357) | ||||||
| var isAbsolute = __webpack_require__(38714) | var isAbsolute = __webpack_require__(38714) | ||||||
| var common = __webpack_require__(47625) | var common = __webpack_require__(47625) | ||||||
| var alphasort = common.alphasort |  | ||||||
| var alphasorti = common.alphasorti |  | ||||||
| var setopts = common.setopts | var setopts = common.setopts | ||||||
| var ownProp = common.ownProp | var ownProp = common.ownProp | ||||||
| var childrenIgnored = common.childrenIgnored | var childrenIgnored = common.childrenIgnored | ||||||
|  | @ -130601,7 +130591,7 @@ GlobSync.prototype._readdirInGlobStar = function (abs) { | ||||||
|   var lstat |   var lstat | ||||||
|   var stat |   var stat | ||||||
|   try { |   try { | ||||||
|     lstat = fs.lstatSync(abs) |     lstat = this.fs.lstatSync(abs) | ||||||
|   } catch (er) { |   } catch (er) { | ||||||
|     if (er.code === 'ENOENT') { |     if (er.code === 'ENOENT') { | ||||||
|       // lstat failed, doesn't exist
 |       // lstat failed, doesn't exist
 | ||||||
|  | @ -130638,7 +130628,7 @@ GlobSync.prototype._readdir = function (abs, inGlobStar) { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   try { |   try { | ||||||
|     return this._readdirEntries(abs, fs.readdirSync(abs)) |     return this._readdirEntries(abs, this.fs.readdirSync(abs)) | ||||||
|   } catch (er) { |   } catch (er) { | ||||||
|     this._readdirError(abs, er) |     this._readdirError(abs, er) | ||||||
|     return null |     return null | ||||||
|  | @ -130797,7 +130787,7 @@ GlobSync.prototype._stat = function (f) { | ||||||
|   if (!stat) { |   if (!stat) { | ||||||
|     var lstat |     var lstat | ||||||
|     try { |     try { | ||||||
|       lstat = fs.lstatSync(abs) |       lstat = this.fs.lstatSync(abs) | ||||||
|     } catch (er) { |     } catch (er) { | ||||||
|       if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { |       if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { | ||||||
|         this.statCache[abs] = false |         this.statCache[abs] = false | ||||||
|  | @ -130807,7 +130797,7 @@ GlobSync.prototype._stat = function (f) { | ||||||
| 
 | 
 | ||||||
|     if (lstat && lstat.isSymbolicLink()) { |     if (lstat && lstat.isSymbolicLink()) { | ||||||
|       try { |       try { | ||||||
|         stat = fs.statSync(abs) |         stat = this.fs.statSync(abs) | ||||||
|       } catch (er) { |       } catch (er) { | ||||||
|         stat = lstat |         stat = lstat | ||||||
|       } |       } | ||||||
|  | @ -171654,7 +171644,24 @@ function execSync(cmd, opts, pipe) { | ||||||
|     stderrFile: stderrFile, |     stderrFile: stderrFile, | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   fs.writeFileSync(paramsFile, JSON.stringify(paramsToSerialize), 'utf8'); |   // Create the files and ensure these are locked down (for read and write) to
 | ||||||
|  |   // the current user. The main concerns here are:
 | ||||||
|  |   //
 | ||||||
|  |   // * If we execute a command which prints sensitive output, then
 | ||||||
|  |   //   stdoutFile/stderrFile must not be readable by other users.
 | ||||||
|  |   // * paramsFile must not be readable by other users, or else they can read it
 | ||||||
|  |   //   to figure out the path for stdoutFile/stderrFile and create these first
 | ||||||
|  |   //   (locked down to their own access), which will crash exec() when it tries
 | ||||||
|  |   //   to write to the files.
 | ||||||
|  |   function writeFileLockedDown(filePath, data) { | ||||||
|  |     fs.writeFileSync(filePath, data, { | ||||||
|  |       encoding: 'utf8', | ||||||
|  |       mode: parseInt('600', 8), | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  |   writeFileLockedDown(stdoutFile, ''); | ||||||
|  |   writeFileLockedDown(stderrFile, ''); | ||||||
|  |   writeFileLockedDown(paramsFile, JSON.stringify(paramsToSerialize)); | ||||||
| 
 | 
 | ||||||
|   var execArgs = [ |   var execArgs = [ | ||||||
|     __webpack_require__.ab + "exec-child.js", |     __webpack_require__.ab + "exec-child.js", | ||||||
|  | @ -171697,6 +171704,7 @@ function execSync(cmd, opts, pipe) { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // No biggie if we can't erase the files now -- they're in a temp dir anyway
 |   // No biggie if we can't erase the files now -- they're in a temp dir anyway
 | ||||||
|  |   // and we locked down permissions (see the note above).
 | ||||||
|   try { common.unlinkSync(paramsFile); } catch (e) {} |   try { common.unlinkSync(paramsFile); } catch (e) {} | ||||||
|   try { common.unlinkSync(stderrFile); } catch (e) {} |   try { common.unlinkSync(stderrFile); } catch (e) {} | ||||||
|   try { common.unlinkSync(stdoutFile); } catch (e) {} |   try { common.unlinkSync(stdoutFile); } catch (e) {} | ||||||
|  | @ -197280,7 +197288,7 @@ let fillPool = bytes => { | ||||||
|   poolOffset += bytes |   poolOffset += bytes | ||||||
| } | } | ||||||
| let random = bytes => { | let random = bytes => { | ||||||
|   fillPool(bytes) |   fillPool((bytes -= 0)) | ||||||
|   return pool.subarray(poolOffset - bytes, poolOffset) |   return pool.subarray(poolOffset - bytes, poolOffset) | ||||||
| } | } | ||||||
| let customRandom = (alphabet, size, getRandom) => { | let customRandom = (alphabet, size, getRandom) => { | ||||||
|  | @ -197300,7 +197308,7 @@ let customRandom = (alphabet, size, getRandom) => { | ||||||
| } | } | ||||||
| let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random) | let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random) | ||||||
| let nanoid = (size = 21) => { | let nanoid = (size = 21) => { | ||||||
|   fillPool(size) |   fillPool((size -= 0)) | ||||||
|   let id = '' |   let id = '' | ||||||
|   for (let i = poolOffset - size; i < poolOffset; i++) { |   for (let i = poolOffset - size; i < poolOffset; i++) { | ||||||
|     id += urlAlphabet[pool[i] & 63] |     id += urlAlphabet[pool[i] & 63] | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -4,8 +4,8 @@ import Action from './action'; | ||||||
| 
 | 
 | ||||||
| describe('Action', () => { | describe('Action', () => { | ||||||
|   describe('compatibility check', () => { |   describe('compatibility check', () => { | ||||||
|     it('throws for anything other than linux', () => { |     it('throws for anything other than linux or windows', () => { | ||||||
|       if (process.platform !== 'linux') { |       if (process.platform !== 'linux' && process.platform !== 'win32') { | ||||||
|         expect(() => Action.checkCompatibility()).toThrow(); |         expect(() => Action.checkCompatibility()).toThrow(); | ||||||
|       } else { |       } else { | ||||||
|         expect(() => Action.checkCompatibility()).not.toThrow(); |         expect(() => Action.checkCompatibility()).not.toThrow(); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue