Skip to content

Commit 451d18f

Browse files
committed
ci stuff
1 parent b42afa8 commit 451d18f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [14, 16, 18, 20, 22]
14+
node-version: [18, 20, 22, 24]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ UrlSafeString.generate('München Straße');
104104
npm test
105105
```
106106

107+
## Compatibility
108+
109+
The source code (`url-safe-string.js`) is written in vanilla JavaScript (ES5/ES6 `const`/`let` only) with zero dependencies. It was originally written in 2016 for Node 4 and the runtime code still works all the way back to Node 4+. The `engines` field is set to `>=18` because the test runner (vitest) requires it, not the module itself.
110+
107111
## Upgrading
108112

109113
### v1.x to v2.0
@@ -112,13 +116,13 @@ The API is fully backwards compatible. No code changes are needed. The major ver
112116

113117
**Note on transliteration:** v2.0 transliterates accented characters by default (e.g. `ö` -> `oe`). In v1.x these characters were silently stripped. This means output may differ for inputs containing accented characters -- the new output is more correct and SEO-friendly. If you need the old behavior, set `transliterate: false`.
114118

115-
If you are on Node.js 14 or later (released 2020), v2.0 is a drop-in replacement:
119+
If you are on Node.js 18 or later, v2.0 is a drop-in replacement:
116120

117121
```bash
118122
npm install url-safe-string@latest
119123
```
120124

121-
If you need to support Node.js < 14, pin to v1.x:
125+
If you need to support Node.js < 18, pin to v1.x:
122126

123127
```bash
124128
npm install url-safe-string@1
@@ -136,9 +140,9 @@ npm install url-safe-string@1
136140
- Added ES Module support -- `import UrlSafeString from 'url-safe-string'` now works alongside `require()`
137141
- Added `exports` field for proper dual CJS/ESM package resolution
138142
- Added `files` field to keep the published package minimal
139-
- Minimum Node.js version bumped from 4 to 14
143+
- Minimum Node.js version bumped from 4 to 18
140144
- Switched test runner from Mocha to Vitest
141-
- Replaced Travis CI with GitHub Actions (testing Node 14, 16, 18, 20, 22)
145+
- Replaced Travis CI with GitHub Actions (testing Node 18, 20, 22, 24)
142146
- Improved npm discoverability with expanded keywords and description
143147
- Updated README with ESM/TypeScript usage examples and options table
144148

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "url-safe-string",
33
"version": "2.0.0",
44
"engines": {
5-
"node": ">=14"
5+
"node": ">=18"
66
},
77
"description": "Dependency free module to convert strings into URL-safe slugs. Use for routing, SEO, permalinks, or any place you need a clean, URL-friendly string.",
88
"main": "url-safe-string.js",

0 commit comments

Comments
 (0)