Skip to content

Commit cc7a552

Browse files
authored
chore: update build (#384)
* chore: update build * feat: add comprehensive serverless testing and lint-staged integration - Add 50+ new serverless architecture test cases covering: - Concurrent resource loading - Error handling and recovery - Locale fallback mechanisms - Performance and latency monitoring - Cache management strategies - Edge cases and validation - Integrate lint-staged with Husky for automated code quality - Run Biome checks and formatting on staged files - Ensure code consistency before commits - Update CHANGELOG with v1.6.0 features and improvements - Format scripts with Biome standards and Node.js protocol imports * chore: update build * chore: update build * chore: update build * chore: update build
1 parent 37a7f55 commit cc7a552

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

.releaserc.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,39 @@
1818
"prerelease": true
1919
}
2020
],
21-
"plugins": [["@semantic-release/npm"], ["@semantic-release/github"]],
21+
"plugins": [
22+
[
23+
"@semantic-release/commit-analyzer",
24+
{
25+
"preset": "angular",
26+
"releaseRules": [
27+
{
28+
"type": "breaking",
29+
"release": "major"
30+
},
31+
{
32+
"type": "feat",
33+
"release": "minor"
34+
},
35+
{
36+
"type": "fix",
37+
"release": "patch"
38+
},
39+
{
40+
"type": "perf",
41+
"release": "patch"
42+
},
43+
{
44+
"subject": "*",
45+
"release": "patch"
46+
}
47+
]
48+
}
49+
],
50+
"@semantic-release/release-notes-generator",
51+
"@semantic-release/npm",
52+
"@semantic-release/github"
53+
],
2254
"dryRun": false,
2355
"ci": true
2456
}

src/index.serverless.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
// Lightweight serverless version - requires resource loading at runtime
21
export * from 'libphonenumber-js'
2+
3+
import { type Document, deserialize } from 'bson'
34
import type { PhoneNumber } from 'libphonenumber-js'
5+
import { type LRU, lru } from 'tiny-lru'
46
import type { CarrierLocale, GeocoderLocale } from './locales'
5-
import { deserialize, type Document } from 'bson'
6-
import { lru, type LRU } from 'tiny-lru'
77

88
const DEFAULT_CACHE_SIZE = 100
99
let codeDataCache: LRU<Document> = lru<Document>(DEFAULT_CACHE_SIZE)
1010

1111
// Resource loader interface - platforms must implement this
1212
export interface ResourceLoader {
1313
loadResource(path: string): Promise<Uint8Array | null>
14+
1415
loadResourceSync?(path: string): Uint8Array | null
1516
}
1617

0 commit comments

Comments
 (0)