@akinon/projectzero 1.73.0-rc.1 → 1.73.0-rc.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @akinon/projectzero
2
2
 
3
+ ## 1.73.0-rc.3
4
+
5
+ ## 1.73.0-rc.2
6
+
3
7
  ## 1.73.0-rc.1
4
8
 
5
9
  ## 1.73.0-rc.0
@@ -1,5 +1,51 @@
1
1
  # projectzeronext
2
2
 
3
+ ## 1.73.0-rc.3
4
+
5
+ ### Minor Changes
6
+
7
+ - 07b2298e: ZERO-3074: Exclude url schemes to init url without locales
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [07b2298e]
12
+ - @akinon/next@1.73.0-rc.3
13
+ - @akinon/pz-akifast@1.73.0-rc.3
14
+ - @akinon/pz-b2b@1.73.0-rc.3
15
+ - @akinon/pz-basket-gift-pack@1.73.0-rc.3
16
+ - @akinon/pz-bkm@1.73.0-rc.3
17
+ - @akinon/pz-checkout-gift-pack@1.73.0-rc.3
18
+ - @akinon/pz-click-collect@1.73.0-rc.3
19
+ - @akinon/pz-credit-payment@1.73.0-rc.3
20
+ - @akinon/pz-gpay@1.73.0-rc.3
21
+ - @akinon/pz-masterpass@1.73.0-rc.3
22
+ - @akinon/pz-one-click-checkout@1.73.0-rc.3
23
+ - @akinon/pz-otp@1.73.0-rc.3
24
+ - @akinon/pz-pay-on-delivery@1.73.0-rc.3
25
+ - @akinon/pz-saved-card@1.73.0-rc.3
26
+ - @akinon/pz-tabby-extension@1.73.0-rc.3
27
+
28
+ ## 1.73.0-rc.2
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [eeb20bea]
33
+ - @akinon/next@1.73.0-rc.2
34
+ - @akinon/pz-akifast@1.73.0-rc.2
35
+ - @akinon/pz-b2b@1.73.0-rc.2
36
+ - @akinon/pz-basket-gift-pack@1.73.0-rc.2
37
+ - @akinon/pz-bkm@1.73.0-rc.2
38
+ - @akinon/pz-checkout-gift-pack@1.73.0-rc.2
39
+ - @akinon/pz-click-collect@1.73.0-rc.2
40
+ - @akinon/pz-credit-payment@1.73.0-rc.2
41
+ - @akinon/pz-gpay@1.73.0-rc.2
42
+ - @akinon/pz-masterpass@1.73.0-rc.2
43
+ - @akinon/pz-one-click-checkout@1.73.0-rc.2
44
+ - @akinon/pz-otp@1.73.0-rc.2
45
+ - @akinon/pz-pay-on-delivery@1.73.0-rc.2
46
+ - @akinon/pz-saved-card@1.73.0-rc.2
47
+ - @akinon/pz-tabby-extension@1.73.0-rc.2
48
+
3
49
  ## 1.73.0-rc.1
4
50
 
5
51
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectzeronext",
3
- "version": "1.73.0-rc.1",
3
+ "version": "1.73.0-rc.3",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -22,21 +22,21 @@
22
22
  "prestart": "pz-prestart"
23
23
  },
24
24
  "dependencies": {
25
- "@akinon/next": "1.73.0-rc.1",
26
- "@akinon/pz-akifast": "1.73.0-rc.1",
27
- "@akinon/pz-b2b": "1.73.0-rc.1",
28
- "@akinon/pz-basket-gift-pack": "1.73.0-rc.1",
29
- "@akinon/pz-bkm": "1.73.0-rc.1",
30
- "@akinon/pz-checkout-gift-pack": "1.73.0-rc.1",
31
- "@akinon/pz-click-collect": "1.73.0-rc.1",
32
- "@akinon/pz-credit-payment": "1.73.0-rc.1",
33
- "@akinon/pz-gpay": "1.73.0-rc.1",
34
- "@akinon/pz-masterpass": "1.73.0-rc.1",
35
- "@akinon/pz-one-click-checkout": "1.73.0-rc.1",
36
- "@akinon/pz-otp": "1.73.0-rc.1",
37
- "@akinon/pz-pay-on-delivery": "1.73.0-rc.1",
38
- "@akinon/pz-saved-card": "1.73.0-rc.1",
39
- "@akinon/pz-tabby-extension": "1.73.0-rc.1",
25
+ "@akinon/next": "1.73.0-rc.3",
26
+ "@akinon/pz-akifast": "1.73.0-rc.3",
27
+ "@akinon/pz-b2b": "1.73.0-rc.3",
28
+ "@akinon/pz-basket-gift-pack": "1.73.0-rc.3",
29
+ "@akinon/pz-bkm": "1.73.0-rc.3",
30
+ "@akinon/pz-checkout-gift-pack": "1.73.0-rc.3",
31
+ "@akinon/pz-click-collect": "1.73.0-rc.3",
32
+ "@akinon/pz-credit-payment": "1.73.0-rc.3",
33
+ "@akinon/pz-gpay": "1.73.0-rc.3",
34
+ "@akinon/pz-masterpass": "1.73.0-rc.3",
35
+ "@akinon/pz-one-click-checkout": "1.73.0-rc.3",
36
+ "@akinon/pz-otp": "1.73.0-rc.3",
37
+ "@akinon/pz-pay-on-delivery": "1.73.0-rc.3",
38
+ "@akinon/pz-saved-card": "1.73.0-rc.3",
39
+ "@akinon/pz-tabby-extension": "1.73.0-rc.3",
40
40
  "@hookform/resolvers": "2.9.0",
41
41
  "@next/third-parties": "14.1.0",
42
42
  "@react-google-maps/api": "2.17.1",
@@ -60,7 +60,7 @@
60
60
  "yup": "0.32.11"
61
61
  },
62
62
  "devDependencies": {
63
- "@akinon/eslint-plugin-projectzero": "1.73.0-rc.1",
63
+ "@akinon/eslint-plugin-projectzero": "1.73.0-rc.3",
64
64
  "@semantic-release/changelog": "6.0.2",
65
65
  "@semantic-release/exec": "6.0.3",
66
66
  "@semantic-release/git": "10.0.1",
@@ -2,26 +2,27 @@
2
2
 
3
3
  import { useLocalization } from '@akinon/next/hooks';
4
4
  import { LocaleUrlStrategy } from '@akinon/next/localization';
5
- import { urlLocaleMatcherRegex } from '@akinon/next/utils';
5
+ import { urlLocaleMatcherRegex, urlSchemes } from '@akinon/next/utils';
6
6
  import NextLink, { LinkProps as NextLinkProps } from 'next/link';
7
7
  import { useMemo } from 'react';
8
8
 
9
- interface LinkProps extends NextLinkProps {
10
- children: React.ReactNode;
11
- className?: string;
12
- target?: '_blank' | '_self' | '_parent' | '_top';
13
- }
14
-
15
- export const Link = ({
16
- children,
17
- target,
18
- className,
19
- href,
20
- ...rest
21
- }: LinkProps) => {
9
+ type LinkProps = Omit<
10
+ React.AnchorHTMLAttributes<HTMLAnchorElement>,
11
+ keyof NextLinkProps
12
+ > &
13
+ NextLinkProps;
14
+
15
+ export const Link = ({ children, href, ...rest }: LinkProps) => {
22
16
  const { locale, defaultLocaleValue, localeUrlStrategy } = useLocalization();
23
17
  const formattedHref = useMemo(() => {
24
- if (typeof href !== 'string' || href.startsWith('http')) {
18
+ if (!href) {
19
+ return '#';
20
+ }
21
+
22
+ if (
23
+ typeof href !== 'string' ||
24
+ urlSchemes.some((scheme) => href.startsWith(scheme))
25
+ ) {
25
26
  return href;
26
27
  }
27
28
 
@@ -41,12 +42,7 @@ export const Link = ({
41
42
  }, [href, defaultLocaleValue, locale, localeUrlStrategy]);
42
43
 
43
44
  return (
44
- <NextLink
45
- href={formattedHref}
46
- target={target}
47
- className={className}
48
- {...rest}
49
- >
45
+ <NextLink href={formattedHref} {...rest}>
50
46
  {children}
51
47
  </NextLink>
52
48
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/projectzero",
3
- "version": "1.73.0-rc.1",
3
+ "version": "1.73.0-rc.3",
4
4
  "private": false,
5
5
  "description": "CLI tool to manage your Project Zero Next project",
6
6
  "bin": {