standard-log 9.0.0 → 9.1.1
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/README.md +33 -2
- package/cjs/console.d.ts.map +1 -1
- package/cjs/console.js +3 -5
- package/cjs/console.js.map +1 -1
- package/cjs/global.d.ts +14 -0
- package/cjs/global.d.ts.map +1 -0
- package/cjs/global.js +39 -0
- package/cjs/global.js.map +1 -0
- package/cjs/global.spec.d.ts +2 -0
- package/cjs/global.spec.d.ts.map +1 -0
- package/cjs/global.spec.js +42 -0
- package/cjs/global.spec.js.map +1 -0
- package/cjs/index.d.ts +2 -1
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +7 -1
- package/cjs/index.js.map +1 -1
- package/cjs/logStore.d.ts +1 -1
- package/cjs/logStore.d.ts.map +1 -1
- package/cjs/logStore.js.map +1 -1
- package/cjs/logger.d.ts +1 -2
- package/cjs/logger.d.ts.map +1 -1
- package/cjs/logger.js +6 -4
- package/cjs/logger.js.map +1 -1
- package/cjs/platform.browser.d.ts +0 -1
- package/cjs/platform.browser.d.ts.map +1 -1
- package/cjs/platform.browser.js +1 -5
- package/cjs/platform.browser.js.map +1 -1
- package/cjs/platform.d.ts +0 -2
- package/cjs/platform.d.ts.map +1 -1
- package/cjs/platform.js +1 -18
- package/cjs/platform.js.map +1 -1
- package/cjs/standardLog.d.ts +11 -4
- package/cjs/standardLog.d.ts.map +1 -1
- package/cjs/standardLog.js +24 -18
- package/cjs/standardLog.js.map +1 -1
- package/cjs/standardLog.spec.js +12 -0
- package/cjs/standardLog.spec.js.map +1 -1
- package/cjs/types.d.ts +3 -3
- package/cjs/types.d.ts.map +1 -1
- package/cjs/types.js.map +1 -1
- package/dist/standard-log.es5.js +90 -46
- package/dist/standard-log.es5.js.gz +0 -0
- package/dist/standard-log.es5.js.map +1 -1
- package/dist/standard-log.es5.js.map.gz +0 -0
- package/dist/standard-log.esm.js +117 -56
- package/dist/standard-log.esm.js.gz +0 -0
- package/dist/standard-log.esm.js.map +1 -1
- package/dist/standard-log.esm.js.map.gz +0 -0
- package/esm/console.d.ts.map +1 -1
- package/esm/console.js +4 -6
- package/esm/console.js.map +1 -1
- package/esm/global.d.ts +14 -0
- package/esm/global.d.ts.map +1 -0
- package/esm/global.js +33 -0
- package/esm/global.js.map +1 -0
- package/esm/global.spec.d.ts +2 -0
- package/esm/global.spec.d.ts.map +1 -0
- package/esm/global.spec.js +40 -0
- package/esm/global.spec.js.map +1 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -1
- package/esm/index.js.map +1 -1
- package/esm/logStore.d.ts +1 -1
- package/esm/logStore.d.ts.map +1 -1
- package/esm/logStore.js.map +1 -1
- package/esm/logger.d.ts +1 -2
- package/esm/logger.d.ts.map +1 -1
- package/esm/logger.js +3 -2
- package/esm/logger.js.map +1 -1
- package/esm/platform.browser.d.ts +0 -1
- package/esm/platform.browser.d.ts.map +1 -1
- package/esm/platform.browser.js +0 -3
- package/esm/platform.browser.js.map +1 -1
- package/esm/platform.d.ts +0 -2
- package/esm/platform.d.ts.map +1 -1
- package/esm/platform.js +0 -15
- package/esm/platform.js.map +1 -1
- package/esm/standardLog.d.ts +11 -4
- package/esm/standardLog.d.ts.map +1 -1
- package/esm/standardLog.js +20 -15
- package/esm/standardLog.js.map +1 -1
- package/esm/standardLog.spec.js +12 -0
- package/esm/standardLog.spec.js.map +1 -1
- package/esm/types.d.ts +3 -3
- package/esm/types.d.ts.map +1 -1
- package/esm/types.js.map +1 -1
- package/package.json +1 -1
- package/ts/console.ts +4 -6
- package/ts/global.ts +43 -0
- package/ts/index.ts +5 -1
- package/ts/logStore.ts +1 -1
- package/ts/logger.ts +3 -3
- package/ts/platform.browser.ts +0 -3
- package/ts/platform.ts +0 -17
- package/ts/standardLog.ts +31 -20
- package/ts/types.ts +3 -3
- package/cjs/platform.spec.d.ts +0 -2
- package/cjs/platform.spec.d.ts.map +0 -1
- package/cjs/platform.spec.js +0 -22
- package/cjs/platform.spec.js.map +0 -1
- package/esm/platform.spec.d.ts +0 -2
- package/esm/platform.spec.d.ts.map +0 -1
- package/esm/platform.spec.js +0 -20
- package/esm/platform.spec.js.map +0 -1
package/ts/global.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
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: {
|
|
13
|
+
configured?: boolean,
|
|
14
|
+
gsl?: { store: LogStore, standardLog: StandardLogInstance<LogMethodNames> }
|
|
15
|
+
} = record()
|
|
16
|
+
|
|
17
|
+
function getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {
|
|
18
|
+
if (!ctx.gsl) ctx.gsl = createStandardLogClosure()
|
|
19
|
+
|
|
20
|
+
return ctx.gsl!.standardLog as StandardLogInstance<N>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {
|
|
24
|
+
if (ctx.configured) {
|
|
25
|
+
const log = ctx.gsl?.standardLog.getLogger(['standard-log'])
|
|
26
|
+
log?.warn('configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (ctx.gsl) {
|
|
30
|
+
if (options.logLevel) {
|
|
31
|
+
ctx.gsl.store.logLevel = options.logLevel
|
|
32
|
+
}
|
|
33
|
+
if (options.reporters) {
|
|
34
|
+
const reporters = ctx.gsl.store.reporters
|
|
35
|
+
while (reporters.length > 0) reporters.pop()
|
|
36
|
+
reporters.push(...options.reporters)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
ctx.gsl = createStandardLogClosure(options)
|
|
41
|
+
}
|
|
42
|
+
ctx.configured = true
|
|
43
|
+
}
|
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
|
|
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,
|
|
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
|
|
package/ts/platform.browser.ts
CHANGED
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
|
|
10
|
-
|
|
9
|
+
export interface StandardLogInstance<N extends string = LogMethodNames> {
|
|
10
|
+
logLevel: number,
|
|
11
11
|
toLogLevelName(level: number): string,
|
|
12
12
|
toLogLevel(name: N): number,
|
|
13
|
-
getLogger(params: [id: string, options?: LoggerOptions], meta?: StackTraceMeta): Logger<N>
|
|
13
|
+
getLogger(params: [id: string, options?: LoggerOptions], meta?: StackTraceMeta): Logger<N | LogMethodNames>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
export function createStandardLog<N extends string = LogMethodNames>(
|
|
17
|
-
options?:
|
|
18
|
-
):
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
3
|
-
logLevel
|
|
4
|
-
reporters
|
|
2
|
+
customLevels?: Record<CustomLevelNames, number>,
|
|
3
|
+
logLevel?: number,
|
|
4
|
+
reporters?: LogReporter[]
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export interface LoggerOptions {
|
package/cjs/platform.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.spec.d.ts","sourceRoot":"","sources":["../ts/platform.spec.ts"],"names":[],"mappings":""}
|
package/cjs/platform.spec.js
DELETED
|
@@ -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
|
package/cjs/platform.spec.js.map
DELETED
|
@@ -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"]}
|
package/esm/platform.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.spec.d.ts","sourceRoot":"","sources":["../ts/platform.spec.ts"],"names":[],"mappings":""}
|
package/esm/platform.spec.js
DELETED
|
@@ -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
|
package/esm/platform.spec.js.map
DELETED
|
@@ -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"]}
|