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

badges / shields / 23974260957

01 Apr 2026 09:01PM UTC coverage: 98.033% (-0.04%) from 98.071%
23974260957

push

github

web-flow
chore(deps): bump @xmldom/xmldom from 0.9.8 to 0.9.9 (#11749)

Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.9.8 to 0.9.9.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.9.8...0.9.9)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-version: 0.9.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

5848 of 6109 branches covered (95.73%)

49337 of 50327 relevant lines covered (98.03%)

136.33 hits per line

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

87.97
/services/bundlejs/bundlejs-package.service.js
1
import Joi from 'joi'
3✔
2
import byteSize from 'byte-size'
3✔
3
import { BaseJsonService, pathParam, queryParam } from '../index.js'
3✔
4
import { renderSizeBadge } from '../size.js'
3✔
5
import { nonNegativeInteger } from '../validators.js'
3✔
6

3✔
7
const schema = Joi.object({
3✔
8
  size: Joi.object({
3✔
9
    rawCompressedSize: nonNegativeInteger,
3✔
10
    rawUncompressedSize: nonNegativeInteger,
3✔
11
  }).required(),
3✔
12
}).required()
3✔
13

3✔
14
const queryParamSchema = Joi.object({
3✔
15
  exports: Joi.string(),
3✔
16
  externals: Joi.string(),
3✔
17
  format: Joi.string().valid('min', 'minzip', 'both'),
3✔
18
}).required()
3✔
19

3✔
20
const esbuild =
3✔
21
  '<a href="https://github.com/evanw/esbuild" target="_blank" rel="noopener">esbuild</a>'
3✔
22
const denoflate =
3✔
23
  '<a href="https://github.com/hazae41/denoflate" target="_blank" rel="noopener">denoflate</a>'
3✔
24
const bundlejs =
3✔
25
  '<a href="https://bundlejs.com/" target="_blank" rel="noopener">bundlejs</a>'
3✔
26

3✔
27
const description = `
3✔
28
View ${esbuild} minified and ${denoflate} gzipped size of a javascript package or selected exports, via ${bundlejs}.
3✔
29
`
3✔
30

3✔
31
export default class BundlejsPackage extends BaseJsonService {
3✔
32
  static category = 'size'
3✔
33

3✔
34
  static route = {
3✔
35
    base: 'bundlejs/size',
3✔
36
    pattern: ':scope(@[^/]+)?/:packageName+',
3✔
37
    queryParamSchema,
3✔
38
  }
3✔
39

3✔
40
  static openApi = {
3✔
41
    '/bundlejs/size/{packageName}': {
3✔
42
      get: {
3✔
43
        summary: 'npm package minimized gzipped size',
3✔
44
        description,
3✔
45
        parameters: [
3✔
46
          pathParam({
3✔
47
            name: 'packageName',
3✔
48
            example: 'value-enhancer@3.1.2',
3✔
49
            description:
3✔
50
              'This can either be a package name e.g: `value-enhancer`, or a package name and version e.g: `value-enhancer@3.1.2`',
3✔
51
          }),
3✔
52
          queryParam({
3✔
53
            name: 'exports',
3✔
54
            example: 'isVal,val',
3✔
55
          }),
3✔
56
          queryParam({
3✔
57
            name: 'externals',
3✔
58
            example: 'lodash,axios',
3✔
59
          }),
3✔
60
          queryParam({
3✔
61
            name: 'format',
3✔
62
            schema: { type: 'string', enum: ['min', 'minzip', 'both'] },
3✔
63
            example: 'minzip',
3✔
64
          }),
3✔
65
        ],
3✔
66
      },
3✔
67
    },
3✔
68
    '/bundlejs/size/{scope}/{packageName}': {
3✔
69
      get: {
3✔
70
        summary: 'npm package minimized gzipped size (scoped)',
3✔
71
        description,
3✔
72
        parameters: [
3✔
73
          pathParam({
3✔
74
            name: 'scope',
3✔
75
            example: '@ngneat',
3✔
76
          }),
3✔
77
          pathParam({
3✔
78
            name: 'packageName',
3✔
79
            example: 'falso@6.4.0',
3✔
80
            description:
3✔
81
              'This can either be a package name e.g: `falso`, or a package name and version e.g: `falso@6.4.0`',
3✔
82
          }),
3✔
83
          queryParam({
3✔
84
            name: 'exports',
3✔
85
            example: 'randEmail,randFullName',
3✔
86
          }),
3✔
87
          queryParam({
3✔
88
            name: 'externals',
3✔
89
            example: 'lodash,axios',
3✔
90
          }),
3✔
91
          queryParam({
3✔
92
            name: 'format',
3✔
93
            schema: { type: 'string', enum: ['min', 'minzip', 'both'] },
3✔
94
            example: 'minzip',
3✔
95
          }),
3✔
96
        ],
3✔
97
      },
3✔
98
    },
3✔
99
  }
3✔
100

3✔
101
  static defaultBadgeData = { label: 'bundlejs', color: 'informational' }
3✔
102

3✔
103
  async fetch({ scope, packageName, exports, externals }) {
3✔
104
    const searchParams = {
11✔
105
      q: `${scope ? `${scope}/` : ''}${packageName}`,
11✔
106
    }
11✔
107
    if (exports) {
11✔
108
      searchParams.treeshake = `[{${exports}}]`
2✔
109
    }
2✔
110
    if (externals) {
11✔
111
      searchParams.config = JSON.stringify({
1✔
112
        esbuild: { external: externals.split(',') },
1✔
113
      })
1✔
114
    }
1✔
115
    return this._requestJson({
11✔
116
      schema,
11✔
117
      url: 'https://deno.bundlejs.com',
11✔
118
      options: {
11✔
119
        searchParams,
11✔
120
        timeout: {
11✔
121
          request: 3500,
11✔
122
        },
11✔
123
      },
11✔
124
      systemErrors: {
11✔
125
        ETIMEDOUT: { prettyMessage: 'timeout', cacheSeconds: 10 },
11✔
126
      },
11✔
127
      httpErrors: {
11✔
128
        404: 'package or version not found',
11✔
129
      },
11✔
130
    })
11✔
131
  }
11✔
132

3✔
133
  async handle({ scope, packageName }, { exports, externals, format }) {
3✔
134
    const json = await this.fetch({ scope, packageName, exports, externals })
11✔
135
    switch (format) {
×
136
      case 'min':
×
137
        return renderSizeBadge(
×
138
          json.size.rawUncompressedSize,
×
139
          'metric',
×
140
          'minified size',
×
141
        )
×
142
      case 'both':
11!
143
        return {
×
144
          label: 'size',
×
145
          message: `${byteSize(json.size.rawUncompressedSize, { units: 'metric' })} (gzip: ${byteSize(json.size.rawCompressedSize, { units: 'metric' })})`,
×
146
          color: 'blue',
×
147
        }
×
148
      default:
11!
149
        // by default use format === 'minzip'
×
150
        // because that's how it used to be before the format query param was added
×
151
        return renderSizeBadge(
×
152
          json.size.rawCompressedSize,
×
153
          'metric',
×
154
          'minified size (gzip)',
×
155
        )
×
156
    }
11✔
157
  }
11✔
158
}
3✔
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

© 2026 Coveralls, Inc