Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.
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
File renamed without changes.
5 changes: 2 additions & 3 deletions .mocharc.js → .mocharc.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
module.exports = {
require: ['ts-node/register/transpile-only'],
loader: ['./.pnp.loader.mjs'],
ignore: [
// Never look for test files in these folders
'**/build/**/*',
'.yarn/**/*',
'**/node_modules/**/*',
],
extension: ['ts'],
extension: ['js'],
reporter: 'spec',
reporterOptions: {
configFile: 'mocha-reporter-config.json',
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/arg-npm-4.1.3-1748b966a8-969b491082.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-19706e7e35-10.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/yn-npm-3.1.1-8ad4259784-2c487b0e14.zip
Binary file not shown.
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
"author": "Transcend Inc.",
"name": "@transcend-io/internationalization",
"description": "Internationalization configuration for the monorepo",
"version": "2.3.2",
"version": "3.0.0",
"homepage": "https://github.com/transcend-io/internationalization",
"repository": {
"type": "git",
"url": "https://github.com/transcend-io/internationalization.git"
},
"license": "MIT",
"main": "build/index",
"type": "module",
"main": "build/index.js",
"exports": {
".": {
"import": "./build/index.js",
"types": "./build/index.d.ts"
}
},
"files": [
"build/**/*",
"package.json"
Expand All @@ -21,7 +28,7 @@
"clean": "yarn tsc --build --clean",
"lint": "yarn eslint src --ext .ts",
"prepublish": "yarn build",
"test": "yarn mocha './src/**/*.test.ts'"
"test": "yarn build && yarn mocha './build/tests/**/*.test.js'"
},
"devDependencies": {
"@types/chai": "^4.3.0",
Expand All @@ -39,7 +46,6 @@
"eslint-plugin-jsdoc": "^37.9.4",
"mocha": "^9.2.1",
"prettier": "^3.1.0",
"ts-node": "^10.5.0",
"typescript": "^4.9.5"
},
"packageManager": "yarn@4.12.0"
Expand Down
2 changes: 1 addition & 1 deletion src/defineMessages.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// local
import { DefinedMessage } from './types';
import { DefinedMessage } from './types.js';

/**
* Defined messages
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './enums';
export * from './types';
export * from './typeGuards';
export * from './defineMessages';
export * from './enums.js';
export * from './types.js';
export * from './typeGuards.js';
export * from './defineMessages.js';
2 changes: 1 addition & 1 deletion src/tests/defineMessages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { expect } from 'chai';

// global
import { defineMessages } from '../index';
import { defineMessages } from '../index.js';

describe('defineMessages', () => {
it('ensure defineMessages returns identity', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/typeGuards.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LocaleValue, LOCALE_KEY } from './enums';
import { LocaleValue, LOCALE_KEY } from './enums.js';

// The valid actions indexed by type
const VALID_LOCALES: { [k in string]: LocaleValue } = {};
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// local
import type { LocaleValue } from './enums';
import type { LocaleValue } from './enums.js';

/**
* Translations map from message id to translation string
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* Basic Options */
"incremental": true,
"target": "es2019",
"module": "commonjs",
"module": "Node16",
"lib": ["esnext", "dom"],
"allowJs": false,
"checkJs": false, // speeds up webpack and tsc
Expand All @@ -21,7 +21,7 @@
"noFallthroughCasesInSwitch": true,

/* Module Resolution Options */
"moduleResolution": "node",
"moduleResolution": "node16",
"baseUrl": ".",
"typeRoots": ["@types", "node_modules/@types"],
"esModuleInterop": true,
Expand Down
140 changes: 0 additions & 140 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,6 @@ __metadata:
languageName: node
linkType: hard

"@cspotcode/source-map-consumer@npm:0.8.0":
version: 0.8.0
resolution: "@cspotcode/source-map-consumer@npm:0.8.0"
checksum: 10/dfe1399712e4d54e1d53b0c7782f929647ff8675c37ae7637ce2ffdbcc8bad06fea969bcbec6147e7ea70a89257cfc86695a3702c1946a1c334454480937b966
languageName: node
linkType: hard

"@cspotcode/source-map-support@npm:0.7.0":
version: 0.7.0
resolution: "@cspotcode/source-map-support@npm:0.7.0"
dependencies:
"@cspotcode/source-map-consumer": "npm:0.8.0"
checksum: 10/d58b31640c4b1438c0caf8ed7eb46647674c042a625919660d9fb2d76f3621875520082934bae88ef54a75d53e8f9cafb506160bb02403a19e7155aa5f4ac59b
languageName: node
linkType: hard

"@es-joy/jsdoccomment@npm:~0.20.1":
version: 0.20.1
resolution: "@es-joy/jsdoccomment@npm:0.20.1"
Expand Down Expand Up @@ -336,39 +320,10 @@ __metadata:
eslint-plugin-jsdoc: "npm:^37.9.4"
mocha: "npm:^9.2.1"
prettier: "npm:^3.1.0"
ts-node: "npm:^10.5.0"
typescript: "npm:^4.9.5"
languageName: unknown
linkType: soft

"@tsconfig/node10@npm:^1.0.7":
version: 1.0.8
resolution: "@tsconfig/node10@npm:1.0.8"
checksum: 10/b8d5fffbc6b17ef64ef74f7fdbccee02a809a063ade785c3648dae59406bc207f70ea2c4296f92749b33019fa36a5ae716e42e49cc7f1bbf0fd147be0d6b970a
languageName: node
linkType: hard

"@tsconfig/node12@npm:^1.0.7":
version: 1.0.9
resolution: "@tsconfig/node12@npm:1.0.9"
checksum: 10/a01b2400ab3582b86b589c6d31dcd0c0656f333adecde85d6d7d4086adb059808b82692380bb169546d189bf771ae21d02544a75b57bd6da4a5dd95f8567bec9
languageName: node
linkType: hard

"@tsconfig/node14@npm:^1.0.0":
version: 1.0.1
resolution: "@tsconfig/node14@npm:1.0.1"
checksum: 10/976345e896c0f059867f94f8d0f6ddb8b1844fb62bf36b727de8a9a68f024857e5db97ed51d3325e23e0616a5e48c034ff51a8d595b3fe7e955f3587540489be
languageName: node
linkType: hard

"@tsconfig/node16@npm:^1.0.2":
version: 1.0.2
resolution: "@tsconfig/node16@npm:1.0.2"
checksum: 10/ca94d3639714672bbfd55f03521d3f56bb6a25479bd425da81faf21f13e1e9d15f40f97377dedbbf477a5841c5b0c8f4cd1b391f33553d750b9202c54c2c07aa
languageName: node
linkType: hard

"@types/cacheable-request@npm:^6.0.1":
version: 6.0.2
resolution: "@types/cacheable-request@npm:6.0.2"
Expand Down Expand Up @@ -795,22 +750,6 @@ __metadata:
languageName: node
linkType: hard

"acorn-walk@npm:^8.1.1":
version: 8.2.0
resolution: "acorn-walk@npm:8.2.0"
checksum: 10/e69f7234f2adfeb16db3671429a7c80894105bd7534cb2032acf01bb26e6a847952d11a062d071420b43f8d82e33d2e57f26fe87d9cce0853e8143d8910ff1de
languageName: node
linkType: hard

"acorn@npm:^8.4.1":
version: 8.5.0
resolution: "acorn@npm:8.5.0"
bin:
acorn: bin/acorn
checksum: 10/b1584b6c3613a3f4e092d4a015b293515b93c92a156de0653dc263777b889cfa1648ba2aefec0ca2dcebd2cde2d6a508ae4db7231d4abf2687e71dddeb7c72cd
languageName: node
linkType: hard

"acorn@npm:^8.9.0":
version: 8.14.1
resolution: "acorn@npm:8.14.1"
Expand Down Expand Up @@ -928,13 +867,6 @@ __metadata:
languageName: node
linkType: hard

"arg@npm:^4.1.0":
version: 4.1.3
resolution: "arg@npm:4.1.3"
checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599
languageName: node
linkType: hard

"argparse@npm:^1.0.7":
version: 1.0.10
resolution: "argparse@npm:1.0.10"
Expand Down Expand Up @@ -1354,13 +1286,6 @@ __metadata:
languageName: node
linkType: hard

"create-require@npm:^1.1.0":
version: 1.1.1
resolution: "create-require@npm:1.1.1"
checksum: 10/a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff
languageName: node
linkType: hard

"cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.6
resolution: "cross-spawn@npm:7.0.6"
Expand Down Expand Up @@ -1523,13 +1448,6 @@ __metadata:
languageName: node
linkType: hard

"diff@npm:^4.0.1":
version: 4.0.2
resolution: "diff@npm:4.0.2"
checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069
languageName: node
linkType: hard

"diff@npm:^5.1.0":
version: 5.2.0
resolution: "diff@npm:5.2.0"
Expand Down Expand Up @@ -2946,13 +2864,6 @@ __metadata:
languageName: node
linkType: hard

"make-error@npm:^1.1.1":
version: 1.3.6
resolution: "make-error@npm:1.3.6"
checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402
languageName: node
linkType: hard

"make-fetch-happen@npm:^9.1.0":
version: 9.1.0
resolution: "make-fetch-happen@npm:9.1.0"
Expand Down Expand Up @@ -4141,43 +4052,6 @@ __metadata:
languageName: node
linkType: hard

"ts-node@npm:^10.5.0":
version: 10.5.0
resolution: "ts-node@npm:10.5.0"
dependencies:
"@cspotcode/source-map-support": "npm:0.7.0"
"@tsconfig/node10": "npm:^1.0.7"
"@tsconfig/node12": "npm:^1.0.7"
"@tsconfig/node14": "npm:^1.0.0"
"@tsconfig/node16": "npm:^1.0.2"
acorn: "npm:^8.4.1"
acorn-walk: "npm:^8.1.1"
arg: "npm:^4.1.0"
create-require: "npm:^1.1.0"
diff: "npm:^4.0.1"
make-error: "npm:^1.1.1"
v8-compile-cache-lib: "npm:^3.0.0"
yn: "npm:3.1.1"
peerDependencies:
"@swc/core": ">=1.2.50"
"@swc/wasm": ">=1.2.50"
"@types/node": "*"
typescript: ">=2.7"
peerDependenciesMeta:
"@swc/core":
optional: true
"@swc/wasm":
optional: true
bin:
ts-node: dist/bin.js
ts-node-cwd: dist/bin-cwd.js
ts-node-script: dist/bin-script.js
ts-node-transpile-only: dist/bin-transpile.js
ts-script: dist/bin-script-deprecated.js
checksum: 10/39e500985f54a2cb9ed2d7e1b535a34edf1701c72ebe0a1da102bfad3c01632043441f2703bf243510d33b0a15fa5ff2e2d3dbcea56b0748dfffb677c7970c7b
languageName: node
linkType: hard

"tsconfig-paths@npm:^3.12.0":
version: 3.12.0
resolution: "tsconfig-paths@npm:3.12.0"
Expand Down Expand Up @@ -4323,13 +4197,6 @@ __metadata:
languageName: node
linkType: hard

"v8-compile-cache-lib@npm:^3.0.0":
version: 3.0.0
resolution: "v8-compile-cache-lib@npm:3.0.0"
checksum: 10/90cfbe591c47e0b69c3ddf6b224dd3cfd4e00e67aedd71c35896d5edf72312410cf223230048176a93d6621c78c00e38b9f62edbe125b2454484a84f3092f7e7
languageName: node
linkType: hard

"which-boxed-primitive@npm:^1.0.2":
version: 1.0.2
resolution: "which-boxed-primitive@npm:1.0.2"
Expand Down Expand Up @@ -4457,13 +4324,6 @@ __metadata:
languageName: node
linkType: hard

"yn@npm:3.1.1":
version: 3.1.1
resolution: "yn@npm:3.1.1"
checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6
languageName: node
linkType: hard

"yocto-queue@npm:^0.1.0":
version: 0.1.0
resolution: "yocto-queue@npm:0.1.0"
Expand Down
Loading