next-intl 2.13.0 → 2.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,13 +9,13 @@
9
9
  <br>
10
10
  </h1>
11
11
 
12
- > Internationalization for Next.js that gets out of your way.
12
+ > Internationalization (i18n) for Next.js that gets out of your way.
13
13
 
14
14
  ![Gzipped size](https://badgen.net/bundlephobia/minzip/next-intl) ![Tree shaking supported](https://badgen.net/bundlephobia/tree-shaking/next-intl) [<img src="https://img.shields.io/npm/dw/next-intl.svg" />](https://www.npmjs.com/package/next-intl)
15
15
 
16
16
  <hr />
17
17
 
18
- 📣 [Support for Next.js 13 and the app directory is coming →](https://next-intl-docs.vercel.app/docs/next-13)
18
+ 📣 [Support for Next.js 13 and the App Router has arrived →](https://next-intl-docs.vercel.app/docs/next-13)
19
19
 
20
20
  <hr />
21
21
 
@@ -24,7 +24,7 @@
24
24
  Internationalization is an essential part of the user experience. next-intl gives you everything you need to get language subtleties right and has always got your back whenever you need to fine-tune a translation.
25
25
 
26
26
  - 🌟 **ICU message syntax**: Localize your messages with interpolation, plurals, ordinal pluralization, enum-based label selection, and rich text.
27
- - 📅 **Dates, times & numbers**: Use global formats for a consistent look & feel of your app and apply fine-tuning as necessary.
27
+ - 📅 **Dates, times & numbers**: Apply appropriate formatting without worrying about server/client differences like time zones.
28
28
  - ✅ **Type-safe**: Speed up development with autocompletion for message keys and catch typos early with compile-time checks.
29
29
  - 💡 **Hooks-only API**: Learn a single API that can be used across your code base to turn translations into plain strings or rich text.
30
30
  - 🚀 **Fast**: Get the best performance from your app by supporting internationalization on both static and dynamic pages.
@@ -2,9 +2,12 @@
2
2
  export * from 'use-intl/dist/src/core';
3
3
  export { default as NextIntlClientProvider } from '../shared/NextIntlClientProvider';
4
4
  function notSupported() {
5
- throw new Error('The React APIs of next-intl are currently not available in Server Components.' +
6
- '\n\n' +
7
- 'You can either try out the Server Components beta (see https://next-intl-docs.vercel.app/docs/next-13/server-components) or use the core library as a stopgap solution (see https://next-intl-docs.vercel.app/docs/usage/core-library).');
5
+ throw new Error(`The React APIs of next-intl are currently not available in Server Components.
6
+
7
+ You can try one of these options:
8
+ 1. Try out the Server Components beta, see https://next-intl-docs.vercel.app/docs/next-13/server-components
9
+ 2. Use the core library as a stopgap solution, see https://next-intl-docs.vercel.app/docs/usage/core-library
10
+ `);
8
11
  }
9
12
  export const IntlProvider = notSupported;
10
13
  export const useTranslations = notSupported;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react-server/index.tsx"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,kCAAkC,CAAC;AAEnF,SAAS,YAAY;IACnB,MAAM,IAAI,KAAK,CACb,+EAA+E;QAC7E,MAAM;QACN,yOAAyO,CAC5O,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;AACpC,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AACtC,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react-server/index.tsx"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,kCAAkC,CAAC;AAEnF,SAAS,YAAY;IACnB,MAAM,IAAI,KAAK,CACb;;;;;CAKH,CACE,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;AACpC,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AACtC,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-intl",
3
- "version": "2.13.0",
3
+ "version": "2.13.2",
4
4
  "sideEffects": false,
5
5
  "author": "Jan Amann <jan@amann.work>",
6
6
  "description": "A minimal, but complete solution for internationalization in Next.js apps.",
@@ -57,7 +57,7 @@
57
57
  "dependencies": {
58
58
  "@formatjs/intl-localematcher": "0.2.32",
59
59
  "negotiator": "0.6.3",
60
- "use-intl": "^2.13.0"
60
+ "use-intl": "^2.13.2"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "next": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",
@@ -68,16 +68,17 @@
68
68
  "@types/negotiator": "0.6.1",
69
69
  "@types/react": "^18.0.23",
70
70
  "dts-cli": "1.4.0",
71
- "eslint": "8.12.0",
71
+ "eslint": "8.39.0",
72
72
  "eslint-config-molindo": "6.0.0",
73
- "eslint-plugin-deprecation": "1.4.0",
74
- "next": "13.3.0",
73
+ "eslint-plugin-deprecation": "1.4.1",
74
+ "next": "13.3.4",
75
75
  "react": "^18.2.0",
76
76
  "react-dom": "^18.2.0",
77
+ "ts-jest": "29.1.0",
77
78
  "typescript": "^4.4.4"
78
79
  },
79
80
  "engines": {
80
81
  "node": ">=10"
81
82
  },
82
- "gitHead": "181096beace0826d3a513054a0f0ba74e7485dc3"
83
+ "gitHead": "e97ab757085450c2cb561854286e8bdf23c38211"
83
84
  }
@@ -4,9 +4,12 @@ export {default as NextIntlClientProvider} from '../shared/NextIntlClientProvide
4
4
 
5
5
  function notSupported() {
6
6
  throw new Error(
7
- 'The React APIs of next-intl are currently not available in Server Components.' +
8
- '\n\n' +
9
- 'You can either try out the Server Components beta (see https://next-intl-docs.vercel.app/docs/next-13/server-components) or use the core library as a stopgap solution (see https://next-intl-docs.vercel.app/docs/usage/core-library).'
7
+ `The React APIs of next-intl are currently not available in Server Components.
8
+
9
+ You can try one of these options:
10
+ 1. Try out the Server Components beta, see https://next-intl-docs.vercel.app/docs/next-13/server-components
11
+ 2. Use the core library as a stopgap solution, see https://next-intl-docs.vercel.app/docs/usage/core-library
12
+ `
10
13
  );
11
14
  }
12
15