@forge/i18n
0.0.70.0.7-experimental-04cc2b9
~
Modified (12 files)
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/i18n",
- "version": "0.0.7",
+ "version": "0.0.7-experimental-04cc2b9",
"description": "Common utilities and typings for Forge i18n support",
"author": "Atlassian",
"license": "SEE LICENSE IN LICENSE.txt",
"main": "out/index.js",
@@ -15,10 +15,19 @@
"lodash": "^4.17.21"
},
"devDependencies": {
"@types/jest": "^29.5.14",
- "jest": "^29.7.0"
+ "jest": "^29.7.0",
+ "typescript": "5.9.2"
},
"publishConfig": {
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
+ },
+ "peerDependencies": {
+ "typescript": ">=5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
}
} Index: package/out/constants.d.ts.map
===================================================================
--- package/out/constants.d.ts.map
+++ package/out/constants.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD,eAAO,MAAM,4BAA4B,qPA2B/B,CAAC;AAEX,oBAAY,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD,eAAO,MAAM,4BAA4B,qPA2B/B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC"}
\ No newline at end of file Index: package/out/ensureLocale.d.ts.map
===================================================================
--- package/out/ensureLocale.d.ts.map
+++ package/out/ensureLocale.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"ensureLocale.d.ts","sourceRoot":"","sources":["../src/ensureLocale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAuBxD,eAAO,MAAM,YAAY,cAAe,MAAM,KAAG,wBAAwB,GAAG,IAO3E,CAAC"}
\ No newline at end of file
+{"version":3,"file":"ensureLocale.d.ts","sourceRoot":"","sources":["../src/ensureLocale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAuBxD,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,KAAG,wBAAwB,GAAG,IAO3E,CAAC"}
\ No newline at end of file Index: package/out/moduleI18nHelper.d.ts.map
===================================================================
--- package/out/moduleI18nHelper.d.ts.map
+++ package/out/moduleI18nHelper.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"moduleI18nHelper.d.ts","sourceRoot":"","sources":["../src/moduleI18nHelper.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC,CAAC;AAuC1D,aAAK,WAAW,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAEnF,eAAO,MAAM,6BAA6B,YAAa,OAAO,KAAG,WAAW,EAa3E,CAAC;AAGF,eAAO,MAAM,0BAA0B,YAAa,OAAO,KAAG,MAAM,EAWnE,CAAC;AAEF,aAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,EAAE,CAAC;AAEJ,eAAO,MAAM,gCAAgC,YAAa,OAAO,yBAWhE,CAAC"}
\ No newline at end of file
+{"version":3,"file":"moduleI18nHelper.d.ts","sourceRoot":"","sources":["../src/moduleI18nHelper.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC,CAAC;AAuC1D,KAAK,WAAW,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAEnF,eAAO,MAAM,6BAA6B,GAAI,SAAS,OAAO,KAAG,WAAW,EAa3E,CAAC;AAGF,eAAO,MAAM,0BAA0B,GAAI,SAAS,OAAO,KAAG,MAAM,EAWnE,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,EAAE,CAAC;AAEJ,eAAO,MAAM,gCAAgC,GAAI,SAAS,OAAO,KAAG,oBAWnE,CAAC"}
\ No newline at end of file Index: package/out/translationValueGetter.d.ts.map
===================================================================
--- package/out/translationValueGetter.d.ts.map
+++ package/out/translationValueGetter.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"translationValueGetter.d.ts","sourceRoot":"","sources":["../src/translationValueGetter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,UAAU,kBAAkB;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAC;CAC5C;AAED,aAAK,8BAA8B,GAAG;KACnC,GAAG,IAAI,wBAAwB,CAAC,CAAC,EAAE,kBAAkB;CACvD,CAAC;AAIF,eAAO,MAAM,mBAAmB,sBACX,8BAA8B,WACxC,MAAM,UACP,wBAAwB,KAC/B,MAAM,GAAG,IAMX,CAAC;AAEF,eAAO,MAAM,8BAA8B,uBACrB,kBAAkB,WAC7B,MAAM,KACd,MAAM,GAAG,IAUX,CAAC"}
\ No newline at end of file
+{"version":3,"file":"translationValueGetter.d.ts","sourceRoot":"","sources":["../src/translationValueGetter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,UAAU,kBAAkB;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAC;CAC5C;AAED,KAAK,8BAA8B,GAAG;KACnC,GAAG,IAAI,wBAAwB,CAAC,CAAC,EAAE,kBAAkB;CACvD,CAAC;AAIF,eAAO,MAAM,mBAAmB,GAC9B,mBAAmB,8BAA8B,EACjD,SAAS,MAAM,EACf,QAAQ,wBAAwB,KAC/B,MAAM,GAAG,IAMX,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACzC,oBAAoB,kBAAkB,EACtC,SAAS,MAAM,KACd,MAAM,GAAG,IAUX,CAAC"}
\ No newline at end of file Index: package/out/types.d.ts.map
===================================================================
--- package/out/types.d.ts.map
+++ package/out/types.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC,aAAK,qBAAqB,GAAG;IAC3B;QACE,GAAG,EAAE,wBAAwB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC;KACd;IACD,GAAG;QACD,GAAG,EAAE,wBAAwB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC;KACd,EAAE;CACJ,CAAC;AAEF,aAAK,oBAAoB,GAAG;KACzB,GAAG,IAAI,wBAAwB,CAAC,CAAC,EAAE,wBAAwB,EAAE;CAC/D,GAAG;IACF,OAAO,EAAE,wBAAwB,CAAC;CACnC,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,qBAAqB,CAAC;IACjC,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,aAAK,oBAA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ACvB,YAAY,EAAE,oBAAoB,CAAC;IACnC,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
\ No newline at end of file Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,12 @@
# @forge/i18n
+## 0.0.7-experimental-04cc2b9
+
+### Major Changes
+
+- d9ef926: Adds support for TypeScript 5
+
## 0.0.7
### Patch Changes Index: package/out/constants.d.ts
===================================================================
--- package/out/constants.d.ts
+++ package/out/constants.d.ts
@@ -1,5 +1,5 @@
export declare const I18N_INFO_FILE_NAME = "i18n-info.json";
export declare const I18N_BUNDLE_FOLDER_NAME = "__LOCALES__";
export declare const FORGE_SUPPORTED_LOCALE_CODES: readonly ["zh-CN", "zh-TW", "cs-CZ", "da-DK", "nl-NL", "en-US", "en-GB", "et-EE", "fi-FI", "fr-FR", "de-DE", "hu-HU", "is-IS", "it-IT", "ja-JP", "ko-KR", "no-NO", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "tr-TR", "es-ES", "sv-SE"];
-export declare type ForgeSupportedLocaleCode = (typeof FORGE_SUPPORTED_LOCALE_CODES)[number];
+export type ForgeSupportedLocaleCode = (typeof FORGE_SUPPORTED_LOCALE_CODES)[number];
//# sourceMappingURL=constants.d.ts.map
\ No newline at end of file Index: package/out/moduleI18nHelper.d.ts
===================================================================
--- package/out/moduleI18nHelper.d.ts
+++ package/out/moduleI18nHelper.d.ts
@@ -1,9 +1,9 @@
-export declare type Modules = Record<string, unknown | unknown[]>;
-declare type ModuleEntry = [moduleEntryObject: Record<string, unknown>, moduleKey: string];
+export type Modules = Record<string, unknown | unknown[]>;
+type ModuleEntry = [moduleEntryObject: Record<string, unknown>, moduleKey: string];
export declare const getI18nSupportedModuleEntries: (modules: Modules) => ModuleEntry[];
export declare const extractI18nKeysFromModules: (modules: Modules) => string[];
-declare type ModuleI18nProperties = {
+type ModuleI18nProperties = {
propertyPath: string[];
moduleName: string;
key: string;
}[]; Index: package/out/translationValueGetter.d.ts
===================================================================
--- package/out/translationValueGetter.d.ts
+++ package/out/translationValueGetter.d.ts
@@ -1,9 +1,9 @@
import { ForgeSupportedLocaleCode } from './types';
interface TranslationContent {
[key: string]: string | TranslationContent;
}
-declare type TranslationContentByLocaleCode = {
+type TranslationContentByLocaleCode = {
[key in ForgeSupportedLocaleCode]?: TranslationContent;
};
export declare const getTranslationValue: (translationLookup: TranslationContentByLocaleCode, i18nKey: string, locale: ForgeSupportedLocaleCode) => string | null;
export declare const getTranslationValueFromContent: (translationContent: TranslationContent, i18nKey: string) => string | null; Index: package/out/types.d.ts
===================================================================
--- package/out/types.d.ts
+++ package/out/types.d.ts
@@ -1,7 +1,7 @@
import { type ForgeSupportedLocaleCode } from './constants';
export { ForgeSupportedLocaleCode };
-declare type TranslationsResources = [
+type TranslationsResources = [
{
key: ForgeSupportedLocaleCode;
path: string;
},
@@ -9,18 +9,18 @@
key: ForgeSupportedLocaleCode;
path: string;
}[]
];
-declare type TranslationsFallback = {
+type TranslationsFallback = {
[key in ForgeSupportedLocaleCode]?: ForgeSupportedLocaleCode[];
} & {
default: ForgeSupportedLocaleCode;
};
export interface Translations {
resources: TranslationsResources;
fallback: TranslationsFallback;
}
-declare type I18nInfoTranslations = Record<string, {
+type I18nInfoTranslations = Record<string, {
[key in ForgeSupportedLocaleCode]?: string;
}>;
interface I18nInfoConfig {
locales: ForgeSupportedLocaleCode[];
@@ -29,8 +29,8 @@
export interface I18nInfo {
translations: I18nInfoTranslations;
config: I18nInfoConfig;
}
-export declare type I18nValue = {
+export type I18nValue = {
i18n: string;
};
//# sourceMappingURL=types.d.ts.map
\ No newline at end of file Index: package/LICENSE.txt
===================================================================
--- package/LICENSE.txt
+++ package/LICENSE.txt
@@ -1,5 +1,5 @@
-Copyright (c) 2025 Atlassian
+Copyright (c) 2026 Atlassian
Permission is hereby granted to use this software in accordance with the terms
and conditions outlined in the Atlassian Developer Terms, which can be found
at the following URL:
https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/