Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

guy

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

guy - npm Package Compare versions

Comparing version 11.8.0 to 11.9.0

lib/temp.js

5

lib/main.js

@@ -56,2 +56,7 @@ (function() {

});
props.def_oneoff(this, 'temp', {
enumerable: true
}, function() {
return require('./temp');
});
return void 0;

@@ -58,0 +63,0 @@ }

8

package.json
{
"name": "guy",
"version": "11.8.0",
"version": "11.9.0",
"description": "npm dependencies checker",

@@ -27,3 +27,4 @@ "main": "lib/main.js",

"acorn-walk": "^8.2.0",
"astring": "^1.8.3"
"astring": "^1.8.3",
"temp": "^0.9.4"
},

@@ -34,3 +35,4 @@ "peerDependencies": {

"acorn-walk": "^8.2.0",
"astring": "^1.8.3"
"astring": "^1.8.3",
"temp": "^0.9.4"
},

@@ -37,0 +39,0 @@ "scripts": {

@@ -506,3 +506,52 @@

#### `GUY.temp`
`GUY.temp` provides context handlers to work with temporary files and directories. It is built on top of
[`temp`](https://github.com/bruce/node-temp).
`GUY.temp.with_file: ( cfg, handler ) ->`
`GUY.temp.with_directory: ( cfg, handler ) ->`
```coffee
#-----------------------------------------------------------------------------------------------------------
@GUY_temp_context_handler_file = ( T, done ) ->
GUY = require '../../../apps/guy'
#.........................................................................................................
do =>
path = null
info = GUY.temp.with_file ({ path: mypath, fd, }) ->
path = mypath
T?.ok isa.fs_file mypath
T?.eq info, { files: 1, dirs: 0, }
T?.ok not isa.fs_file path
#.........................................................................................................
return done?()
#-----------------------------------------------------------------------------------------------------------
@GUY_temp_context_handler_directory = ( T, done ) ->
GUY = require '../../../apps/guy'
#.........................................................................................................
do =>
path = null
info = GUY.temp.with_directory ({ path: mypath, }) ->
path = mypath
debug '^34534^', { path, }
T?.ok isa.fs_directory mypath
T?.eq info, { files: 0, dirs: 1, }
T?.ok not isa.fs_directory path
#.........................................................................................................
do =>
path = null
info = GUY.temp.with_directory { prefix: 'whatever-', }, ({ path: mypath, }) ->
path = mypath
debug '^34534^', { path, }
T?.ok ( PATH.basename mypath ).startsWith 'whatever-'
T?.ok isa.fs_directory mypath
T?.eq info, { files: 0, dirs: 1, }
T?.ok not isa.fs_directory path
#.........................................................................................................
return done?()
```
## To Do

@@ -653,2 +702,4 @@

* **[–]** integrate pinned package versions helper, cf `( require 'mixa/lib/check-package-versions' )
require '../pinned-package-versions.json'`

@@ -655,0 +706,0 @@ ## Is Done

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc