Skip to content

Commit

Permalink
fix: test esm package (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Feb 16, 2024
1 parent 69958d8 commit 5917795
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 16 deletions.
File renamed without changes.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@graasp/translations",
"version": "1.23.0",
"type": "module",
"engines": {
"node": ">=20.0.0"
},
Expand All @@ -23,9 +24,6 @@
"Julien Torrent",
"Jérémy La Scala"
],
"dependencies": {
"i18next": "23.8.2"
},
"scripts": {
"prepack": "yarn build",
"prepare": "yarn build && yarn hooks:install",
Expand All @@ -42,6 +40,9 @@
"post-commit": "git status",
"build": "tsc"
},
"peerDependencies": {
"i18next": "^23.8.1"
},
"devDependencies": {
"@commitlint/cli": "18.6.1",
"@commitlint/config-conventional": "18.6.2",
Expand All @@ -53,6 +54,7 @@
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"husky": "9.0.11",
"i18next": "23.8.2",
"jest": "29.7.0",
"prettier": "3.2.5",
"ts-jest": "29.1.2",
Expand Down
5 changes: 0 additions & 5 deletions src/constants/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import i18n from 'i18next';

import { ar, de, en, fr, it, namespaces } from './langs';
import { ar, de, en, fr, it, namespaces } from './langs/index.js';

export const DEFAULT_LANG = 'en';

Expand Down
11 changes: 8 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export * from './constants';
export { namespaces } from './langs';
export { default, langs, DEFAULT_LANG } from './i18n';
export { namespaces } from './langs/index.js';
export { default, langs, DEFAULT_LANG } from './i18n.js';

export * from './constants/association.js';
export * from './constants/categories.js';
export * from './constants/common.js';
export * from './constants/chatbox.js';
export * from './constants/messages.js';
9 changes: 5 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"target": "es2015",
"module": "NodeNext",
"strict": true,
"outDir": "dist",
"esModuleInterop": true,
"skipLibCheck": true,
"declaration": true,
"resolveJsonModule": true
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
},
"include": ["src/**/*"],
"exclude": ["test", "src/**/*.test.ts"]
"exclude": ["test", "src/**/*.test.ts"],
}
2 changes: 2 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ __metadata:
ts-jest: "npm:29.1.2"
ts-node: "npm:10.9.2"
typescript: "npm:5.3.3"
peerDependencies:
i18next: ^23.8.1
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 5917795

Please sign in to comment.