• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FontoXML / fontoxpath / 11283403636

10 Oct 2024 11:13PM CUT coverage: 91.567%. Remained the same
11283403636

Pull #656

github

web-flow
Bump cookie and socket.io

Bumps [cookie](https://github.com/jshttp/cookie) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `cookie` from 0.4.2 to 0.7.2
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.4.2...v0.7.2)

Updates `socket.io` from 4.7.2 to 4.8.0
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.7.2...socket.io@4.8.0)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #656: Bump cookie and socket.io

5002 of 5811 branches covered (86.08%)

Branch coverage included in aggregate %.

10775 of 11419 relevant lines covered (94.36%)

96665.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.0
/src/expressions/functions/builtInFunctions_duration.ts
1
import createAtomicValue from '../dataTypes/createAtomicValue';
15✔
2
import sequenceFactory from '../dataTypes/sequenceFactory';
15✔
3
import { SequenceMultiplicity, ValueType } from '../dataTypes/Value';
4
import { BUILT_IN_NAMESPACE_URIS } from '../staticallyKnownNamespaces';
5
import { BuiltinDeclarationType } from './builtInFunctions';
6
import FunctionDefinitionType from './FunctionDefinitionType';
7

8
const fnYearsFromDuration: FunctionDefinitionType = (
15✔
9
        _dynamicContext,
10
        _executionParameters,
11
        _staticContext,
12
        sequence,
13
) => {
14
        if (sequence.isEmpty()) {
18!
15
                return sequence;
×
16
        }
17
        return sequenceFactory.singleton(
18✔
18
                createAtomicValue(sequence.first().value.getYears(), ValueType.XSINTEGER),
19
        );
20
};
21

22
const fnMonthsFromDuration: FunctionDefinitionType = (
15✔
23
        _dynamicContext,
24
        _executionParameters,
25
        _staticContext,
26
        sequence,
27
) => {
28
        if (sequence.isEmpty()) {
18!
29
                return sequence;
×
30
        }
31
        return sequenceFactory.singleton(
18✔
32
                createAtomicValue(sequence.first().value.getMonths(), ValueType.XSINTEGER),
33
        );
34
};
35

36
const fnDaysFromDuration: FunctionDefinitionType = (
15✔
37
        _dynamicContext,
38
        _executionParameters,
39
        _staticContext,
40
        sequence,
41
) => {
42
        if (sequence.isEmpty()) {
18!
43
                return sequence;
×
44
        }
45
        return sequenceFactory.singleton(
18✔
46
                createAtomicValue(sequence.first().value.getDays(), ValueType.XSINTEGER),
47
        );
48
};
49

50
const fnHoursFromDuration: FunctionDefinitionType = (
15✔
51
        _dynamicContext,
52
        _executionParameters,
53
        _staticContext,
54
        sequence,
55
) => {
56
        if (sequence.isEmpty()) {
18!
57
                return sequence;
×
58
        }
59
        return sequenceFactory.singleton(
18✔
60
                createAtomicValue(sequence.first().value.getHours(), ValueType.XSINTEGER),
61
        );
62
};
63

64
const fnMinutesFromDuration: FunctionDefinitionType = (
15✔
65
        _dynamicContext,
66
        _executionParameters,
67
        _staticContext,
68
        sequence,
69
) => {
70
        if (sequence.isEmpty()) {
18!
71
                return sequence;
×
72
        }
73
        return sequenceFactory.singleton(
18✔
74
                createAtomicValue(sequence.first().value.getMinutes(), ValueType.XSINTEGER),
75
        );
76
};
77

78
const fnSecondsFromDuration: FunctionDefinitionType = (
15✔
79
        _dynamicContext,
80
        _executionParameters,
81
        _staticContext,
82
        sequence,
83
) => {
84
        if (sequence.isEmpty()) {
18!
85
                return sequence;
×
86
        }
87
        return sequenceFactory.singleton(
18✔
88
                createAtomicValue(sequence.first().value.getSeconds(), ValueType.XSDECIMAL),
89
        );
90
};
91

92
const declarations: BuiltinDeclarationType[] = [
15✔
93
        {
94
                namespaceURI: BUILT_IN_NAMESPACE_URIS.FUNCTIONS_NAMESPACE_URI,
95
                localName: 'years-from-duration',
96
                argumentTypes: [{ type: ValueType.XSDURATION, mult: SequenceMultiplicity.ZERO_OR_ONE }],
97
                returnType: { type: ValueType.XSINTEGER, mult: SequenceMultiplicity.ZERO_OR_ONE },
98
                callFunction: fnYearsFromDuration,
99
        },
100
        {
101
                namespaceURI: BUILT_IN_NAMESPACE_URIS.FUNCTIONS_NAMESPACE_URI,
102
                localName: 'months-from-duration',
103
                argumentTypes: [{ type: ValueType.XSDURATION, mult: SequenceMultiplicity.ZERO_OR_ONE }],
104
                returnType: { type: ValueType.XSINTEGER, mult: SequenceMultiplicity.ZERO_OR_ONE },
105
                callFunction: fnMonthsFromDuration,
106
        },
107
        {
108
                namespaceURI: BUILT_IN_NAMESPACE_URIS.FUNCTIONS_NAMESPACE_URI,
109
                localName: 'days-from-duration',
110
                argumentTypes: [{ type: ValueType.XSDURATION, mult: SequenceMultiplicity.ZERO_OR_ONE }],
111
                returnType: { type: ValueType.XSINTEGER, mult: SequenceMultiplicity.ZERO_OR_ONE },
112
                callFunction: fnDaysFromDuration,
113
        },
114
        {
115
                namespaceURI: BUILT_IN_NAMESPACE_URIS.FUNCTIONS_NAMESPACE_URI,
116
                localName: 'hours-from-duration',
117
                argumentTypes: [{ type: ValueType.XSDURATION, mult: SequenceMultiplicity.ZERO_OR_ONE }],
118
                returnType: { type: ValueType.XSINTEGER, mult: SequenceMultiplicity.ZERO_OR_ONE },
119
                callFunction: fnHoursFromDuration,
120
        },
121
        {
122
                namespaceURI: BUILT_IN_NAMESPACE_URIS.FUNCTIONS_NAMESPACE_URI,
123
                localName: 'minutes-from-duration',
124
                argumentTypes: [{ type: ValueType.XSDURATION, mult: SequenceMultiplicity.ZERO_OR_ONE }],
125
                returnType: { type: ValueType.XSINTEGER, mult: SequenceMultiplicity.ZERO_OR_ONE },
126
                callFunction: fnMinutesFromDuration,
127
        },
128
        {
129
                namespaceURI: BUILT_IN_NAMESPACE_URIS.FUNCTIONS_NAMESPACE_URI,
130
                localName: 'seconds-from-duration',
131
                argumentTypes: [{ type: ValueType.XSDURATION, mult: SequenceMultiplicity.ZERO_OR_ONE }],
132
                returnType: { type: ValueType.XSDECIMAL, mult: SequenceMultiplicity.ZERO_OR_ONE },
133
                callFunction: fnSecondsFromDuration,
134
        },
135
];
136

137
export default {
15✔
138
        declarations,
139
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc