mirror of
https://github.com/github/codeql-action
synced 2026-05-25 15:00:36 +03:00
Bump packages to fix linter
This commit is contained in:
+9
-5
@@ -3,16 +3,20 @@ Get the real path of the system temp directory.
|
||||
|
||||
@example
|
||||
```
|
||||
import * as os from 'os';
|
||||
import tempDirectory = require('temp-dir');
|
||||
import temporaryDirectory from 'temp-dir';
|
||||
|
||||
console.log(tempDirectory);
|
||||
console.log(temporaryDirectory);
|
||||
//=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T'
|
||||
```
|
||||
|
||||
@example
|
||||
```
|
||||
import os from 'node:os';
|
||||
|
||||
console.log(os.tmpdir());
|
||||
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' // <= Symlink
|
||||
```
|
||||
*/
|
||||
declare const tempDirectory: string;
|
||||
declare const temporaryDirectory: string;
|
||||
|
||||
export = tempDirectory;
|
||||
export default temporaryDirectory;
|
||||
|
||||
+4
-11
@@ -1,13 +1,6 @@
|
||||
'use strict';
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
import {promises as fs} from 'node:fs';
|
||||
import os from 'node:os';
|
||||
|
||||
const tempDirectorySymbol = Symbol.for('__RESOLVED_TEMP_DIRECTORY__');
|
||||
const temporaryDirectory = await fs.realpath(os.tmpdir());
|
||||
|
||||
if (!global[tempDirectorySymbol]) {
|
||||
Object.defineProperty(global, tempDirectorySymbol, {
|
||||
value: fs.realpathSync(os.tmpdir())
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = global[tempDirectorySymbol];
|
||||
export default temporaryDirectory;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
+15
-7
@@ -1,16 +1,19 @@
|
||||
{
|
||||
"name": "temp-dir",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0",
|
||||
"description": "Get the real path of the system temp directory",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/temp-dir",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"types": "./index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
@@ -33,9 +36,14 @@
|
||||
"folder"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"proxyquire": "^2.1.0",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
"ava": "^4.3.3",
|
||||
"quibble": "^0.6.14",
|
||||
"tsd": "^0.24.1",
|
||||
"xo": "^0.52.3"
|
||||
},
|
||||
"ava": {
|
||||
"nodeArguments": [
|
||||
"--loader=quibble"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+10
-13
@@ -1,30 +1,27 @@
|
||||
# temp-dir [](https://travis-ci.org/sindresorhus/temp-dir)
|
||||
# temp-dir
|
||||
|
||||
> Get the real path of the system temp directory
|
||||
|
||||
[The `os.tmpdir()` built-in doesn't return the real path.](https://github.com/nodejs/node/issues/11422) That can cause problems when the returned path is a symlink, which is the case on macOS. Use this module to get the resolved path.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install temp-dir
|
||||
```
|
||||
$ npm install temp-dir
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const tempDirectory = require('temp-dir');
|
||||
import temporaryDirectory from 'temp-dir';
|
||||
|
||||
console.log(tempDirectory);
|
||||
console.log(temporaryDirectory);
|
||||
//=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T'
|
||||
|
||||
console.log(require('os').tmpdir());
|
||||
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' // <= Symlink
|
||||
```
|
||||
|
||||
```js
|
||||
import os from 'node:os';
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
console.log(os.tmpdir());
|
||||
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' // <= Symlink
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user