New Upstream Release - node-lcid

Ready changes

Summary

Merged new upstream version: 4.0.1 (was: 4.0.0).

Resulting package

Built on 2023-03-15T15:23 (took 3m24s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases node-lcid

Lintian Result

Diff

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6313b56
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
diff --git a/.github/funding.yml b/.github/funding.yml
new file mode 100644
index 0000000..2bd8d61
--- /dev/null
+++ b/.github/funding.yml
@@ -0,0 +1,4 @@
+github: sindresorhus
+open_collective: sindresorhus
+tidelift: npm/lcid
+custom: https://sindresorhus.com/donate
diff --git a/.github/security.md b/.github/security.md
new file mode 100644
index 0000000..5358dc5
--- /dev/null
+++ b/.github/security.md
@@ -0,0 +1,3 @@
+# Security Policy
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..d50ada6
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,22 @@
+name: CI
+on:
+  - push
+  - pull_request
+jobs:
+  test:
+    name: Node.js ${{ matrix.node-version }}
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        node-version:
+          - 18
+          - 16
+          - 14
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-node@v3
+        with:
+          node-version: ${{ matrix.node-version }}
+      - run: npm install
+      - run: npm test
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..239ecff
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+node_modules
+yarn.lock
diff --git a/debian/changelog b/debian/changelog
index f92f06d..0c8663b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+node-lcid (4.0.1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Wed, 15 Mar 2023 15:20:51 -0000
+
 node-lcid (3.1.1-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/debian/patches/replace-ava-by-tape.diff b/debian/patches/replace-ava-by-tape.diff
index f297f78..cd06954 100644
--- a/debian/patches/replace-ava-by-tape.diff
+++ b/debian/patches/replace-ava-by-tape.diff
@@ -3,8 +3,10 @@ Author: Xavier Guimard <yadd@debian.org>
 Forwarded: not-needed
 Last-Update: 2020-10-29
 
---- a/test.js
-+++ b/test.js
+Index: node-lcid.git/test.js
+===================================================================
+--- node-lcid.git.orig/test.js
++++ node-lcid.git/test.js
 @@ -1,27 +1,33 @@
 -import test from 'ava';
 -import lcid from '.';
diff --git a/index.d.ts b/index.d.ts
index 8ac9161..9276ea5 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -2,37 +2,37 @@ import lcidCodes = require('./lcid.json');
 
 declare const lcid: {
 	/**
-	Get a [standard locale identifier](https://en.wikipedia.org/wiki/Locale_(computer_software)) from a [Windows locale identifier (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
+	Get a [standard locale identifier](https://en.wikipedia.org/wiki/Locale_(computer_software)) from a [Windows locale identifier (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
 
 	@example
 	```
-	import lcid = require('lcid');
+	import lcid from 'lcid';
 
 	lcid.from(1044);
 	//=> 'nb_NO'
 	```
 	*/
-	from(lcidCode: number): string;
+	from(lcidCode: number): string | undefined;
 
 	/**
 	Get a [Windows locale identifier (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) from a [standard locale identifier](https://en.wikipedia.org/wiki/Locale_(computer_software)).
 
 	@example
 	```
-	import lcid = require('lcid');
+	import lcid from 'lcid';
 
 	lcid.to('nb_NO');
 	//=> 1044
 	```
 	*/
-	to(localeId: string): number;
+	to(localeId: string): number | undefined;
 
 	/**
-	Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
+	Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
 
 	@example
 	```
-	import lcid = require('lcid');
+	import lcid from 'lcid';
 
 	lcid.all;
 	//=> {'af_ZA': 1078, …}
diff --git a/index.test-d.ts b/index.test-d.ts
index d9f9901..1792783 100644
--- a/index.test-d.ts
+++ b/index.test-d.ts
@@ -2,7 +2,7 @@ import {expectType} from 'tsd';
 import lcid = require('.');
 import lcidJson = require('./lcid.json');
 
-expectType<number>(lcid.to('nb_NO'));
-expectType<string>(lcid.from(1044));
+expectType<number | undefined>(lcid.to('nb_NO'));
+expectType<string | undefined>(lcid.from(1044));
 expectType<{readonly [key: string]: string}>(lcid.all);
 expectType<{readonly [key: string]: string}>(lcidJson);
diff --git a/lcid.json b/lcid.json
index 965475a..7259d58 100644
--- a/lcid.json
+++ b/lcid.json
@@ -9,7 +9,7 @@
 	"1031": "de_DE",
 	"1032": "el_GR",
 	"1033": "en_US",
-  	"1034": "es_ES",
+	"1034": "es_ES",
 	"1035": "fi_FI",
 	"1036": "fr_FR",
 	"1037": "he_IL",
@@ -46,7 +46,10 @@
 	"1069": "eu_ES",
 	"1070": "wen_DE",
 	"1071": "mk_MK",
+	"1072": "st_ZA",
+	"1073": "ts_ZA",
 	"1074": "tn_ZA",
+	"1075": "ven_ZA",
 	"1076": "xh_ZA",
 	"1077": "zu_ZA",
 	"1078": "af_ZA",
@@ -55,6 +58,8 @@
 	"1081": "hi_IN",
 	"1082": "mt_MT",
 	"1083": "se_NO",
+	"1084": "gd_GB",
+	"1085": "yi",
 	"1086": "ms_MY",
 	"1087": "kk_KZ",
 	"1088": "ky_KG",
@@ -80,15 +85,21 @@
 	"1109": "my_MM",
 	"1110": "gl_ES",
 	"1111": "kok_IN",
+	"1113": "sd_IN",
 	"1114": "syr_SY",
 	"1115": "si_LK",
+	"1116": "chr_US",
 	"1118": "am_ET",
+	"1119": "tmz",
 	"1121": "ne_NP",
 	"1122": "fy_NL",
 	"1123": "ps_AF",
 	"1124": "fil_PH",
 	"1125": "div_MV",
+	"1126": "bin_NG",
+	"1127": "fuv_NG",
 	"1128": "ha_NG",
+	"1129": "ibb_NG",
 	"1130": "yo_NG",
 	"1131": "quz_BO",
 	"1132": "ns_ZA",
@@ -119,6 +130,8 @@
 	"2067": "nl_BE",
 	"2068": "nn_NO",
 	"2070": "pt_PT",
+	"2072": "ro_MD",
+	"2073": "ru_MD",
 	"2077": "sv_FI",
 	"2080": "ur_IN",
 	"2092": "az_AZ",
@@ -131,7 +144,9 @@
 	"2129": "bo_BT",
 	"2141": "iu_CA",
 	"2143": "tmz_DZ",
+	"2145": "ne_IN",
 	"2155": "quz_EC",
+	"2163": "ti_ET",
 	"3073": "ar_EG",
 	"3076": "zh_HK",
 	"3079": "de_AT",
@@ -164,38 +179,50 @@
 	"7169": "ar_TN",
 	"7177": "en_ZA",
 	"7178": "es_DO",
+	"7180": "fr_029",
 	"7194": "sr_BA",
 	"7227": "sma_SE",
 	"8193": "ar_OM",
 	"8201": "en_JA",
 	"8202": "es_VE",
+	"8204": "fr_RE",
 	"8218": "bs_BA",
 	"8251": "sms_FI",
 	"9217": "ar_YE",
 	"9225": "en_CB",
 	"9226": "es_CO",
+	"9228": "fr_CG",
 	"9275": "smn_FI",
 	"10241": "ar_SY",
 	"10249": "en_BZ",
 	"10250": "es_PE",
+	"10252": "fr_SN",
 	"11265": "ar_JO",
 	"11273": "en_TT",
 	"11274": "es_AR",
+	"11276": "fr_CM",
 	"12289": "ar_LB",
 	"12297": "en_ZW",
 	"12298": "es_EC",
+	"12300": "fr_CI",
 	"13313": "ar_KW",
 	"13321": "en_PH",
 	"13322": "es_CL",
+	"13324": "fr_ML",
 	"14337": "ar_AE",
+	"14345": "en_ID",
 	"14346": "es_UR",
+	"14348": "fr_MA",
 	"15361": "ar_BH",
+	"15369": "en_HK",
 	"15370": "es_PY",
+	"15372": "fr_HT",
 	"16385": "ar_QA",
+	"16393": "en_IN",
 	"16394": "es_BO",
 	"17417": "en_MY",
 	"17418": "es_SV",
-	"18441": "en_IN",
+	"18441": "en_SG",
 	"18442": "es_HN",
 	"19466": "es_NI",
 	"20490": "es_PR",
diff --git a/license b/license
index e7af2f7..fa7ceba 100644
--- a/license
+++ b/license
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
diff --git a/package.json b/package.json
index a5661c5..b15ecc1 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,21 @@
 {
 	"name": "lcid",
-	"version": "3.1.1",
+	"version": "4.0.1",
 	"description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)",
 	"license": "MIT",
 	"repository": "sindresorhus/lcid",
+	"funding": "https://github.com/sponsors/sindresorhus",
 	"author": {
 		"name": "Sindre Sorhus",
 		"email": "sindresorhus@gmail.com",
-		"url": "sindresorhus.com"
+		"url": "https://sindresorhus.com"
+	},
+	"exports": {
+		"types": "./index.d.ts",
+		"default": "./index.js"
 	},
 	"engines": {
-		"node": ">=8"
+		"node": ">=14.16"
 	},
 	"scripts": {
 		"test": "xo && ava && tsd"
@@ -45,5 +50,11 @@
 		"ava": "^1.4.1",
 		"tsd": "^0.7.2",
 		"xo": "^0.24.0"
+	},
+	"xo": {
+		"rules": {
+			"import/extensions": "off",
+			"import/no-unresolved": "off"
+		}
 	}
 }
diff --git a/readme.md b/readme.md
index 15a79bc..e95b38b 100644
--- a/readme.md
+++ b/readme.md
@@ -1,23 +1,19 @@
-# lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid)
+# lcid
 
 > Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms)
 
-Based on the [mapping](https://github.com/python/cpython/blob/8f7bb100d0fa7fb2714f3953b5b627878277c7c6/Lib/locale.py#L1465-L1674) used in the Python standard library.
-
 The mapping itself is just a [JSON file](lcid.json) and can be used anywhere.
 
-
 ## Install
 
-```
+```sh
 $ npm install lcid
 ```
 
-
 ## Usage
 
 ```js
-const lcid = require('lcid');
+import lcid from 'lcid';
 
 lcid.from(1044);
 //=> 'nb_NO'
@@ -28,16 +24,3 @@ lcid.to('nb_NO');
 lcid.all;
 //=> {'af_ZA': 1078, …}
 ```
-
-
----
-
-<div align="center">
-	<b>
-		<a href="https://tidelift.com/subscription/pkg/npm-lcid?utm_source=npm-lcid&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
-	</b>
-	<br>
-	<sub>
-		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
-	</sub>
-</div>

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details