standard-log 9.0.1 → 9.1.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.
Files changed (102) hide show
  1. package/cjs/console.d.ts.map +1 -1
  2. package/cjs/console.js +3 -5
  3. package/cjs/console.js.map +1 -1
  4. package/cjs/global.d.ts +13 -0
  5. package/cjs/global.d.ts.map +1 -0
  6. package/cjs/global.js +33 -0
  7. package/cjs/global.js.map +1 -0
  8. package/cjs/global.spec.d.ts +2 -0
  9. package/cjs/global.spec.d.ts.map +1 -0
  10. package/cjs/global.spec.js +32 -0
  11. package/cjs/global.spec.js.map +1 -0
  12. package/cjs/index.d.ts +2 -1
  13. package/cjs/index.d.ts.map +1 -1
  14. package/cjs/index.js +7 -1
  15. package/cjs/index.js.map +1 -1
  16. package/cjs/logStore.d.ts +1 -1
  17. package/cjs/logStore.d.ts.map +1 -1
  18. package/cjs/logStore.js.map +1 -1
  19. package/cjs/logger.d.ts +1 -2
  20. package/cjs/logger.d.ts.map +1 -1
  21. package/cjs/logger.js +6 -4
  22. package/cjs/logger.js.map +1 -1
  23. package/cjs/platform.browser.d.ts +0 -1
  24. package/cjs/platform.browser.d.ts.map +1 -1
  25. package/cjs/platform.browser.js +1 -5
  26. package/cjs/platform.browser.js.map +1 -1
  27. package/cjs/platform.d.ts +0 -2
  28. package/cjs/platform.d.ts.map +1 -1
  29. package/cjs/platform.js +1 -18
  30. package/cjs/platform.js.map +1 -1
  31. package/cjs/standardLog.d.ts +10 -3
  32. package/cjs/standardLog.d.ts.map +1 -1
  33. package/cjs/standardLog.js +24 -18
  34. package/cjs/standardLog.js.map +1 -1
  35. package/cjs/standardLog.spec.js.map +1 -1
  36. package/cjs/types.d.ts +3 -3
  37. package/cjs/types.d.ts.map +1 -1
  38. package/cjs/types.js.map +1 -1
  39. package/dist/standard-log.es5.js +84 -46
  40. package/dist/standard-log.es5.js.gz +0 -0
  41. package/dist/standard-log.es5.js.map +1 -1
  42. package/dist/standard-log.es5.js.map.gz +0 -0
  43. package/dist/standard-log.esm.js +112 -56
  44. package/dist/standard-log.esm.js.gz +0 -0
  45. package/dist/standard-log.esm.js.map +1 -1
  46. package/dist/standard-log.esm.js.map.gz +0 -0
  47. package/esm/console.d.ts.map +1 -1
  48. package/esm/console.js +4 -6
  49. package/esm/console.js.map +1 -1
  50. package/esm/global.d.ts +13 -0
  51. package/esm/global.d.ts.map +1 -0
  52. package/esm/global.js +28 -0
  53. package/esm/global.js.map +1 -0
  54. package/esm/global.spec.d.ts +2 -0
  55. package/esm/global.spec.d.ts.map +1 -0
  56. package/esm/global.spec.js +30 -0
  57. package/esm/global.spec.js.map +1 -0
  58. package/esm/index.d.ts +2 -1
  59. package/esm/index.d.ts.map +1 -1
  60. package/esm/index.js +2 -1
  61. package/esm/index.js.map +1 -1
  62. package/esm/logStore.d.ts +1 -1
  63. package/esm/logStore.d.ts.map +1 -1
  64. package/esm/logStore.js.map +1 -1
  65. package/esm/logger.d.ts +1 -2
  66. package/esm/logger.d.ts.map +1 -1
  67. package/esm/logger.js +3 -2
  68. package/esm/logger.js.map +1 -1
  69. package/esm/platform.browser.d.ts +0 -1
  70. package/esm/platform.browser.d.ts.map +1 -1
  71. package/esm/platform.browser.js +0 -3
  72. package/esm/platform.browser.js.map +1 -1
  73. package/esm/platform.d.ts +0 -2
  74. package/esm/platform.d.ts.map +1 -1
  75. package/esm/platform.js +0 -15
  76. package/esm/platform.js.map +1 -1
  77. package/esm/standardLog.d.ts +10 -3
  78. package/esm/standardLog.d.ts.map +1 -1
  79. package/esm/standardLog.js +20 -15
  80. package/esm/standardLog.js.map +1 -1
  81. package/esm/standardLog.spec.js.map +1 -1
  82. package/esm/types.d.ts +3 -3
  83. package/esm/types.d.ts.map +1 -1
  84. package/esm/types.js.map +1 -1
  85. package/package.json +1 -1
  86. package/ts/console.ts +4 -6
  87. package/ts/global.ts +34 -0
  88. package/ts/index.ts +5 -1
  89. package/ts/logStore.ts +1 -1
  90. package/ts/logger.ts +3 -3
  91. package/ts/platform.browser.ts +0 -3
  92. package/ts/platform.ts +0 -17
  93. package/ts/standardLog.ts +30 -19
  94. package/ts/types.ts +3 -3
  95. package/cjs/platform.spec.d.ts +0 -2
  96. package/cjs/platform.spec.d.ts.map +0 -1
  97. package/cjs/platform.spec.js +0 -22
  98. package/cjs/platform.spec.js.map +0 -1
  99. package/esm/platform.spec.d.ts +0 -2
  100. package/esm/platform.spec.d.ts.map +0 -1
  101. package/esm/platform.spec.js +0 -20
  102. package/esm/platform.spec.js.map +0 -1
package/ts/global.ts ADDED
@@ -0,0 +1,34 @@
1
+ import { StackTraceMeta } from '@just-func/types'
2
+ import { record } from 'type-plus'
3
+ import { LogStore } from './logStore.js'
4
+ import { createStandardLogClosure, StandardLogInstance } from './standardLog.js'
5
+ import { LoggerOptions, LogMethodNames, StandardLogOptions } from './types.js'
6
+
7
+ export function getLogger<N extends string = LogMethodNames>(
8
+ params: [id: string, options?: LoggerOptions], meta?: StackTraceMeta) {
9
+ return getGlobalSL<N>().getLogger(params, meta)
10
+ }
11
+
12
+ export const ctx: { gsl?: { store: LogStore, standardLog: StandardLogInstance<any> } } = record()
13
+
14
+ function getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {
15
+ if (!ctx.gsl) configGlobal({})
16
+
17
+ return ctx.gsl!.standardLog
18
+ }
19
+
20
+ export function configGlobal<N extends string = LogMethodNames>(options: Omit<StandardLogOptions, 'customLevels'>) {
21
+ if (ctx.gsl) {
22
+ if (options.logLevel) {
23
+ ctx.gsl.store.logLevel = options.logLevel
24
+ }
25
+ if (options.reporters) {
26
+ const reporters = ctx.gsl.store.reporters
27
+ while (reporters.length > 0) reporters.pop()
28
+ reporters.push(...options.reporters)
29
+ }
30
+ }
31
+ else {
32
+ ctx.gsl = createStandardLogClosure<N>(options)
33
+ }
34
+ }
package/ts/index.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  export * from './console.js'
2
2
  export * from './errors.js'
3
3
  export * from './formatter.js'
4
+ export { configGlobal, getLogger } from './global.js'
4
5
  export * from './logLevels.js'
5
6
  export * from './memory.js'
6
- export * from './standardLog.js'
7
+ export {
8
+ createStandardLog, createStandardLogForTest, StandardLog, StandardLogInstance
9
+ } from './standardLog.js'
7
10
  export * from './types.js'
11
+
package/ts/logStore.ts CHANGED
@@ -4,7 +4,7 @@ import { createConsoleLogReporter } from './console.js'
4
4
  import { logLevels, toLogLevel, toLogLevelName } from './logLevels.js'
5
5
  import type { Logger, LogLevel, LogReporter, StandardLogOptions } from './types.js'
6
6
 
7
- export function createLogStore(options: StandardLogOptions): LogStore {
7
+ export function createLogStore(options: Required<StandardLogOptions>): LogStore {
8
8
  return {
9
9
  loggers: {},
10
10
  reporters: options.reporters || [createConsoleLogReporter()],
package/ts/logger.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { StackTraceMeta } from '@just-func/types'
2
- import { RequiredPick } from 'type-plus'
3
2
  import { InvalidId } from './errors.js'
4
3
  import { logLevels } from './logLevels.js'
5
4
  import { LogStore } from './logStore.js'
@@ -7,10 +6,11 @@ import type { LogEntry, LogFunction, Logger, LoggerOptions, LogMethodNames, LogR
7
6
  import { LogLevel } from './types.js'
8
7
 
9
8
  export function createLogger<T extends string = LogMethodNames>(
10
- [store, id, { level, writeTo = () => true }]: [LogStore, string, RequiredPick<LoggerOptions, 'level'>],
9
+ [store, id, options]: [LogStore, string, LoggerOptions | undefined],
11
10
  meta?: StackTraceMeta
12
11
  ): Logger {
13
12
  validateId(id, meta)
13
+ const writeTo = options?.writeTo ?? (() => true)
14
14
  const [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] = typeof writeTo === 'string'
15
15
  ? [id => id === writeTo, store.reporters]
16
16
  : writeTo instanceof RegExp
@@ -24,7 +24,7 @@ export function createLogger<T extends string = LogMethodNames>(
24
24
  }
25
25
 
26
26
  const logger = {
27
- level,
27
+ level: options?.level,
28
28
  write
29
29
  } as any
30
30
 
@@ -1,8 +1,5 @@
1
1
  import type { ConsoleLike, LogEntry } from './types.js'
2
2
 
3
3
  export const toInspectLogEntry = (e: LogEntry) => e
4
- export function isConsoleDebugAvailable() {
5
- return true
6
- }
7
4
 
8
5
  export const polyfill: { console?: ConsoleLike } = {}
package/ts/platform.ts CHANGED
@@ -1,23 +1,6 @@
1
1
  import { inspect } from 'util'
2
2
  import type { ConsoleLike, LogEntry } from './types.js'
3
3
 
4
- export function semverGt(versionString: string, version: [number, number, number]) {
5
- const actual = versionString.split('.').reverse().reduce((p, v, i) => {
6
- p += Number.parseInt(v, 10) * Math.pow(100, i)
7
- return p
8
- }, 0)
9
-
10
- return actual > (version[0] * 10000 + version[1] * 100 + version[2])
11
- }
12
-
13
- // istanbul ignore next
14
- export function isConsoleDebugAvailable() {
15
- // without this, systemJs will complain `process is not defined`
16
- if (!global.process) return true
17
- const versionString = process.version.startsWith('v') ? process.version.slice(1) : process.version
18
- return semverGt(versionString, [9, 3, 0])
19
- }
20
-
21
4
  export const toInspectLogEntry = (e: LogEntry) => (
22
5
  e.args = e.args.map(value => typeof value === 'object' && value !== null ? inspect(value) : value),
23
6
  e)
package/ts/standardLog.ts CHANGED
@@ -2,37 +2,48 @@ import { StackTraceMeta } from '@just-func/types'
2
2
  import { required } from 'type-plus'
3
3
  import { createLogger } from './logger.js'
4
4
  import { logLevels } from './logLevels.js'
5
- import { createLogStore } from './logStore.js'
5
+ import { createLogStore, LogStore } from './logStore.js'
6
6
  import { createMemoryLogReporter } from './memory.js'
7
7
  import type { Logger, LoggerOptions, LogLevel, LogMethodNames, StandardLogOptions } from './types.js'
8
8
 
9
- export interface StandardLog<N extends string = LogMethodNames> {
10
- readonly logLevel: number,
9
+ export interface StandardLogInstance<N extends string = LogMethodNames> {
10
+ logLevel: number,
11
11
  toLogLevelName(level: number): string,
12
12
  toLogLevel(name: N): number,
13
13
  getLogger(params: [id: string, options?: LoggerOptions], meta?: StackTraceMeta): Logger<N | LogMethodNames>
14
14
  }
15
15
 
16
+ export interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {
17
+ }
18
+
16
19
  export function createStandardLog<N extends string = LogMethodNames>(
17
- options?: Partial<StandardLogOptions<N>>, _meta?: StackTraceMeta
18
- ): Readonly<StandardLog<N>> {
20
+ options?: StandardLogOptions<N>
21
+ ): StandardLog<N> {
22
+ return createStandardLogClosure(options).standardLog
23
+ }
24
+
25
+ export function createStandardLogClosure<N extends string = LogMethodNames>(
26
+ options?: StandardLogOptions<N>
27
+ ): { store: LogStore, standardLog: StandardLog<N> } {
19
28
  const store = createLogStore(required({ logLevel: logLevels.info }, options))
20
29
 
21
- return Object.freeze({
22
- get logLevel() { return store.logLevel },
23
-
24
- toLogLevelName(level: number) {
25
- return store.logLevelStore.getName(level)
26
- },
27
- toLogLevel(name: string) {
28
- return store.logLevelStore.getLevel(name)
29
- },
30
- getLogger([id, options]: [id: string, options?: LoggerOptions], meta?: StackTraceMeta) {
31
- if (store.loggers[id]) return store.loggers[id] as any
32
- const opt = required({ level: store.logLevel }, options)
33
- return store.loggers[id] = createLogger([store, id, opt], { ssf: this.getLogger, ...meta }) as any
30
+ return {
31
+ store,
32
+ standardLog: {
33
+ get logLevel() { return store.logLevel },
34
+
35
+ toLogLevelName(level: number) {
36
+ return store.logLevelStore.getName(level)
37
+ },
38
+ toLogLevel(name: string) {
39
+ return store.logLevelStore.getLevel(name)
40
+ },
41
+ getLogger([id, options]: [id: string, options?: LoggerOptions], meta?: StackTraceMeta) {
42
+ if (store.loggers[id]) return store.loggers[id] as any
43
+ return store.loggers[id] = createLogger([store, id, options], { ssf: this.getLogger, ...meta }) as any
44
+ }
34
45
  }
35
- })
46
+ }
36
47
  }
37
48
 
38
49
  export function createStandardLogForTest(logLevel: LogLevel = logLevels.debug) {
package/ts/types.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export type StandardLogOptions<CustomLevelNames extends string = string> = {
2
- customLevels: Record<CustomLevelNames, number>,
3
- logLevel: number,
4
- reporters: LogReporter[]
2
+ customLevels?: Record<CustomLevelNames, number>,
3
+ logLevel?: number,
4
+ reporters?: LogReporter[]
5
5
  }
6
6
 
7
7
  export interface LoggerOptions {
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=platform.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.spec.d.ts","sourceRoot":"","sources":["../ts/platform.spec.ts"],"names":[],"mappings":""}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var platform_js_1 = require("./platform.js");
4
- test('9.3.0 returns false', function () {
5
- expect((0, platform_js_1.semverGt)('9.3.0', [9, 3, 0])).toBe(false);
6
- });
7
- test('9.3.1 returns true', function () {
8
- expect((0, platform_js_1.semverGt)('9.3.1', [9, 3, 0])).toBe(true);
9
- });
10
- test('9.3.1 returns true', function () {
11
- expect((0, platform_js_1.semverGt)('9.3.1', [9, 3, 0])).toBe(true);
12
- });
13
- test('9.4.0 returns true', function () {
14
- expect((0, platform_js_1.semverGt)('9.4.0', [9, 3, 0])).toBe(true);
15
- });
16
- test('9.10.0 returns true', function () {
17
- expect((0, platform_js_1.semverGt)('9.10.0', [9, 3, 0])).toBe(true);
18
- });
19
- test('10.0.0 returns true', function () {
20
- expect((0, platform_js_1.semverGt)('10.0.0', [9, 3, 0])).toBe(true);
21
- });
22
- //# sourceMappingURL=platform.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.spec.js","sourceRoot":"","sources":["../ts/platform.spec.ts"],"names":[],"mappings":";;AAAA,6CAAwC;AAExC,IAAI,CAAC,qBAAqB,EAAE;IAC1B,MAAM,CAAC,IAAA,sBAAQ,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAClD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,oBAAoB,EAAE;IACzB,MAAM,CAAC,IAAA,sBAAQ,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,oBAAoB,EAAE;IACzB,MAAM,CAAC,IAAA,sBAAQ,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,oBAAoB,EAAE;IACzB,MAAM,CAAC,IAAA,sBAAQ,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,qBAAqB,EAAE;IAC1B,MAAM,CAAC,IAAA,sBAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAClD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,qBAAqB,EAAE;IAC1B,MAAM,CAAC,IAAA,sBAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAClD,CAAC,CAAC,CAAA","sourcesContent":["import { semverGt } from './platform.js'\n\ntest('9.3.0 returns false', () => {\n expect(semverGt('9.3.0', [9, 3, 0])).toBe(false)\n})\n\ntest('9.3.1 returns true', () => {\n expect(semverGt('9.3.1', [9, 3, 0])).toBe(true)\n})\n\ntest('9.3.1 returns true', () => {\n expect(semverGt('9.3.1', [9, 3, 0])).toBe(true)\n})\n\ntest('9.4.0 returns true', () => {\n expect(semverGt('9.4.0', [9, 3, 0])).toBe(true)\n})\n\ntest('9.10.0 returns true', () => {\n expect(semverGt('9.10.0', [9, 3, 0])).toBe(true)\n})\n\ntest('10.0.0 returns true', () => {\n expect(semverGt('10.0.0', [9, 3, 0])).toBe(true)\n})\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=platform.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.spec.d.ts","sourceRoot":"","sources":["../ts/platform.spec.ts"],"names":[],"mappings":""}
@@ -1,20 +0,0 @@
1
- import { semverGt } from './platform.js';
2
- test('9.3.0 returns false', () => {
3
- expect(semverGt('9.3.0', [9, 3, 0])).toBe(false);
4
- });
5
- test('9.3.1 returns true', () => {
6
- expect(semverGt('9.3.1', [9, 3, 0])).toBe(true);
7
- });
8
- test('9.3.1 returns true', () => {
9
- expect(semverGt('9.3.1', [9, 3, 0])).toBe(true);
10
- });
11
- test('9.4.0 returns true', () => {
12
- expect(semverGt('9.4.0', [9, 3, 0])).toBe(true);
13
- });
14
- test('9.10.0 returns true', () => {
15
- expect(semverGt('9.10.0', [9, 3, 0])).toBe(true);
16
- });
17
- test('10.0.0 returns true', () => {
18
- expect(semverGt('10.0.0', [9, 3, 0])).toBe(true);
19
- });
20
- //# sourceMappingURL=platform.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.spec.js","sourceRoot":"","sources":["../ts/platform.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAC/B,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAClD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAC9B,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAC9B,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAC9B,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAC/B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAClD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAC/B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAClD,CAAC,CAAC,CAAA","sourcesContent":["import { semverGt } from './platform.js'\n\ntest('9.3.0 returns false', () => {\n expect(semverGt('9.3.0', [9, 3, 0])).toBe(false)\n})\n\ntest('9.3.1 returns true', () => {\n expect(semverGt('9.3.1', [9, 3, 0])).toBe(true)\n})\n\ntest('9.3.1 returns true', () => {\n expect(semverGt('9.3.1', [9, 3, 0])).toBe(true)\n})\n\ntest('9.4.0 returns true', () => {\n expect(semverGt('9.4.0', [9, 3, 0])).toBe(true)\n})\n\ntest('9.10.0 returns true', () => {\n expect(semverGt('9.10.0', [9, 3, 0])).toBe(true)\n})\n\ntest('10.0.0 returns true', () => {\n expect(semverGt('10.0.0', [9, 3, 0])).toBe(true)\n})\n"]}