handlebars-i18n 1.10.0 → 1.10.1

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.
@@ -1,10 +1,7 @@
1
- name: CI
1
+ name: CI Build (manual)
2
2
 
3
3
  on:
4
- pull_request:
5
- push:
6
- release:
7
- types: [published]
4
+ workflow_dispatch:
8
5
 
9
6
  env:
10
7
  IMAGE_ID: ${{ github.repository }}
@@ -1,4 +1,4 @@
1
- name: Test and Coverage
1
+ name: CI Test and Coverage
2
2
 
3
3
  on:
4
4
  push:
@@ -13,10 +13,10 @@ jobs:
13
13
 
14
14
  - uses: actions/checkout@v3
15
15
 
16
- - name: Use Node.js 16.x
16
+ - name: Use Node.js 22.x
17
17
  uses: actions/setup-node@v3
18
18
  with:
19
- node-version: 16.x
19
+ node-version: 22.x
20
20
 
21
21
  - name: npm install, make test-coverage
22
22
  run: |
@@ -1,7 +1,7 @@
1
1
  # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
2
  # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3
3
 
4
- name: Node.js CI
4
+ name: CI Build 16, 18, 20
5
5
 
6
6
  on:
7
7
  push:
@@ -16,15 +16,15 @@ jobs:
16
16
 
17
17
  strategy:
18
18
  matrix:
19
- node-version: [14.x, 16.x, 18.x]
19
+ node-version: [ 16.x, 18.x, 20.x ]
20
20
  # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21
21
 
22
22
  steps:
23
- - uses: actions/checkout@v3
24
- - name: Use Node.js ${{ matrix.node-version }}
25
- uses: actions/setup-node@v3
26
- with:
27
- node-version: ${{ matrix.node-version }}
28
- cache: 'npm'
29
- - run: npm ci
30
- - run: npm run build --if-present
23
+ - uses: actions/checkout@v3
24
+ - name: Use Node.js ${{ matrix.node-version }}
25
+ uses: actions/setup-node@v3
26
+ with:
27
+ node-version: ${{ matrix.node-version }}
28
+ cache: 'npm'
29
+ - run: npm ci
30
+ - run: npm run build --if-present
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "handlebars-i18n",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "handlebars-i18n adds internationalization to handlebars.js using i18next and Intl.",
5
5
  "main": "dist/handlebars-i18n.js",
6
6
  "scripts": {
@@ -42,26 +42,27 @@
42
42
  "intl": "^1.2.5"
43
43
  },
44
44
  "devDependencies": {
45
- "@commitlint/cli": "17.6.1",
46
- "@commitlint/config-conventional": "16.2.1",
45
+ "@commitlint/cli": "20.2.0",
46
+ "@commitlint/config-conventional": "20.2.0",
47
47
  "@types/intl": "^1.2.2",
48
- "@types/node": "^24.7.0",
48
+ "@types/node": "^24.10.1",
49
49
  "c8": "^10.1.3",
50
- "chai": "4.3.6",
51
- "coveralls-next": "^4.2.1",
52
- "gulp": "5.0.0",
53
- "gulp-rename": "2.0.0",
50
+ "chai": "6.2.1",
51
+ "coveralls-next": "^6.0.1",
52
+ "glob": "^13.0.0",
53
+ "gulp": "5.0.1",
54
+ "gulp-rename": "2.1.0",
54
55
  "gulp-uglify": "3.0.2",
55
56
  "gulp-uglify-es": "3.0.0",
56
57
  "html-entities": "^2.6.0",
57
- "mocha": "10.7.3",
58
+ "mocha": "11.7.5",
58
59
  "mocha-lcov-reporter": "^1.3.0",
59
- "nyc": "15.1.0",
60
- "typescript": "^4.9.5"
60
+ "nyc": "17.1.0",
61
+ "typescript": "^5.9.3"
61
62
  },
62
63
  "dependencies": {
63
64
  "handlebars": "^4.7.8",
64
- "i18next": "^21.10.0",
65
+ "i18next": "^25.7.1",
65
66
  "intl": "^1.2.5",
66
67
  "relative-time-format": "^1.1.11"
67
68
  },
package/readme.md CHANGED
@@ -66,7 +66,7 @@ Usage in web browser (old school):
66
66
 
67
67
  Via CDN:
68
68
  ```javascript
69
- <script src="https://cdn.jsdelivr.net/npm/handlebars-i18n@1.10.0/dist/handlebars-i18n.min.js"></script>
69
+ <script src="https://cdn.jsdelivr.net/npm/handlebars-i18n@1.10.1/dist/handlebars-i18n.min.js"></script>
70
70
  ```
71
71
 
72
72
  ## Quick Example
@@ -349,14 +349,14 @@ Adds a time offset in a given unit to a date, returns the modified date.
349
349
 
350
350
  The first argument is a date (see function `_date` for valid date inputs). The second argument is a time amount given
351
351
  as number. The option **unit** specifies the time amount. Possible units
352
- are `"second"` | `"minute"` | `"hour"` | `"day"` | `"week"` | `"month"` | `"quarter"` |`"year"` (default is `"hour"`).
352
+ are `second` | `minute` | `hour` | `day` | `week` | `month` | `quarter` | `year` (default is `hour`).
353
353
  Further options as for function `_date` can be applied.
354
354
 
355
355
  ---
356
356
 
357
357
  ### `_dateDiff`
358
358
 
359
- Outputs the relative time difference between two given dates in the requested unit.
359
+ Outputs the time difference between two given dates in the requested unit.
360
360
 
361
361
  ```hbs
362
362
  {{_dateDiff "2000-12-17" "2001-12-17" unit="year"}}
@@ -365,7 +365,7 @@ Outputs the relative time difference between two given dates in the requested un
365
365
 
366
366
  The second date argument is subtracted from the first. If the difference is a positive value, a future event statement
367
367
  is made. A negative value refers to a past date. (If no second argument is given, the default date is the present moment).
368
- Allowed date input formats are similar to `_date`, options equal `_dateRel`. Default unit is `"hour"`.
368
+ Allowed date input formats are similar to `_date`, options equal `_dateRel`. Default unit is `hour`.
369
369
 
370
370
  ---
371
371
 
@@ -386,7 +386,7 @@ Outputs a string with a relative date statement, formatted according to the lang
386
386
  * output: en → **7 hours ago**
387
387
 
388
388
  A positive number argument leads to a future event statement, a negative refers to a past date. Possible units
389
- are `"second"` | `"minute"` | `"hour"` | `"day"` | `"week"` | `"month"` | `"quarter"` |`"year"` (default is `"hour"`).
389
+ are `second` | `minute` | `hour` | `day` | `week` | `month` | `quarter` | `year` (default is `hour`).
390
390
  For a complete set of options (such as `numberingSystem` or `localeMatcher`)
391
391
  see [Intl.RelativeTimeFormat Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
392
392
  Alternatively check this repo’s TS types in [handlebars-i18n.d.ts](./dist/handlebars-i18n.d.ts).