react-cheminfo 0.41.0 → 0.43.0
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/bin/check-deploy.mjs +3 -1
- package/lib/chrome/ui/AboutButton.d.ts +59 -0
- package/lib/chrome/ui/AboutButton.d.ts.map +1 -0
- package/lib/chrome/ui/AboutButton.js +29 -0
- package/lib/chrome/ui/AboutButton.js.map +1 -0
- package/lib/chrome/ui/index.d.ts +2 -0
- package/lib/chrome/ui/index.d.ts.map +1 -1
- package/lib/chrome/ui/index.js +1 -0
- package/lib/chrome/ui/index.js.map +1 -1
- package/lib/deploy/core/buildGate.d.ts.map +1 -1
- package/lib/deploy/core/buildGate.js +4 -34
- package/lib/deploy/core/buildGate.js.map +1 -1
- package/lib/deploy/core/checkDeploy.d.ts.map +1 -1
- package/lib/deploy/core/checkDeploy.js +2 -0
- package/lib/deploy/core/checkDeploy.js.map +1 -1
- package/lib/deploy/core/index.d.ts +1 -0
- package/lib/deploy/core/index.d.ts.map +1 -1
- package/lib/deploy/core/index.js +1 -0
- package/lib/deploy/core/index.js.map +1 -1
- package/lib/deploy/core/json.d.ts +27 -0
- package/lib/deploy/core/json.d.ts.map +1 -0
- package/lib/deploy/core/json.js +56 -0
- package/lib/deploy/core/json.js.map +1 -0
- package/lib/deploy/core/reactCopies.d.ts +32 -0
- package/lib/deploy/core/reactCopies.d.ts.map +1 -0
- package/lib/deploy/core/reactCopies.js +212 -0
- package/lib/deploy/core/reactCopies.js.map +1 -0
- package/lib/deploy/core/types.d.ts +1 -1
- package/lib/deploy/core/types.d.ts.map +1 -1
- package/lib/deploy/core/types.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +12 -0
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/core/types.d.ts +1 -1
- package/lib/ecosystem/core/types.d.ts.map +1 -1
- package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
- package/lib/ecosystem/ui/glyphs.js +4 -0
- package/lib/ecosystem/ui/glyphs.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/locales/de.json +2 -0
- package/lib/locales/en.json +2 -0
- package/lib/locales/es.json +2 -0
- package/lib/locales/fr.json +2 -0
- package/lib/locales/it.json +2 -0
- package/lib/periodic/ui/ElementCell.d.ts +22 -2
- package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
- package/lib/periodic/ui/ElementCell.js +20 -145
- package/lib/periodic/ui/ElementCell.js.map +1 -1
- package/lib/periodic/ui/PeriodicTable.d.ts +7 -0
- package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTable.js +21 -3
- package/lib/periodic/ui/PeriodicTable.js.map +1 -1
- package/lib/periodic/ui/cellStyles.d.ts +79 -0
- package/lib/periodic/ui/cellStyles.d.ts.map +1 -0
- package/lib/periodic/ui/cellStyles.js +90 -0
- package/lib/periodic/ui/cellStyles.js.map +1 -0
- package/lib/periodic/ui/cellType.d.ts +106 -0
- package/lib/periodic/ui/cellType.d.ts.map +1 -0
- package/lib/periodic/ui/cellType.js +181 -0
- package/lib/periodic/ui/cellType.js.map +1 -0
- package/lib/periodic/ui/glyphWidths.d.ts +11 -0
- package/lib/periodic/ui/glyphWidths.d.ts.map +1 -0
- package/lib/periodic/ui/glyphWidths.js +69 -0
- package/lib/periodic/ui/glyphWidths.js.map +1 -0
- package/package.json +9 -1
- package/src/chrome/ui/AboutButton.tsx +90 -0
- package/src/chrome/ui/index.ts +2 -0
- package/src/deploy/core/buildGate.ts +4 -35
- package/src/deploy/core/checkDeploy.ts +7 -0
- package/src/deploy/core/index.ts +1 -0
- package/src/deploy/core/json.ts +53 -0
- package/src/deploy/core/reactCopies.ts +243 -0
- package/src/deploy/core/types.ts +5 -1
- package/src/ecosystem/core/sites.ts +13 -0
- package/src/ecosystem/core/types.ts +2 -1
- package/src/ecosystem/ui/glyphs.tsx +16 -0
- package/src/locales/de.json +2 -0
- package/src/locales/en.json +2 -0
- package/src/locales/es.json +2 -0
- package/src/locales/fr.json +2 -0
- package/src/locales/it.json +2 -0
- package/src/periodic/ui/ElementCell.tsx +69 -160
- package/src/periodic/ui/PeriodicTable.tsx +37 -2
- package/src/periodic/ui/cellStyles.ts +100 -0
- package/src/periodic/ui/cellType.ts +223 -0
- package/src/periodic/ui/glyphWidths.ts +68 -0
- package/styles/chrome.css +10 -2
package/bin/check-deploy.mjs
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* run, an `IMAGE_NAME` naming a package this repository never publishes, an
|
|
7
7
|
* `env_file` that fails on a checkout with no `.env` yet, a service with no
|
|
8
8
|
* health probe to read, an `.env.example` that hides a mode, a `build` that
|
|
9
|
-
* bundles before the tests have run
|
|
9
|
+
* bundles before the tests have run, a React that resolves twice or resolves to
|
|
10
|
+
* a major the family does not run.
|
|
10
11
|
*
|
|
11
12
|
* Wire it as an npm script, next to check-tokens:
|
|
12
13
|
* "check-deploy": "cheminfo-check-deploy"
|
|
@@ -77,6 +78,7 @@ for (const path of [
|
|
|
77
78
|
'.env.example',
|
|
78
79
|
'.gitignore',
|
|
79
80
|
'package.json',
|
|
81
|
+
'package-lock.json',
|
|
80
82
|
'Dockerfile',
|
|
81
83
|
PAGE_CACHE_CONFIG,
|
|
82
84
|
NGINX_CONFIG,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
/** What the About entry of a header needs. */
|
|
3
|
+
export interface AboutButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* The site's About address, which the entry opens. It is written rather than
|
|
6
|
+
* assumed, because a deployment may sit under a mount path and a translated
|
|
7
|
+
* site under a language prefix.
|
|
8
|
+
*/
|
|
9
|
+
href: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the About is the page on show, which is what the brand tint is
|
|
12
|
+
* spent on.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
active?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* What the site does when the entry is picked, for a page that routes in
|
|
18
|
+
* place. A modified click is left to the browser.
|
|
19
|
+
* @default undefined
|
|
20
|
+
*/
|
|
21
|
+
onSelect?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* What the entry reads. In a compact bar it is not written, but it stays what
|
|
24
|
+
* the pointer and a screen reader are told.
|
|
25
|
+
* @default the chrome's own word for it, in the language of the page
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* What the pointer is told.
|
|
30
|
+
* @default the chrome's own sentence, in the language of the page
|
|
31
|
+
*/
|
|
32
|
+
title?: string;
|
|
33
|
+
/**
|
|
34
|
+
* What the active entry is named by, for a site whose router spells its
|
|
35
|
+
* addresses rather than its tabs.
|
|
36
|
+
* @default 'about'
|
|
37
|
+
*/
|
|
38
|
+
id?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Class names added after the component's own.
|
|
41
|
+
* @default undefined
|
|
42
|
+
*/
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The About entry, which leads the utilities on every site of the family: a
|
|
47
|
+
* real address rather than a dialog, so the page is indexed, linkable and
|
|
48
|
+
* printable.
|
|
49
|
+
*
|
|
50
|
+
* The glyph is `info-sign` on every site, and is not a site's to choose. It is
|
|
51
|
+
* what the entry keeps once a narrow bar drops the labels, and the site's own
|
|
52
|
+
* mark already stands at the other end of the same bar — drawn twice, nothing
|
|
53
|
+
* in the row says which one is the site and which one is about it.
|
|
54
|
+
* @param props - Where the About is, whether it is on show, and how the site
|
|
55
|
+
* opens it.
|
|
56
|
+
* @returns The entry.
|
|
57
|
+
*/
|
|
58
|
+
export declare function AboutButton(props: AboutButtonProps): ReactElement;
|
|
59
|
+
//# sourceMappingURL=AboutButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutButton.d.ts","sourceRoot":"","sources":["../../../src/chrome/ui/AboutButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAM1C,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CA0BjE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
3
|
+
import { NavLink } from "./NavLink.js";
|
|
4
|
+
/**
|
|
5
|
+
* The About entry, which leads the utilities on every site of the family: a
|
|
6
|
+
* real address rather than a dialog, so the page is indexed, linkable and
|
|
7
|
+
* printable.
|
|
8
|
+
*
|
|
9
|
+
* The glyph is `info-sign` on every site, and is not a site's to choose. It is
|
|
10
|
+
* what the entry keeps once a narrow bar drops the labels, and the site's own
|
|
11
|
+
* mark already stands at the other end of the same bar — drawn twice, nothing
|
|
12
|
+
* in the row says which one is the site and which one is about it.
|
|
13
|
+
* @param props - Where the About is, whether it is on show, and how the site
|
|
14
|
+
* opens it.
|
|
15
|
+
* @returns The entry.
|
|
16
|
+
*/
|
|
17
|
+
export function AboutButton(props) {
|
|
18
|
+
const { href, active = false, onSelect, label, title, id = 'about', className, } = props;
|
|
19
|
+
const t = useChromeT();
|
|
20
|
+
return (_jsx(NavLink, { item: {
|
|
21
|
+
id,
|
|
22
|
+
label: label ?? t('chrome.about'),
|
|
23
|
+
icon: 'info-sign',
|
|
24
|
+
href,
|
|
25
|
+
title: title ?? t('chrome.aboutTitle'),
|
|
26
|
+
onSelect,
|
|
27
|
+
}, active: active, className: className }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=AboutButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutButton.js","sourceRoot":"","sources":["../../../src/chrome/ui/AboutButton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;AA8CxC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EACJ,IAAI,EACJ,MAAM,GAAG,KAAK,EACd,QAAQ,EACR,KAAK,EACL,KAAK,EACL,EAAE,GAAG,OAAO,EACZ,SAAS,GACV,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,OAAO,IACN,IAAI,EAAE;YACJ,EAAE;YACF,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,cAAc,CAAC;YACjC,IAAI,EAAE,WAAW;YACjB,IAAI;YACJ,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,mBAAmB,CAAC;YACtC,QAAQ;SACT,EACD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC"}
|
package/lib/chrome/ui/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { AboutButtonProps } from './AboutButton.tsx';
|
|
2
|
+
export { AboutButton } from './AboutButton.tsx';
|
|
1
3
|
export type { AccountButtonProps, AccountIdentity } from './AccountButton.tsx';
|
|
2
4
|
export { AccountButton } from './AccountButton.tsx';
|
|
3
5
|
export type { HeaderToggleOption, HeaderToggleProps } from './HeaderToggle.tsx';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chrome/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chrome/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC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E,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/chrome/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAElD,+EAA+E;AAC/E,sEAAsE;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildGate.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/buildGate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildGate.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/buildGate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,aAAa,EAAE,GACxB,IAAI,CAmDN"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { lineOf, parseJsonObject, stringEntries } from "./json.js";
|
|
1
2
|
/**
|
|
2
3
|
* Report a repository that can bundle, and so publish, code nothing tested.
|
|
3
4
|
*
|
|
@@ -16,9 +17,10 @@
|
|
|
16
17
|
export function readBuildGate(packageJson, dockerfile, problems) {
|
|
17
18
|
if (packageJson === undefined)
|
|
18
19
|
return;
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
20
|
+
const parsed = parseJsonObject(packageJson);
|
|
21
|
+
if (parsed === undefined)
|
|
21
22
|
return;
|
|
23
|
+
const scripts = stringEntries(parsed.scripts);
|
|
22
24
|
const build = scripts.build;
|
|
23
25
|
if (build !== undefined && !/\bnpm run test\b/.test(build)) {
|
|
24
26
|
problems.push({
|
|
@@ -80,36 +82,4 @@ function gatedBuildLine(dockerfile) {
|
|
|
80
82
|
}
|
|
81
83
|
return undefined;
|
|
82
84
|
}
|
|
83
|
-
/**
|
|
84
|
-
* The scripts block of a `package.json`.
|
|
85
|
-
* @param text - The file, unparsed.
|
|
86
|
-
* @returns Its scripts, or undefined when the file is not readable as one.
|
|
87
|
-
*/
|
|
88
|
-
function parseScripts(text) {
|
|
89
|
-
let parsed;
|
|
90
|
-
try {
|
|
91
|
-
parsed = JSON.parse(text);
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
return undefined;
|
|
95
|
-
}
|
|
96
|
-
if (typeof parsed !== 'object' || parsed === null)
|
|
97
|
-
return undefined;
|
|
98
|
-
const scripts = parsed.scripts;
|
|
99
|
-
if (typeof scripts !== 'object' || scripts === null)
|
|
100
|
-
return {};
|
|
101
|
-
return scripts;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Where a report should point, so the reader lands on the script itself.
|
|
105
|
-
* @param text - The file to search.
|
|
106
|
-
* @param needle - The key to find.
|
|
107
|
-
* @returns Its line, counting from 1, or 0 when it is not there.
|
|
108
|
-
*/
|
|
109
|
-
function lineOf(text, needle) {
|
|
110
|
-
const at = text.indexOf(needle);
|
|
111
|
-
if (at === -1)
|
|
112
|
-
return 0;
|
|
113
|
-
return text.slice(0, at).split('\n').length;
|
|
114
|
-
}
|
|
115
85
|
//# sourceMappingURL=buildGate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildGate.js","sourceRoot":"","sources":["../../../src/deploy/core/buildGate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildGate.js","sourceRoot":"","sources":["../../../src/deploy/core/buildGate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,aAAa,CAC3B,WAA+B,EAC/B,UAA8B,EAC9B,QAAyB;IAEzB,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO;IACtC,MAAM,MAAM,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAC5C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO;IACjC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE9C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3D,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC;YACpC,IAAI,EAAE,eAAe;YACrB,OAAO,EACL,oFAAoF;YACtF,IAAI,EAAE,gGAAgG;SACvG,CAAC,CAAC;IACL,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;QAC/D,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC;YAC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OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkDeploy.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/checkDeploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkDeploy.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/checkDeploy.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,OAAO,GAAE,kBAAuB,GAC/B,aAAa,EAAE,CA0EjB"}
|
|
@@ -3,6 +3,7 @@ import { readComposeFile } from "./composeFile.js";
|
|
|
3
3
|
import { readEnvExample } from "./envExample.js";
|
|
4
4
|
import { readPageCache } from "./pageCache.js";
|
|
5
5
|
import { DOCKER_IMAGE_WORKFLOW, readInstallRetries, readPublishedImage, } from "./publishedImage.js";
|
|
6
|
+
import { readReactCopies } from "./reactCopies.js";
|
|
6
7
|
import { DEPLOY_COMPOSE_FILES } from "./types.js";
|
|
7
8
|
/**
|
|
8
9
|
* Every way a repository would break, or silently mis-deploy, under the
|
|
@@ -73,6 +74,7 @@ export function findDeployProblems(files, options = {}) {
|
|
|
73
74
|
readInstallRetries(dockerfile, problems);
|
|
74
75
|
}
|
|
75
76
|
readBuildGate(byPath.get('package.json'), dockerfile, problems);
|
|
77
|
+
readReactCopies(byPath.get('package.json'), byPath.get('package-lock.json'), problems);
|
|
76
78
|
readPublishedImage(byPath.get(DOCKER_IMAGE_WORKFLOW), problems);
|
|
77
79
|
const gitignore = byPath.get('.gitignore');
|
|
78
80
|
if (gitignore === undefined || !/^\s*\/?\.deploy\/?\s*$/m.test(gitignore)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkDeploy.js","sourceRoot":"","sources":["../../../src/deploy/core/checkDeploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"checkDeploy.js","sourceRoot":"","sources":["../../../src/deploy/core/checkDeploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAA4B,EAC5B,UAA8B,EAAE;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,IAAI,oBAAoB,CAAC;IAC9D,MAAM,KAAK,GAAG;QACZ,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,EAAE;QAC1C,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,IAAI;QACtD,iBAAiB,EAAE,CACjB,OAAO,CAAC,iBAAiB,IAAI,gBAAgB,CAC9C,CAAC,WAAW,EAAE;QACf,SA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KAAK,SAAS,EAAE,CAAC;QAC7B,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC5C,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IAEhE,eAAe,CACb,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,EAC1B,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAC/B,QAAQ,CACT,CAAC;IAEF,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,QAAQ,CAAC,CAAC;IAEhE,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC3C,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC1E,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EACL,8EAA8E;YAChF,IAAI,EAAE,kCAAkC;SACzC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -2,6 +2,7 @@ export { readBuildGate } from './buildGate.ts';
|
|
|
2
2
|
export { findDeployProblems } from './checkDeploy.ts';
|
|
3
3
|
export type { CheckDeployOptions, DeployFile, DeployProblem, DeployProblemKind, } from './types.ts';
|
|
4
4
|
export { NGINX_CONFIG, PAGE_CACHE_CONFIG } from './pageCache.ts';
|
|
5
|
+
export { REACT_MAJOR, readReactCopies } from './reactCopies.ts';
|
|
5
6
|
export { DOCKER_IMAGE_WORKFLOW, readInstallRetries, readPublishedImage, } from './publishedImage.ts';
|
|
6
7
|
export { DEPLOY_COMPOSE_FILES } from './types.ts';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
package/lib/deploy/core/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { readBuildGate } from "./buildGate.js";
|
|
2
2
|
export { findDeployProblems } from "./checkDeploy.js";
|
|
3
3
|
export { NGINX_CONFIG, PAGE_CACHE_CONFIG } from "./pageCache.js";
|
|
4
|
+
export { REACT_MAJOR, readReactCopies } from "./reactCopies.js";
|
|
4
5
|
export { DOCKER_IMAGE_WORKFLOW, readInstallRetries, readPublishedImage, } from "./publishedImage.js";
|
|
5
6
|
export { DEPLOY_COMPOSE_FILES } from "./types.js";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/deploy/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAOtD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/deploy/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAOtD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the repository's own JSON files, which a checker must do without ever
|
|
3
|
+
* throwing: the absence of a file, and a file somebody has broken, are both
|
|
4
|
+
* things to report rather than to crash on.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A JSON file the repository may not have, or may have broken.
|
|
8
|
+
* @param text - The file, unparsed.
|
|
9
|
+
* @returns Its object form, or undefined when it is neither.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseJsonObject(text: string | undefined): Record<string, unknown> | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* A block of a `package.json` as a map of strings, dropping any entry that is
|
|
14
|
+
* not one — the nested form of `overrides` pins something other than the
|
|
15
|
+
* package it is written under.
|
|
16
|
+
* @param value - The block, as parsed.
|
|
17
|
+
* @returns Its string entries.
|
|
18
|
+
*/
|
|
19
|
+
export declare function stringEntries(value: unknown): Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Where a report should point, so the reader lands on the line itself.
|
|
22
|
+
* @param text - The file to search, when there is one.
|
|
23
|
+
* @param needle - The literal to find.
|
|
24
|
+
* @returns Its line, counting from 1, or 0 when it is not there.
|
|
25
|
+
*/
|
|
26
|
+
export declare function lineOf(text: string | undefined, needle: string): number;
|
|
27
|
+
//# sourceMappingURL=json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/json.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAUrC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOpE;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKvE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the repository's own JSON files, which a checker must do without ever
|
|
3
|
+
* throwing: the absence of a file, and a file somebody has broken, are both
|
|
4
|
+
* things to report rather than to crash on.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A JSON file the repository may not have, or may have broken.
|
|
8
|
+
* @param text - The file, unparsed.
|
|
9
|
+
* @returns Its object form, or undefined when it is neither.
|
|
10
|
+
*/
|
|
11
|
+
export function parseJsonObject(text) {
|
|
12
|
+
if (text === undefined)
|
|
13
|
+
return undefined;
|
|
14
|
+
let parsed;
|
|
15
|
+
try {
|
|
16
|
+
parsed = JSON.parse(text);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
22
|
+
return undefined;
|
|
23
|
+
return parsed;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A block of a `package.json` as a map of strings, dropping any entry that is
|
|
27
|
+
* not one — the nested form of `overrides` pins something other than the
|
|
28
|
+
* package it is written under.
|
|
29
|
+
* @param value - The block, as parsed.
|
|
30
|
+
* @returns Its string entries.
|
|
31
|
+
*/
|
|
32
|
+
export function stringEntries(value) {
|
|
33
|
+
if (typeof value !== 'object' || value === null)
|
|
34
|
+
return {};
|
|
35
|
+
const found = {};
|
|
36
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
37
|
+
if (typeof entry === 'string')
|
|
38
|
+
found[key] = entry;
|
|
39
|
+
}
|
|
40
|
+
return found;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Where a report should point, so the reader lands on the line itself.
|
|
44
|
+
* @param text - The file to search, when there is one.
|
|
45
|
+
* @param needle - The literal to find.
|
|
46
|
+
* @returns Its line, counting from 1, or 0 when it is not there.
|
|
47
|
+
*/
|
|
48
|
+
export function lineOf(text, needle) {
|
|
49
|
+
if (text === undefined)
|
|
50
|
+
return 0;
|
|
51
|
+
const at = text.indexOf(needle);
|
|
52
|
+
if (at === -1)
|
|
53
|
+
return 0;
|
|
54
|
+
return text.slice(0, at).split('\n').length;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/deploy/core/json.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAwB;IAExB,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzC,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACpE,OAAO,MAAiC,CAAC;AAC3C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC3D,MAAM,KAAK,GAA2B,EAAE,CAAC;IACzC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACpD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,IAAwB,EAAE,MAAc;IAC7D,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IACjC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,KAAK,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IACxB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DeployProblem } from './types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The React major the whole family runs. One number, in one place: a site that
|
|
4
|
+
* resolves anything else is reporting a resolution nobody asked for.
|
|
5
|
+
*/
|
|
6
|
+
export declare const REACT_MAJOR = 19;
|
|
7
|
+
/**
|
|
8
|
+
* Report every way a repository would resolve React twice, or resolve a React
|
|
9
|
+
* that is not the family's.
|
|
10
|
+
*
|
|
11
|
+
* Two physical copies of `react` make every component from the offending
|
|
12
|
+
* subtree call hooks against a dispatcher the active renderer never populated,
|
|
13
|
+
* and the app dies at first render on `Cannot read properties of null (reading
|
|
14
|
+
* 'useEffect')` — a blank page with the correct title and the correct CSS,
|
|
15
|
+
* which reads like a routing or a build bug and is neither. Two copies of
|
|
16
|
+
* `@types/react` are the same mistake one layer up: `tsc` rejects a component
|
|
17
|
+
* crossing between them, in a file nobody touched.
|
|
18
|
+
*
|
|
19
|
+
* The cause is almost never a direct dependency. It is a *transitive* peer
|
|
20
|
+
* range that stopped before the current major — `@blueprintjs/core` depends on
|
|
21
|
+
* `react-popper@2`, whose peers stop at `^18` — so npm honours the stale range,
|
|
22
|
+
* installs an older React for that subtree and hoists it. Nothing fails at
|
|
23
|
+
* install, nothing fails at build, and the bundle silently grows by a second
|
|
24
|
+
* copy of React. The fix is a pin in the root `overrides`, which is why a lock
|
|
25
|
+
* holding such a peer without one is reported even while the tree happens to be
|
|
26
|
+
* clean today: it is one fresh resolve away from not being.
|
|
27
|
+
* @param packageJson - The repository's root `package.json`, unparsed.
|
|
28
|
+
* @param packageLock - Its `package-lock.json`, unparsed.
|
|
29
|
+
* @param problems - Where each problem found is appended.
|
|
30
|
+
*/
|
|
31
|
+
export declare function readReactCopies(packageJson: string | undefined, packageLock: string | undefined, problems: DeployProblem[]): void;
|
|
32
|
+
//# sourceMappingURL=reactCopies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactCopies.d.ts","sourceRoot":"","sources":["../../../src/deploy/core/reactCopies.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,WAAW,KAAK,CAAC;AA8B9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,QAAQ,EAAE,aAAa,EAAE,GACxB,IAAI,CAsEN"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import semver from 'semver';
|
|
2
|
+
import { lineOf, parseJsonObject, stringEntries } from "./json.js";
|
|
3
|
+
/**
|
|
4
|
+
* The React major the whole family runs. One number, in one place: a site that
|
|
5
|
+
* resolves anything else is reporting a resolution nobody asked for.
|
|
6
|
+
*/
|
|
7
|
+
export const REACT_MAJOR = 19;
|
|
8
|
+
/**
|
|
9
|
+
* The packages that must resolve to exactly one copy. The two runtime ones
|
|
10
|
+
* because two copies are a blank page; the two type packages because two copies
|
|
11
|
+
* are a type error in a file nobody edited.
|
|
12
|
+
*/
|
|
13
|
+
const SINGLE_COPY = [
|
|
14
|
+
'react',
|
|
15
|
+
'react-dom',
|
|
16
|
+
'@types/react',
|
|
17
|
+
'@types/react-dom',
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Report every way a repository would resolve React twice, or resolve a React
|
|
21
|
+
* that is not the family's.
|
|
22
|
+
*
|
|
23
|
+
* Two physical copies of `react` make every component from the offending
|
|
24
|
+
* subtree call hooks against a dispatcher the active renderer never populated,
|
|
25
|
+
* and the app dies at first render on `Cannot read properties of null (reading
|
|
26
|
+
* 'useEffect')` — a blank page with the correct title and the correct CSS,
|
|
27
|
+
* which reads like a routing or a build bug and is neither. Two copies of
|
|
28
|
+
* `@types/react` are the same mistake one layer up: `tsc` rejects a component
|
|
29
|
+
* crossing between them, in a file nobody touched.
|
|
30
|
+
*
|
|
31
|
+
* The cause is almost never a direct dependency. It is a *transitive* peer
|
|
32
|
+
* range that stopped before the current major — `@blueprintjs/core` depends on
|
|
33
|
+
* `react-popper@2`, whose peers stop at `^18` — so npm honours the stale range,
|
|
34
|
+
* installs an older React for that subtree and hoists it. Nothing fails at
|
|
35
|
+
* install, nothing fails at build, and the bundle silently grows by a second
|
|
36
|
+
* copy of React. The fix is a pin in the root `overrides`, which is why a lock
|
|
37
|
+
* holding such a peer without one is reported even while the tree happens to be
|
|
38
|
+
* clean today: it is one fresh resolve away from not being.
|
|
39
|
+
* @param packageJson - The repository's root `package.json`, unparsed.
|
|
40
|
+
* @param packageLock - Its `package-lock.json`, unparsed.
|
|
41
|
+
* @param problems - Where each problem found is appended.
|
|
42
|
+
*/
|
|
43
|
+
export function readReactCopies(packageJson, packageLock, problems) {
|
|
44
|
+
const lock = parseJsonObject(packageLock);
|
|
45
|
+
if (lock === undefined)
|
|
46
|
+
return;
|
|
47
|
+
const packages = lock.packages;
|
|
48
|
+
if (typeof packages !== 'object' || packages === null)
|
|
49
|
+
return;
|
|
50
|
+
const entries = Object.entries(packages);
|
|
51
|
+
const resolved = resolvedCopies(entries);
|
|
52
|
+
// A repository with no React at all is not a React repository.
|
|
53
|
+
if (resolved.get('react')?.length === undefined)
|
|
54
|
+
return;
|
|
55
|
+
const declared = declarations(packageJson);
|
|
56
|
+
for (const name of SINGLE_COPY) {
|
|
57
|
+
const copies = resolved.get(name);
|
|
58
|
+
if (copies === undefined || copies.length === 0)
|
|
59
|
+
continue;
|
|
60
|
+
if (copies.length > 1) {
|
|
61
|
+
problems.push({
|
|
62
|
+
file: 'package-lock.json',
|
|
63
|
+
line: lineOf(packageLock, `"${copies[1]?.path ?? name}"`),
|
|
64
|
+
kind: 'duplicate-react',
|
|
65
|
+
message: `${name} resolves to ${copies.length} copies: ${copies
|
|
66
|
+
.map((copy) => `${copy.version} at ${copy.path}`)
|
|
67
|
+
.join(', ')}`,
|
|
68
|
+
hint: `pin ${name} in the root overrides, then reinstall from scratch — npm install alone keeps the stale tree on disk`,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
for (const copy of copies) {
|
|
72
|
+
const major = semver.major(semver.coerce(copy.version) ?? '0.0.0');
|
|
73
|
+
if (major !== REACT_MAJOR) {
|
|
74
|
+
problems.push({
|
|
75
|
+
file: 'package-lock.json',
|
|
76
|
+
line: lineOf(packageLock, `"${copy.path}"`),
|
|
77
|
+
kind: 'stray-react-major',
|
|
78
|
+
message: `${name} resolves to ${copy.version} at ${copy.path}, and the family runs React ${REACT_MAJOR}`,
|
|
79
|
+
hint: `declare ^${REACT_MAJOR} and pin it in the root overrides`,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const stale = stalePeer(entries);
|
|
85
|
+
if (stale !== undefined) {
|
|
86
|
+
for (const name of ['react', 'react-dom']) {
|
|
87
|
+
if (declared.get(name)?.override !== undefined)
|
|
88
|
+
continue;
|
|
89
|
+
problems.push({
|
|
90
|
+
file: 'package.json',
|
|
91
|
+
line: lineOf(packageJson, '"dependencies"'),
|
|
92
|
+
kind: 'unpinned-react',
|
|
93
|
+
message: `${stale.name} asks for ${stale.key} ${stale.range}, which excludes React ${REACT_MAJOR}, and nothing pins ${name}`,
|
|
94
|
+
hint: `add "overrides": { "react": "^${REACT_MAJOR}…", "react-dom": "^${REACT_MAJOR}…" } to the root package.json`,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
for (const name of SINGLE_COPY) {
|
|
99
|
+
const entry = declared.get(name);
|
|
100
|
+
if (entry?.override === undefined || entry.dependency === undefined) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if (entry.override !== entry.dependency) {
|
|
104
|
+
problems.push({
|
|
105
|
+
file: 'package.json',
|
|
106
|
+
line: lineOf(packageJson, `"${name}"`),
|
|
107
|
+
kind: 'conflicting-react-pin',
|
|
108
|
+
message: `${name} is pinned to ${entry.override} while it is depended on as ${entry.dependency}, so npm install fails with EOVERRIDE`,
|
|
109
|
+
hint: `write the same range in both: the override and the dependency are one decision`,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Every real copy of each tracked package, in lock order. A workspace link is
|
|
116
|
+
* not a copy — it is the repository pointing at itself.
|
|
117
|
+
* @param entries - The lock's `packages`, as entries.
|
|
118
|
+
* @returns The copies found, keyed by package name.
|
|
119
|
+
*/
|
|
120
|
+
function resolvedCopies(entries) {
|
|
121
|
+
const found = new Map();
|
|
122
|
+
for (const [path, value] of entries) {
|
|
123
|
+
if (typeof value !== 'object' || value === null)
|
|
124
|
+
continue;
|
|
125
|
+
const entry = value;
|
|
126
|
+
if (entry.link === true)
|
|
127
|
+
continue;
|
|
128
|
+
if (typeof entry.version !== 'string')
|
|
129
|
+
continue;
|
|
130
|
+
for (const name of SINGLE_COPY) {
|
|
131
|
+
if (path !== `node_modules/${name}` &&
|
|
132
|
+
!path.endsWith(`/node_modules/${name}`)) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
const copies = found.get(name) ?? [];
|
|
136
|
+
copies.push({ path, version: entry.version });
|
|
137
|
+
found.set(name, copies);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return found;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The first package in the lock whose React peer stopped before the family's
|
|
144
|
+
* major — the thing that makes npm resolve a second copy.
|
|
145
|
+
* @param entries - The lock's `packages`, as entries.
|
|
146
|
+
* @returns What asks for what, or undefined when every peer admits the major.
|
|
147
|
+
*/
|
|
148
|
+
function stalePeer(entries) {
|
|
149
|
+
for (const [path, value] of entries) {
|
|
150
|
+
if (typeof value !== 'object' || value === null)
|
|
151
|
+
continue;
|
|
152
|
+
const entry = value;
|
|
153
|
+
const peers = entry.peerDependencies;
|
|
154
|
+
if (typeof peers !== 'object' || peers === null)
|
|
155
|
+
continue;
|
|
156
|
+
const meta = (entry.peerDependenciesMeta ?? {});
|
|
157
|
+
for (const key of ['react', 'react-dom']) {
|
|
158
|
+
const range = peers[key];
|
|
159
|
+
if (typeof range !== 'string')
|
|
160
|
+
continue;
|
|
161
|
+
if (meta[key]?.optional === true)
|
|
162
|
+
continue;
|
|
163
|
+
if (admitsMajor(range))
|
|
164
|
+
continue;
|
|
165
|
+
return { name: path.replace(/^.*node_modules\//, ''), key, range };
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Whether a range admits any release of the family's React major. A range that
|
|
172
|
+
* cannot be parsed is given the benefit of the doubt: a checker that accuses on
|
|
173
|
+
* a spelling it does not know teaches people to ignore it.
|
|
174
|
+
* @param range - The peer range, as written.
|
|
175
|
+
* @returns True when some version of the major satisfies it.
|
|
176
|
+
*/
|
|
177
|
+
function admitsMajor(range) {
|
|
178
|
+
try {
|
|
179
|
+
return (semver.intersects(range, `>=${REACT_MAJOR}.0.0 <${REACT_MAJOR + 1}.0.0`, {
|
|
180
|
+
includePrerelease: true,
|
|
181
|
+
}) ||
|
|
182
|
+
semver.satisfies(`${REACT_MAJOR}.0.0`, range, { includePrerelease: true }));
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* What the root `package.json` asks for and what it pins, per tracked package.
|
|
190
|
+
* @param packageJson - The file, unparsed.
|
|
191
|
+
* @returns The declaration of each tracked package that has one.
|
|
192
|
+
*/
|
|
193
|
+
function declarations(packageJson) {
|
|
194
|
+
const found = new Map();
|
|
195
|
+
const parsed = parseJsonObject(packageJson);
|
|
196
|
+
if (parsed === undefined)
|
|
197
|
+
return found;
|
|
198
|
+
const dependencies = {
|
|
199
|
+
...stringEntries(parsed.dependencies),
|
|
200
|
+
...stringEntries(parsed.devDependencies),
|
|
201
|
+
};
|
|
202
|
+
const overrides = stringEntries(parsed.overrides);
|
|
203
|
+
for (const name of SINGLE_COPY) {
|
|
204
|
+
const dependency = dependencies[name];
|
|
205
|
+
const override = overrides[name];
|
|
206
|
+
if (dependency === undefined && override === undefined)
|
|
207
|
+
continue;
|
|
208
|
+
found.set(name, { dependency, override });
|
|
209
|
+
}
|
|
210
|
+
return found;
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=reactCopies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactCopies.js","sourceRoot":"","sources":["../../../src/deploy/core/reactCopies.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGnE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB,OAAO;IACP,WAAW;IACX,cAAc;IACd,kBAAkB;CACV,CAAC;AAkBX;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,eAAe,CAC7B,WAA+B,EAC/B,WAA+B,EAC/B,QAAyB;IAEzB,MAAM,IAAI,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAC1C,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO;IAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO;IAC9D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,QAAmC,CAAC,CAAC;IAE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