Compare commits
3 Commits
6c65d2c83d
...
4.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 453128fc4f | |||
| a399225c43 | |||
| 08fabf5bf8 |
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/.yarn/** linguist-vendored
|
||||||
|
/.yarn/releases/* binary
|
||||||
|
/.yarn/plugins/**/* binary
|
||||||
|
/.pnp.* binary linguist-generated
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -2,4 +2,7 @@ node_modules/
|
|||||||
logs/
|
logs/
|
||||||
yarn.lock
|
yarn.lock
|
||||||
out/
|
out/
|
||||||
.history/
|
esm/
|
||||||
|
.history/
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/install-state.gz
|
||||||
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
Normal file
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
874
.yarn/releases/yarn-3.6.4.cjs
vendored
Executable file
874
.yarn/releases/yarn-3.6.4.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
11
.yarnrc.yml
Normal file
11
.yarnrc.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
nodeLinker: node-modules
|
||||||
|
|
||||||
|
npmScopes:
|
||||||
|
"hibas123":
|
||||||
|
npmRegistryServer: "https://git.hibas.dev/api/packages/hibas123/npm/"
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||||
|
spec: "@yarnpkg/plugin-interactive-tools"
|
||||||
|
|
||||||
|
yarnPath: .yarn/releases/yarn-3.6.4.cjs
|
||||||
3269
package-lock.json
generated
3269
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@ -1,12 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/nodelogging",
|
"name": "@hibas123/nodelogging",
|
||||||
"version": "3.1.3",
|
"packageManager": "yarn@3.6.4",
|
||||||
|
"version": "4.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "out/index.js",
|
"main": "out/index.js",
|
||||||
"types": "out/index.d.ts",
|
"types": "out/index.d.ts",
|
||||||
|
"module": "esm/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublish": "npm run build",
|
"prepublish": "npm run build",
|
||||||
"build": "tsc",
|
"build": "tsc && tsc -p tsconfig.esm.json",
|
||||||
"watch-ts": "tsc --watch",
|
"watch-ts": "tsc --watch",
|
||||||
"watch-js": "nodemon out/test.js",
|
"watch-js": "nodemon out/test.js",
|
||||||
"watch": "concurrently npm:watch-*",
|
"watch": "concurrently npm:watch-*",
|
||||||
@ -23,17 +25,18 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"src/",
|
"src/",
|
||||||
"out/",
|
"out/",
|
||||||
|
"esm/",
|
||||||
"tsconfig.json",
|
"tsconfig.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^15.3.0",
|
"@types/node": "^24.9.1",
|
||||||
"concurrently": "^6.1.0",
|
"concurrently": "^9.2.1",
|
||||||
"nodemon": "^2.0.7",
|
"nodemon": "^3.1.10",
|
||||||
"typescript": "^4.2.4"
|
"typescript": "^5.9.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hibas123/logging": "^3.1.2",
|
"@hibas123/logging": "^4.0.2",
|
||||||
"@hibas123/utils": "^2.2.18"
|
"@hibas123/utils": "^2.2.18"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -11,6 +11,14 @@ LoggingBase.nativeFunctions = {
|
|||||||
return process.hrtime();
|
return process.hrtime();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
diffTime: (start, end) => {
|
||||||
|
if (process.hrtime.bigint) {
|
||||||
|
return Number((BigInt(end) - BigInt(start)) / BigInt(1000)) / 1000;
|
||||||
|
} else {
|
||||||
|
let diff = process.hrtime(start);
|
||||||
|
return diff[0] * 1000 + diff[1] / 1000000;
|
||||||
|
}
|
||||||
|
},
|
||||||
endTimer: (start) => {
|
endTimer: (start) => {
|
||||||
if (process.hrtime.bigint) {
|
if (process.hrtime.bigint) {
|
||||||
return Number((process.hrtime.bigint() - start) / BigInt(1000)) / 1000;
|
return Number((process.hrtime.bigint() - start) / BigInt(1000)) / 1000;
|
||||||
|
|||||||
11
tsconfig.esm.json
Normal file
11
tsconfig.esm.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"target": "ES2017",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"outDir": "esm"
|
||||||
|
},
|
||||||
|
"exclude": ["node_modules"],
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user