@kubun/logger 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Config, ConsoleSinkOptions, Logger } from '@enkaku/log';
1
+ import type { Config, ConsoleSinkOptions, Logger } from '@sozai/log';
2
2
  export type { Logger };
3
3
  export declare function getKubunLogger(namespace: string, properties?: Record<string, unknown>): Logger;
4
4
  export declare function getDefaultConfig(options?: ConsoleSinkOptions): Config<'console', never>;
package/lib/index.js CHANGED
@@ -1 +1,20 @@
1
- import{getDefaultConfig as e,getLogger as o}from"@enkaku/log";export function getKubunLogger(e,t){return o(["kubun",e],t)}export function getDefaultConfig(o){let t=e(o);return t.loggers.push({category:["kubun"],lowestLevel:"error",sinks:["console"]}),t}
1
+ import { getDefaultConfig as getEnkakuConfig, getLogger } from '@sozai/log';
2
+ export function getKubunLogger(namespace, properties) {
3
+ return getLogger([
4
+ 'kubun',
5
+ namespace
6
+ ], properties);
7
+ }
8
+ export function getDefaultConfig(options) {
9
+ const config = getEnkakuConfig(options);
10
+ config.loggers.push({
11
+ category: [
12
+ 'kubun'
13
+ ],
14
+ lowestLevel: 'error',
15
+ sinks: [
16
+ 'console'
17
+ ]
18
+ });
19
+ return config;
20
+ }
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "name": "@kubun/logger",
3
- "version": "0.10.0",
4
- "license": "see LICENSE.md",
3
+ "version": "0.12.0",
5
4
  "keywords": [],
5
+ "license": "see LICENSE.md",
6
+ "sideEffects": false,
6
7
  "type": "module",
7
- "main": "lib/index.js",
8
- "types": "lib/index.d.ts",
9
8
  "exports": {
10
9
  ".": "./lib/index.js"
11
10
  },
11
+ "main": "lib/index.js",
12
+ "types": "lib/index.d.ts",
12
13
  "files": [
13
14
  "lib/*",
14
15
  "LICENSE.md"
15
16
  ],
16
- "sideEffects": false,
17
17
  "dependencies": {
18
- "@enkaku/log": "^0.16.0"
18
+ "@sozai/log": "^0.3.0"
19
19
  },
20
20
  "scripts": {
21
+ "build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
21
22
  "build:clean": "del lib",
22
- "build:js": "swc src -d ./lib --config-file ../../swc.json --strip-leading-paths",
23
+ "build:js": "swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
23
24
  "build:types": "tsc --emitDeclarationOnly --skipLibCheck",
24
25
  "build:types:ci": "tsc --emitDeclarationOnly --declarationMap false",
25
- "build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
26
+ "test": "pnpm run test:types && pnpm run test:unit",
26
27
  "test:types": "tsc --noEmit",
27
- "test:unit": "vitest run",
28
- "test": "pnpm run test:types && pnpm run test:unit"
28
+ "test:unit": "vitest run"
29
29
  }
30
30
  }