@cavoq/mcc-mnc-list 1.2.2 → 2.0.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/CHANGELOG.md +20 -0
- package/fetch.js +239 -170
- package/index.js +14 -14
- package/mcc-mnc-list.json +494 -242
- package/package.json +25 -8
- package/status-codes.json +1 -1
- package/types.d.ts +17 -26
- package/.github/workflows/release.yml +0 -43
- package/Dockerfile +0 -19
- package/eslint.config.js +0 -17
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cavoq/mcc-mnc-list",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "List of MCC and MNC codes from up-to-date Wikipedia page",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "eslint . && ava",
|
|
9
|
-
"fetch": "node fetch.js"
|
|
9
|
+
"fetch": "node fetch.js",
|
|
10
|
+
"lint": "eslint .",
|
|
11
|
+
"prepublishOnly": "pnpm test"
|
|
10
12
|
},
|
|
11
13
|
"author": "David Stromberger",
|
|
12
14
|
"contributors": [
|
|
@@ -14,13 +16,13 @@
|
|
|
14
16
|
],
|
|
15
17
|
"license": "MIT",
|
|
16
18
|
"dependencies": {
|
|
17
|
-
"jsdom": "^
|
|
19
|
+
"jsdom": "^30.0.1"
|
|
18
20
|
},
|
|
19
21
|
"devDependencies": {
|
|
20
22
|
"@eslint/js": "^10.0.1",
|
|
21
|
-
"ava": "^
|
|
22
|
-
"eslint": "^10.0
|
|
23
|
-
"globals": "^17.
|
|
23
|
+
"ava": "^8.0.1",
|
|
24
|
+
"eslint": "^10.10.0",
|
|
25
|
+
"globals": "^17.12.0"
|
|
24
26
|
},
|
|
25
27
|
"keywords": [
|
|
26
28
|
"mcc",
|
|
@@ -32,10 +34,25 @@
|
|
|
32
34
|
],
|
|
33
35
|
"repository": {
|
|
34
36
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/cavoq/mcc-mnc-list.git"
|
|
37
|
+
"url": "git+https://github.com/cavoq/mcc-mnc-list.git"
|
|
36
38
|
},
|
|
37
39
|
"bugs": {
|
|
38
40
|
"url": "https://github.com/cavoq/mcc-mnc-list/issues"
|
|
39
41
|
},
|
|
40
|
-
"homepage": "https://github.com/cavoq/mcc-mnc-list#readme"
|
|
42
|
+
"homepage": "https://github.com/cavoq/mcc-mnc-list#readme",
|
|
43
|
+
"packageManager": "pnpm@10.34.5",
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"index.js",
|
|
49
|
+
"types.d.ts",
|
|
50
|
+
"fetch.js",
|
|
51
|
+
"mcc-mnc-list.json",
|
|
52
|
+
"status-codes.json",
|
|
53
|
+
"CHANGELOG.md"
|
|
54
|
+
],
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
}
|
|
41
58
|
}
|
package/status-codes.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
export
|
|
2
|
-
type:
|
|
3
|
-
countryName: string
|
|
4
|
-
countryCode: string
|
|
1
|
+
export type Operator = {
|
|
2
|
+
type: 'Test' | 'National' | 'International'
|
|
3
|
+
countryName: string | null
|
|
4
|
+
countryCode: string | null
|
|
5
5
|
mcc: string
|
|
6
6
|
mnc: string
|
|
7
|
-
brand: string
|
|
8
|
-
operator: string
|
|
9
|
-
status: string
|
|
10
|
-
bands: string
|
|
11
|
-
notes: string
|
|
7
|
+
brand: string | null
|
|
8
|
+
operator: string | null
|
|
9
|
+
status: string | null
|
|
10
|
+
bands: string | null
|
|
11
|
+
notes: string | null
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
export declare const filter: (filters?: {
|
|
17
|
-
countryCode?: string
|
|
18
|
-
mcc?: string
|
|
19
|
-
mnc?: string
|
|
20
|
-
mccmnc?: string
|
|
21
|
-
statusCode?: string
|
|
22
|
-
}) => Operator[];
|
|
23
|
-
|
|
24
|
-
export declare const find: (filters?: {
|
|
14
|
+
export type Filters = {
|
|
25
15
|
countryCode?: string
|
|
26
|
-
mcc?: string
|
|
27
|
-
mnc?: string
|
|
28
|
-
mccmnc?: string
|
|
16
|
+
mcc?: string | number
|
|
17
|
+
mnc?: string | number
|
|
18
|
+
mccmnc?: string | number
|
|
29
19
|
statusCode?: string
|
|
30
|
-
}
|
|
20
|
+
}
|
|
31
21
|
|
|
22
|
+
export declare const all: () => Operator[];
|
|
23
|
+
export declare const filter: (filters?: Filters | null) => Operator[];
|
|
24
|
+
export declare const find: (filters?: Filters | null) => Operator | undefined;
|
|
32
25
|
export declare const statusCodes: () => string[];
|
|
33
|
-
|
|
34
|
-
export { };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
name: CI + Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
pull_request:
|
|
8
|
-
release:
|
|
9
|
-
types: [published]
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
test:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
strategy:
|
|
15
|
-
fail-fast: false
|
|
16
|
-
matrix:
|
|
17
|
-
node-version: [20.x, 22.x]
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
- uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: ${{ matrix.node-version }}
|
|
23
|
-
cache: npm
|
|
24
|
-
- run: npm ci
|
|
25
|
-
- run: npm test
|
|
26
|
-
|
|
27
|
-
publish-npm:
|
|
28
|
-
if: github.event_name == 'release'
|
|
29
|
-
needs: test
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
permissions:
|
|
32
|
-
contents: read
|
|
33
|
-
steps:
|
|
34
|
-
- uses: actions/checkout@v4
|
|
35
|
-
- uses: actions/setup-node@v4
|
|
36
|
-
with:
|
|
37
|
-
node-version: 20.x
|
|
38
|
-
registry-url: https://registry.npmjs.org/
|
|
39
|
-
cache: npm
|
|
40
|
-
- run: npm ci
|
|
41
|
-
- run: npm publish --access public
|
|
42
|
-
env:
|
|
43
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/Dockerfile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
FROM node:22-bookworm-slim
|
|
2
|
-
|
|
3
|
-
ENV NODE_ENV=production \
|
|
4
|
-
NPM_CONFIG_AUDIT=false \
|
|
5
|
-
NPM_CONFIG_FUND=false \
|
|
6
|
-
NPM_CONFIG_UPDATE_NOTIFIER=false
|
|
7
|
-
|
|
8
|
-
WORKDIR /mnc-mcc-list
|
|
9
|
-
|
|
10
|
-
COPY package*.json ./
|
|
11
|
-
|
|
12
|
-
# `fetch.js` requires `jsdom`, which currently lives in devDependencies.
|
|
13
|
-
RUN npm install --include=dev --omit=optional && npm cache clean --force
|
|
14
|
-
|
|
15
|
-
COPY --chown=node:node . .
|
|
16
|
-
|
|
17
|
-
USER node
|
|
18
|
-
|
|
19
|
-
CMD ["node", "fetch.js"]
|
package/eslint.config.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const js = require("@eslint/js");
|
|
2
|
-
const globals = require("globals");
|
|
3
|
-
|
|
4
|
-
module.exports = [
|
|
5
|
-
js.configs.recommended,
|
|
6
|
-
{
|
|
7
|
-
files: ["**/*.js"],
|
|
8
|
-
languageOptions: {
|
|
9
|
-
ecmaVersion: 8,
|
|
10
|
-
sourceType: "commonjs",
|
|
11
|
-
globals: Object.assign({}, globals.node),
|
|
12
|
-
},
|
|
13
|
-
rules: {
|
|
14
|
-
"no-console": "off",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
];
|