Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm i
- run: npm run lint
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 26
- run: npm i
- run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 26
- run: npm i
- run: npm t
- run: npm t -- --allow-incomplete-coverage
40 changes: 21 additions & 19 deletions .github/workflows/test-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,26 @@ jobs:
fail-fast: false
matrix:
container:
# Official Node.js images.
- node:12
- node:14
- node:16
# RHEL Node.js builds are icu_small without installing the
# optional nodejs-full-i18n rpm.
- registry.access.redhat.com/ubi8/nodejs-12
- registry.access.redhat.com/ubi8/nodejs-14
# - registry.access.redhat.com/ubi8/nodejs-16
- node:12-slim
# Official Node.js images.
- node:22
- node:24
- node:26
# RHEL Node.js builds are icu_small without installing the
# optional nodejs-full-i18n rpm.
- registry.access.redhat.com/ubi8/nodejs-22
- registry.access.redhat.com/ubi8/nodejs-24
#- registry.access.redhat.com/ubi8/nodejs-26
- node:22-slim
- node:24-slim
- node:26-slim
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: nodejs/full-icu-test
path: full-icu-test
- name: Install full-icu
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} npm i --no-package-lock --unsafe-perm
- name: Test full-icu
run: docker run --rm -e NODE_ICU_DATA=. -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} node ./full-icu-test/test.js
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: nodejs/full-icu-test
path: full-icu-test
- name: Install full-icu
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} npm i --no-package-lock --unsafe-perm
- name: Test full-icu
run: docker run --rm -e NODE_ICU_DATA=. -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} node ./full-icu-test/test.js
30 changes: 18 additions & 12 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,23 @@ jobs:
fail-fast: false
matrix:
container:
- node:12
- node:12-slim
# Will fail on versions that aren't in icu4c-data
- node:22
- node:22-slim
- node:24
- node:24-slim
- node:26
- node:26-slim
#- node:27
#- node:27-slim
# Will fail on versions that aren't in icu4c-data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: nodejs/full-icu-test
path: full-icu-test
- name: Install full-icu
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} env FULL_ICU_PREFER_NPM=1 npm i --no-package-lock --unsafe-perm
- name: Test full-icu
run: docker run --rm -e NODE_ICU_DATA=. -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} node ./full-icu-test/test.js
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: nodejs/full-icu-test
path: full-icu-test
- name: Install full-icu
run: docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} env FULL_ICU_PREFER_NPM=1 npm i --no-package-lock --unsafe-perm
- name: Test full-icu
run: docker run --rm -e NODE_ICU_DATA=. -v $(pwd):/usr/src/app -w /usr/src/app ${{ matrix.container }} node ./full-icu-test/test.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ npm-debug.log
/yarn.lock
package-lock.json
/.nyc_output
/.tap
7 changes: 7 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import globals from 'globals'
import { defineConfig } from 'eslint/config'

export default defineConfig([
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
{ files: ['**/*.{js,mjs,cjs}'], languageOptions: { globals: globals.node } }
])
3 changes: 1 addition & 2 deletions full-icu.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (C) 2015 IBM Corporation and Others. All Rights Reserved.

// var process = require('process');
// console.dir(process.env);
// const process = require('process')

const fs = require('fs')
const path = require('path')
Expand Down
11 changes: 6 additions & 5 deletions install-gh-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ module.exports = async function installFromGithub (fullIcu, advice) {
const _baseUrl = process.env.FULL_ICU_BASEURL || 'https://github.com/unicode-org/icu/releases/'
const baseUrl = new URL(_baseUrl)
const versionsAsHyphen = fullIcu.icuver.replace(/\./g, '-')
// ICU v67/v68 use "68.1" and "67.1" in the filename instead of 68_1 and 69_1
// ICU v67/v68 use "68.1" and "67.1" in the filename instead of 68_1 and 67_1
// ICU v69-v77 use underscores in the filename and hyphens in the tag
// ICU >= v78 reverted to dots in both the release tag and filename
// https://unicode-org.atlassian.net/browse/ICU-21764
// Can remove this conditional if the files are updated later.
const versionsAsUnderscore = (fullIcu.icumaj >= 69) ? fullIcu.icuver.replace(/\./g, '_') : fullIcu.icuver
const tag = `release-${versionsAsHyphen}`
const file = `icu4c-${versionsAsUnderscore}-data-bin-${icuend}.zip`
const versionInFilename = (fullIcu.icumaj >= 78) ? fullIcu.icuver : (fullIcu.icumaj >= 69) ? fullIcu.icuver.replace(/\./g, '_') : fullIcu.icuver
const tag = (fullIcu.icumaj >= 78) ? `release-${fullIcu.icuver}` : `release-${versionsAsHyphen}`
const file = `icu4c-${versionInFilename}-data-bin-${icuend}.zip`
const fullUrl = new URL(`./download/${tag}/${file}`, baseUrl)
console.log(fullUrl.toString())
const [srcZip, tmpd] = await myFetch(fullUrl)
Expand Down
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@
"yauzl": "^2.10.0"
},
"devDependencies": {
"eslint": "^8.44.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"standard": "^16.0.3",
"tap": "^16.3.4"
"@eslint/js": "^10.0.1",
"eslint": "^10.5.0",
"globals": "^17.6.0",
"standard": "^17.1.2",
"tap": "^21.7.4"
}
}
Loading