@lingui/macro
Advanced tools
Comparing version 4.8.0-next.1 to 4.8.0
@@ -0,3 +1,9 @@ | ||
import { LinguiConfigNormalized } from '@lingui/conf'; | ||
type LinguiMacroOpts = { | ||
extract?: boolean; | ||
linguiConfig?: LinguiConfigNormalized; | ||
}; | ||
declare const _default: any; | ||
export { _default as default }; | ||
export { type LinguiMacroOpts, _default as default }; |
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import type { ReactNode, VFC, FC } from "react" | ||
import type { I18n, MessageDescriptor } from "@lingui/core" | ||
import type { TransRenderCallbackOrComponent, I18nContext } from "@lingui/react" | ||
import type { TransRenderCallbackOrComponent } from "@lingui/react" | ||
@@ -319,34 +319,1 @@ export type ChoiceOptions = { | ||
export const Select: VFC<SelectChoiceProps> | ||
export function _t(descriptor: MacroMessageDescriptor): string | ||
export function _t( | ||
literals: TemplateStringsArray, | ||
...placeholders: any[] | ||
): string | ||
/** | ||
* | ||
* Macro version of useLingui replaces _ function with `t` macro function which is bound to i18n passed from React.Context | ||
* | ||
* Returned `t` macro function has all the same signatures as global `t` | ||
* | ||
* @example | ||
* ``` | ||
* const { t } = useLingui(); | ||
* const message = t`Text`; | ||
* ``` | ||
* | ||
* @example | ||
* ``` | ||
* const { i18n, t } = useLingui(); | ||
* const locale = i18n.locale; | ||
* const message = t({ | ||
* id: "msg.hello", | ||
* comment: "Greetings at the homepage", | ||
* message: `Hello ${name}`, | ||
* }); | ||
* ``` | ||
*/ | ||
export function useLingui(): Omit<I18nContext, "_"> & { | ||
t: typeof _t | ||
} |
{ | ||
"name": "@lingui/macro", | ||
"version": "4.8.0-next.1", | ||
"version": "4.8.0", | ||
"description": "Macro for generating messages in ICU MessageFormat syntax", | ||
@@ -57,12 +57,2 @@ "main": "./dist/index.cjs", | ||
} | ||
}, | ||
"./plugin": { | ||
"require": { | ||
"types": "./dist/plugin.d.ts", | ||
"default": "./dist/plugin.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/plugin.d.ts", | ||
"default": "./dist/index.mjs" | ||
} | ||
} | ||
@@ -77,8 +67,7 @@ }, | ||
"dependencies": { | ||
"@babel/core": "7.20.12", | ||
"@babel/runtime": "^7.20.13", | ||
"@babel/types": "^7.20.7", | ||
"@lingui/conf": "^4.8.0-next.1", | ||
"@lingui/core": "^4.8.0-next.1", | ||
"@lingui/message-utils": "^4.8.0-next.1" | ||
"@lingui/conf": "4.8.0", | ||
"@lingui/core": "4.8.0", | ||
"@lingui/message-utils": "4.8.0" | ||
}, | ||
@@ -89,8 +78,4 @@ "peerDependencies": { | ||
}, | ||
"peerDependenciesMeta": { | ||
"babel-plugin-macros": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.20.12", | ||
"@babel/parser": "7.20.15", | ||
@@ -103,3 +88,3 @@ "@babel/traverse": "7.20.12", | ||
}, | ||
"gitHead": "62a736f74796c6c3e5bfd23d2e95154fc7f3ff42" | ||
"gitHead": "1b3a1209b06e9a6b6820ce54064da87052c21fa5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
107517
7
3018
0
3
7
10
+ Added@lingui/conf@4.8.0(transitive)
+ Added@lingui/core@4.8.0(transitive)
+ Added@lingui/message-utils@4.8.0(transitive)
- Removed@babel/core@7.20.12
- Removed@ampproject/remapping@2.3.0(transitive)
- Removed@babel/compat-data@7.24.4(transitive)
- Removed@babel/core@7.20.12(transitive)
- Removed@babel/generator@7.24.5(transitive)
- Removed@babel/helper-compilation-targets@7.23.6(transitive)
- Removed@babel/helper-environment-visitor@7.22.20(transitive)
- Removed@babel/helper-function-name@7.23.0(transitive)
- Removed@babel/helper-hoist-variables@7.22.5(transitive)
- Removed@babel/helper-module-imports@7.24.3(transitive)
- Removed@babel/helper-module-transforms@7.24.5(transitive)
- Removed@babel/helper-simple-access@7.24.5(transitive)
- Removed@babel/helper-split-export-declaration@7.24.5(transitive)
- Removed@babel/helper-validator-option@7.23.5(transitive)
- Removed@babel/helpers@7.24.5(transitive)
- Removed@babel/parser@7.24.5(transitive)
- Removed@babel/template@7.24.0(transitive)
- Removed@babel/traverse@7.24.5(transitive)
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.4.15(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@lingui/conf@4.10.1(transitive)
- Removedbrowserslist@4.23.0(transitive)
- Removedcaniuse-lite@1.0.30001616(transitive)
- Removedconvert-source-map@1.9.0(transitive)
- Removeddebug@4.3.4(transitive)
- Removedelectron-to-chromium@1.4.763(transitive)
- Removedescalade@3.1.2(transitive)
- Removedgensync@1.0.0-beta.2(transitive)
- Removedglobals@11.12.0(transitive)
- Removedjsesc@2.5.2(transitive)
- Removedjson5@2.2.3(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removedms@2.1.2(transitive)
- Removednode-releases@2.0.14(transitive)
- Removedsemver@6.3.1(transitive)
- Removedupdate-browserslist-db@1.0.15(transitive)
- Removedyallist@3.1.1(transitive)
Updated@lingui/conf@4.8.0
Updated@lingui/core@4.8.0
Updated@lingui/message-utils@4.8.0