Closed zachsa closed 2 years ago
Sometimes the versions specified in the import map don't reflect the latest versions of NPM. For example:
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<script src="index.js" type="module"></script>
</head>
</html>
// install.js
const deps = [
'@apollo/client@',
'@arcgis/core@/Map',
'@arcgis/core@/config',
'@arcgis/core@/layers/BaseElevationLayer',
'@arcgis/core@/layers/ElevationLayer',
'@arcgis/core@/layers/FeatureLayer',
'@arcgis/core@/layers/VectorTileLayer',
'@arcgis/core@/views/SceneView',
'@emotion/cache@',
'@emotion/react@',
'@mdi/js@',
'@mui/material@/Accordion',
'@mui/material@/AccordionDetails',
'@mui/material@/AccordionSummary',
'@mui/material@/AppBar',
'@mui/material@/Autocomplete',
'@mui/material@/Box',
'@mui/material@/Breadcrumbs',
'@mui/material@/Button',
'@mui/material@/CircularProgress',
'@mui/material@/Container',
'@mui/material@/CssBaseline',
'@mui/material@/Dialog',
'@mui/material@/DialogActions',
'@mui/material@/DialogContent',
'@mui/material@/DialogContentText',
'@mui/material@/DialogTitle',
'@mui/material@/Divider',
'@mui/material@/Drawer',
'@mui/material@/Fade',
'@mui/material@/FormControl',
'@mui/material@/FormControlLabel',
'@mui/material@/FormGroup',
'@mui/material@/Grid',
'@mui/material@/Icon',
'@mui/material@/IconButton',
'@mui/material@/LinearProgress',
'@mui/material@/Link',
'@mui/material@/ListItemIcon',
'@mui/material@/ListItemText',
'@mui/material@/Menu',
'@mui/material@/MenuItem',
'@mui/material@/SvgIcon',
'@mui/material@/Switch',
'@mui/material@/TextField',
'@mui/material@/Toolbar',
'@mui/material@/Tooltip',
'@mui/material@/Typography',
'@mui/material@/styles/ThemeProvider',
'@mui/material@/styles/createTheme',
'@mui/material@/styles/styled',
'@mui/material@/styles/useTheme',
'@mui/material@/useScrollTrigger',
'@mui/system@/colorManipulator',
'cookie@',
'maplibre-gl@',
'react@',
'react-dom@',
'react-dom@/client',
'react-markdown@',
'react-router-dom@6',
'react@/jsx-runtime',
]
const generator = new Generator({
mapUrl: import.meta.url,
defaultProvider: 'jspm',
env: ['browser', 'development', 'module'],
})
await Promise.all(deps.map(async dep => {
console.log('Installing...', dep)
await generator.install(dep)
console.log('Installed!', dep)
}))
const htmlSource = await readFile('./index.html', 'utf8')
const html = await generator.htmlInject(htmlSource, {
trace: false,
preload: false,
integrity: false,
esModuleShims: true,
})
await writeFile('./new-index.html', html)
This results in this import map:
{
"imports": {
"@apollo/client": "https://ga.jspm.io/npm:@apollo/client@3.6.7/index.js",
"@arcgis/core/Map": "https://ga.jspm.io/npm:@arcgis/core@4.24.7/Map.js",
"@arcgis/core/config": "https://ga.jspm.io/npm:@arcgis/core@4.24.7/config.js",
"@arcgis/core/layers/BaseElevationLayer": "https://ga.jspm.io/npm:@arcgis/core@4.24.7/layers/BaseElevationLayer.js",
"@arcgis/core/layers/ElevationLayer": "https://ga.jspm.io/npm:@arcgis/core@4.24.7/layers/ElevationLayer.js",
"@arcgis/core/layers/FeatureLayer": "https://ga.jspm.io/npm:@arcgis/core@4.24.7/layers/FeatureLayer.js",
"@arcgis/core/layers/VectorTileLayer": "https://ga.jspm.io/npm:@arcgis/core@4.24.7/layers/VectorTileLayer.js",
"@arcgis/core/views/SceneView": "https://ga.jspm.io/npm:@arcgis/core@4.24.7/views/SceneView.js",
"@emotion/cache": "https://ga.jspm.io/npm:@emotion/cache@11.10.1/dist/emotion-cache.browser.esm.js",
"@emotion/react": "https://ga.jspm.io/npm:@emotion/react@11.10.0/dist/emotion-react.browser.esm.js",
"@mdi/js": "https://ga.jspm.io/npm:@mdi/js@7.0.96/mdi.js",
"@mui/material/Accordion": "https://ga.jspm.io/npm:@mui/material@5.10.0/Accordion/index.js",
"@mui/material/AccordionDetails": "https://ga.jspm.io/npm:@mui/material@5.10.0/AccordionDetails/index.js",
"@mui/material/AccordionSummary": "https://ga.jspm.io/npm:@mui/material@5.10.0/AccordionSummary/index.js",
"@mui/material/AppBar": "https://ga.jspm.io/npm:@mui/material@5.10.0/AppBar/index.js",
"@mui/material/Autocomplete": "https://ga.jspm.io/npm:@mui/material@5.10.0/Autocomplete/index.js",
"@mui/material/Box": "https://ga.jspm.io/npm:@mui/material@5.10.0/Box/index.js",
"@mui/material/Breadcrumbs": "https://ga.jspm.io/npm:@mui/material@5.10.0/Breadcrumbs/index.js",
"@mui/material/Button": "https://ga.jspm.io/npm:@mui/material@5.10.0/Button/index.js",
"@mui/material/CircularProgress": "https://ga.jspm.io/npm:@mui/material@5.10.0/CircularProgress/index.js",
"@mui/material/Container": "https://ga.jspm.io/npm:@mui/material@5.10.0/Container/index.js",
"@mui/material/CssBaseline": "https://ga.jspm.io/npm:@mui/material@5.10.0/CssBaseline/index.js",
"@mui/material/Dialog": "https://ga.jspm.io/npm:@mui/material@5.10.0/Dialog/index.js",
"@mui/material/DialogActions": "https://ga.jspm.io/npm:@mui/material@5.10.0/DialogActions/index.js",
"@mui/material/DialogContent": "https://ga.jspm.io/npm:@mui/material@5.10.0/DialogContent/index.js",
"@mui/material/DialogContentText": "https://ga.jspm.io/npm:@mui/material@5.10.0/DialogContentText/index.js",
"@mui/material/DialogTitle": "https://ga.jspm.io/npm:@mui/material@5.10.0/DialogTitle/index.js",
"@mui/material/Divider": "https://ga.jspm.io/npm:@mui/material@5.10.0/Divider/index.js",
"@mui/material/Drawer": "https://ga.jspm.io/npm:@mui/material@5.10.0/Drawer/index.js",
"@mui/material/Fade": "https://ga.jspm.io/npm:@mui/material@5.10.0/Fade/index.js",
"@mui/material/FormControl": "https://ga.jspm.io/npm:@mui/material@5.10.0/FormControl/index.js",
"@mui/material/FormControlLabel": "https://ga.jspm.io/npm:@mui/material@5.10.0/FormControlLabel/index.js",
"@mui/material/FormGroup": "https://ga.jspm.io/npm:@mui/material@5.10.0/FormGroup/index.js",
"@mui/material/Grid": "https://ga.jspm.io/npm:@mui/material@5.10.0/Grid/index.js",
"@mui/material/Icon": "https://ga.jspm.io/npm:@mui/material@5.10.0/Icon/index.js",
"@mui/material/IconButton": "https://ga.jspm.io/npm:@mui/material@5.10.0/IconButton/index.js",
"@mui/material/LinearProgress": "https://ga.jspm.io/npm:@mui/material@5.10.0/LinearProgress/index.js",
"@mui/material/Link": "https://ga.jspm.io/npm:@mui/material@5.10.0/Link/index.js",
"@mui/material/ListItemIcon": "https://ga.jspm.io/npm:@mui/material@5.10.0/ListItemIcon/index.js",
"@mui/material/ListItemText": "https://ga.jspm.io/npm:@mui/material@5.10.0/ListItemText/index.js",
"@mui/material/Menu": "https://ga.jspm.io/npm:@mui/material@5.10.0/Menu/index.js",
"@mui/material/MenuItem": "https://ga.jspm.io/npm:@mui/material@5.10.0/MenuItem/index.js",
"@mui/material/SvgIcon": "https://ga.jspm.io/npm:@mui/material@5.10.0/SvgIcon/index.js",
"@mui/material/Switch": "https://ga.jspm.io/npm:@mui/material@5.10.0/Switch/index.js",
"@mui/material/TextField": "https://ga.jspm.io/npm:@mui/material@5.10.0/TextField/index.js",
"@mui/material/Toolbar": "https://ga.jspm.io/npm:@mui/material@5.10.0/Toolbar/index.js",
"@mui/material/Tooltip": "https://ga.jspm.io/npm:@mui/material@5.10.0/Tooltip/index.js",
"@mui/material/Typography": "https://ga.jspm.io/npm:@mui/material@5.10.0/Typography/index.js",
"@mui/material/styles/ThemeProvider": "https://ga.jspm.io/npm:@mui/material@5.10.0/styles/ThemeProvider.js",
"@mui/material/styles/createTheme": "https://ga.jspm.io/npm:@mui/material@5.10.0/styles/createTheme.js",
"@mui/material/styles/styled": "https://ga.jspm.io/npm:@mui/material@5.10.0/styles/styled.js",
"@mui/material/styles/useTheme": "https://ga.jspm.io/npm:@mui/material@5.10.0/styles/useTheme.js",
"@mui/material/useScrollTrigger": "https://ga.jspm.io/npm:@mui/material@5.10.0/useScrollTrigger/index.js",
"@mui/system/colorManipulator": "https://ga.jspm.io/npm:@mui/system@5.10.0/dev.colorManipulator.js",
"cookie": "https://ga.jspm.io/npm:cookie@0.5.0/index.js",
"maplibre-gl": "https://ga.jspm.io/npm:maplibre-gl@2.2.1/dist/maplibre-gl.js",
"react": "https://ga.jspm.io/npm:react@18.2.0/dev.index.js",
"react-dom": "https://ga.jspm.io/npm:react-dom@18.2.0/dev.index.js",
"react-dom/client": "https://ga.jspm.io/npm:react-dom@18.2.0/dev.client.js",
"react-markdown": "https://ga.jspm.io/npm:react-markdown@8.0.3/index.js",
"react-router-dom": "https://ga.jspm.io/npm:react-router-dom@6.3.0/index.js",
"react/jsx-runtime": "https://ga.jspm.io/npm:react@18.2.0/dev.jsx-runtime.js"
},
"scopes": {
"https://ga.jspm.io/": {
"#GlobalStyles": "https://ga.jspm.io/npm:@mui/styled-engine@5.10.0/GlobalStyles/index.js",
"#ListboxUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/ListboxUnstyled/index.js",
"#OptionGroupUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/OptionGroupUnstyled/index.js",
"#StyledEngineProvider": "https://ga.jspm.io/npm:@mui/styled-engine@5.10.0/StyledEngineProvider/index.js",
"#color.js": "https://ga.jspm.io/npm:unist-util-visit-parents@5.1.0/color.browser.js",
"#lib/minpath.js": "https://ga.jspm.io/npm:vfile@5.3.4/lib/minpath.browser.js",
"#lib/minproc.js": "https://ga.jspm.io/npm:vfile@5.3.4/lib/minproc.browser.js",
"#lib/minurl.js": "https://ga.jspm.io/npm:vfile@5.3.4/lib/minurl.browser.js",
"@babel/runtime/helpers/esm/assertThisInitialized": "https://ga.jspm.io/npm:@babel/runtime@7.18.9/helpers/esm/assertThisInitialized.js",
"@babel/runtime/helpers/esm/extends": "https://ga.jspm.io/npm:@babel/runtime@7.18.9/helpers/esm/extends.js",
"@babel/runtime/helpers/esm/inheritsLoose": "https://ga.jspm.io/npm:@babel/runtime@7.18.9/helpers/esm/inheritsLoose.js",
"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose": "https://ga.jspm.io/npm:@babel/runtime@7.18.9/helpers/esm/objectWithoutPropertiesLoose.js",
"@babel/runtime/helpers/extends": "https://ga.jspm.io/npm:@babel/runtime@7.18.9/helpers/esm/extends.js",
"@emotion/hash": "https://ga.jspm.io/npm:@emotion/hash@0.9.0/dist/emotion-hash.esm.js",
"@emotion/is-prop-valid": "https://ga.jspm.io/npm:@emotion/is-prop-valid@1.2.0/dist/emotion-is-prop-valid.esm.js",
"@emotion/memoize": "https://ga.jspm.io/npm:@emotion/memoize@0.8.0/dist/emotion-memoize.esm.js",
"@emotion/serialize": "https://ga.jspm.io/npm:@emotion/serialize@1.1.0/dist/emotion-serialize.browser.esm.js",
"@emotion/sheet": "https://ga.jspm.io/npm:@emotion/sheet@1.2.0/dist/emotion-sheet.browser.esm.js",
"@emotion/styled": "https://ga.jspm.io/npm:@emotion/styled@11.10.0/dist/emotion-styled.browser.esm.js",
"@emotion/unitless": "https://ga.jspm.io/npm:@emotion/unitless@0.8.0/dist/emotion-unitless.esm.js",
"@emotion/utils": "https://ga.jspm.io/npm:@emotion/utils@1.2.0/dist/emotion-utils.browser.esm.js",
"@emotion/weak-memoize": "https://ga.jspm.io/npm:@emotion/weak-memoize@0.3.0/dist/emotion-weak-memoize.esm.js",
"@esri/arcgis-html-sanitizer": "https://ga.jspm.io/npm:@esri/arcgis-html-sanitizer@2.10.0/dist/esm/index.js",
"@esri/calcite-colors": "https://ga.jspm.io/npm:@esri/calcite-colors@6.0.1/dist/colors.module.js",
"@esri/calcite-components/dist/components/": "https://ga.jspm.io/npm:@esri/calcite-components@1.0.0-beta.82/dist/components/",
"@mui/base": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/index.js",
"@mui/base/AutocompleteUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/AutocompleteUnstyled/index.js",
"@mui/base/BadgeUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/BadgeUnstyled/index.js",
"@mui/base/ButtonUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/ButtonUnstyled/index.js",
"@mui/base/ClickAwayListener": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/ClickAwayListener/index.js",
"@mui/base/FormControlUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/FormControlUnstyled/index.js",
"@mui/base/InputUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/InputUnstyled/index.js",
"@mui/base/MenuItemUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/MenuItemUnstyled/index.js",
"@mui/base/MenuUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/MenuUnstyled/index.js",
"@mui/base/ModalUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/ModalUnstyled/index.js",
"@mui/base/MultiSelectUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/MultiSelectUnstyled/index.js",
"@mui/base/NoSsr": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/NoSsr/index.js",
"@mui/base/OptionUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/OptionUnstyled/index.js",
"@mui/base/PopperUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/PopperUnstyled/index.js",
"@mui/base/Portal": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/Portal/index.js",
"@mui/base/SelectUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/SelectUnstyled/index.js",
"@mui/base/SliderUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/SliderUnstyled/index.js",
"@mui/base/SwitchUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/SwitchUnstyled/index.js",
"@mui/base/TabPanelUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/TabPanelUnstyled/index.js",
"@mui/base/TabUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/TabUnstyled/index.js",
"@mui/base/TabsListUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/TabsListUnstyled/index.js",
"@mui/base/TabsUnstyled": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/TabsUnstyled/index.js",
"@mui/base/TextareaAutosize": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/TextareaAutosize/index.js",
"@mui/base/TrapFocus": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/TrapFocus/index.js",
"@mui/base/className": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/className/index.js",
"@mui/base/composeClasses": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/composeClasses/index.js",
"@mui/base/generateUtilityClass": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/generateUtilityClass/index.js",
"@mui/base/generateUtilityClasses": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/generateUtilityClasses/index.js",
"@mui/base/utils": "https://ga.jspm.io/npm:@mui/base@5.0.0-alpha.92/utils/index.js",
"@mui/material/Backdrop": "https://ga.jspm.io/npm:@mui/material@5.10.0/Backdrop/index.js",
"@mui/material/ButtonBase": "https://ga.jspm.io/npm:@mui/material@5.10.0/ButtonBase/index.js",
"@mui/material/Chip": "https://ga.jspm.io/npm:@mui/material@5.10.0/Chip/index.js",
"@mui/material/Collapse": "https://ga.jspm.io/npm:@mui/material@5.10.0/Collapse/index.js",
"@mui/material/FilledInput": "https://ga.jspm.io/npm:@mui/material@5.10.0/FilledInput/index.js",
"@mui/material/FormHelperText": "https://ga.jspm.io/npm:@mui/material@5.10.0/FormHelperText/index.js",
"@mui/material/FormLabel": "https://ga.jspm.io/npm:@mui/material@5.10.0/FormLabel/index.js",
"@mui/material/GlobalStyles": "https://ga.jspm.io/npm:@mui/material@5.10.0/GlobalStyles/index.js",
"@mui/material/Grow": "https://ga.jspm.io/npm:@mui/material@5.10.0/Grow/index.js",
"@mui/material/Input": "https://ga.jspm.io/npm:@mui/material@5.10.0/Input/index.js",
"@mui/material/InputBase": "https://ga.jspm.io/npm:@mui/material@5.10.0/InputBase/index.js",
"@mui/material/InputLabel": "https://ga.jspm.io/npm:@mui/material@5.10.0/InputLabel/index.js",
"@mui/material/List": "https://ga.jspm.io/npm:@mui/material@5.10.0/List/index.js",
"@mui/material/ListSubheader": "https://ga.jspm.io/npm:@mui/material@5.10.0/ListSubheader/index.js",
"@mui/material/MenuList": "https://ga.jspm.io/npm:@mui/material@5.10.0/MenuList/index.js",
"@mui/material/Modal": "https://ga.jspm.io/npm:@mui/material@5.10.0/Modal/index.js",
"@mui/material/OutlinedInput": "https://ga.jspm.io/npm:@mui/material@5.10.0/OutlinedInput/index.js",
"@mui/material/Paper": "https://ga.jspm.io/npm:@mui/material@5.10.0/Paper/index.js",
"@mui/material/Popover": "https://ga.jspm.io/npm:@mui/material@5.10.0/Popover/index.js",
"@mui/material/Popper": "https://ga.jspm.io/npm:@mui/material@5.10.0/Popper/index.js",
"@mui/material/Select": "https://ga.jspm.io/npm:@mui/material@5.10.0/Select/index.js",
"@mui/material/Slide": "https://ga.jspm.io/npm:@mui/material@5.10.0/Slide/index.js",
"@mui/material/className": "https://ga.jspm.io/npm:@mui/material@5.10.0/className/index.js",
"@mui/material/styles": "https://ga.jspm.io/npm:@mui/material@5.10.0/styles/index.js",
"@mui/material/utils": "https://ga.jspm.io/npm:@mui/material@5.10.0/utils/index.js",
"@mui/private-theming": "https://ga.jspm.io/npm:@mui/private-theming@5.9.3/index.js",
"@mui/private-theming/ThemeProvider": "https://ga.jspm.io/npm:@mui/private-theming@5.9.3/ThemeProvider/index.js",
"@mui/private-theming/useTheme": "https://ga.jspm.io/npm:@mui/private-theming@5.9.3/useTheme/index.js",
"@mui/styled-engine": "https://ga.jspm.io/npm:@mui/styled-engine@5.10.0/index.js",
"@mui/system": "https://ga.jspm.io/npm:@mui/system@5.10.0/esm/index.js",
"@mui/utils": "https://ga.jspm.io/npm:@mui/utils@5.9.3/esm/index.js",
"@popperjs/core": "https://ga.jspm.io/npm:@popperjs/core@2.11.6/lib/index.js",
"@stencil/core/internal/app-data": "https://ga.jspm.io/npm:@stencil/core@2.15.1/internal/app-data/index.js",
"@stencil/core/internal/client": "https://ga.jspm.io/npm:@stencil/core@2.15.1/internal/client/index.js",
"@wry/context": "https://ga.jspm.io/npm:@wry/context@0.6.1/lib/context.esm.js",
"@wry/equality": "https://ga.jspm.io/npm:@wry/equality@0.5.1/lib/equality.esm.js",
"@wry/trie": "https://ga.jspm.io/npm:@wry/trie@0.3.1/lib/trie.esm.js",
"bail": "https://ga.jspm.io/npm:bail@2.0.2/index.js",
"clsx": "https://ga.jspm.io/npm:clsx@1.2.1/dist/clsx.m.js",
"comma-separated-tokens": "https://ga.jspm.io/npm:comma-separated-tokens@2.0.2/index.js",
"debug": "https://ga.jspm.io/npm:debug@4.3.4/src/browser.js",
"decode-named-character-reference": "https://ga.jspm.io/npm:decode-named-character-reference@1.0.2/index.dom.js",
"dequal": "https://ga.jspm.io/npm:dequal@2.0.3/dist/index.mjs",
"diff": "https://ga.jspm.io/npm:diff@5.1.0/lib/index.mjs",
"dom-helpers/addClass": "https://ga.jspm.io/npm:dom-helpers@5.2.0/esm/addClass.js",
"dom-helpers/removeClass": "https://ga.jspm.io/npm:dom-helpers@5.2.0/esm/removeClass.js",
"extend": "https://ga.jspm.io/npm:extend@3.0.2/index.js",
"focus-trap": "https://ga.jspm.io/npm:focus-trap@6.9.4/dist/focus-trap.esm.js",
"graphql": "https://ga.jspm.io/npm:graphql@16.5.0/index.mjs",
"graphql-tag": "https://ga.jspm.io/npm:graphql-tag@2.12.6/lib/index.js",
"hast-util-whitespace": "https://ga.jspm.io/npm:hast-util-whitespace@2.0.0/index.js",
"history": "https://ga.jspm.io/npm:history@5.3.0/index.js",
"hoist-non-react-statics": "https://ga.jspm.io/npm:hoist-non-react-statics@3.3.2/dist/hoist-non-react-statics.cjs.js",
"inline-style-parser": "https://ga.jspm.io/npm:inline-style-parser@0.1.1/index.js",
"is-buffer": "https://ga.jspm.io/npm:is-buffer@2.0.5/index.js",
"is-plain-obj": "https://ga.jspm.io/npm:is-plain-obj@4.1.0/index.js",
"kleur": "https://ga.jspm.io/npm:kleur@4.1.5/index.mjs",
"luxon": "https://ga.jspm.io/npm:luxon@2.4.0/build/cjs-browser/luxon.js",
"mdast-util-definitions": "https://ga.jspm.io/npm:mdast-util-definitions@5.1.1/index.js",
"mdast-util-from-markdown": "https://ga.jspm.io/npm:mdast-util-from-markdown@1.2.0/dev/index.js",
"mdast-util-to-hast": "https://ga.jspm.io/npm:mdast-util-to-hast@12.2.0/index.js",
"mdast-util-to-string": "https://ga.jspm.io/npm:mdast-util-to-string@3.1.0/index.js",
"mdurl/encode.js": "https://ga.jspm.io/npm:mdurl@1.0.1/encode.js",
"micromark-core-commonmark": "https://ga.jspm.io/npm:micromark-core-commonmark@1.0.6/dev/index.js",
"micromark-factory-destination": "https://ga.jspm.io/npm:micromark-factory-destination@1.0.0/dev/index.js",
"micromark-factory-label": "https://ga.jspm.io/npm:micromark-factory-label@1.0.2/dev/index.js",
"micromark-factory-space": "https://ga.jspm.io/npm:micromark-factory-space@1.0.0/dev/index.js",
"micromark-factory-title": "https://ga.jspm.io/npm:micromark-factory-title@1.0.2/dev/index.js",
"micromark-factory-whitespace": "https://ga.jspm.io/npm:micromark-factory-whitespace@1.0.0/dev/index.js",
"micromark-util-character": "https://ga.jspm.io/npm:micromark-util-character@1.1.0/dev/index.js",
"micromark-util-chunked": "https://ga.jspm.io/npm:micromark-util-chunked@1.0.0/dev/index.js",
"micromark-util-classify-character": "https://ga.jspm.io/npm:micromark-util-classify-character@1.0.0/dev/index.js",
"micromark-util-combine-extensions": "https://ga.jspm.io/npm:micromark-util-combine-extensions@1.0.0/index.js",
"micromark-util-decode-numeric-character-reference": "https://ga.jspm.io/npm:micromark-util-decode-numeric-character-reference@1.0.0/dev/index.js",
"micromark-util-decode-string": "https://ga.jspm.io/npm:micromark-util-decode-string@1.0.2/dev/index.js",
"micromark-util-encode": "https://ga.jspm.io/npm:micromark-util-encode@1.0.1/index.js",
"micromark-util-html-tag-name": "https://ga.jspm.io/npm:micromark-util-html-tag-name@1.1.0/index.js",
"micromark-util-normalize-identifier": "https://ga.jspm.io/npm:micromark-util-normalize-identifier@1.0.0/dev/index.js",
"micromark-util-resolve-all": "https://ga.jspm.io/npm:micromark-util-resolve-all@1.0.0/index.js",
"micromark-util-sanitize-uri": "https://ga.jspm.io/npm:micromark-util-sanitize-uri@1.0.0/dev/index.js",
"micromark-util-subtokenize": "https://ga.jspm.io/npm:micromark-util-subtokenize@1.0.2/dev/index.js",
"micromark-util-symbol/": "https://ga.jspm.io/npm:micromark-util-symbol@1.0.1/",
"micromark/lib/": "https://ga.jspm.io/npm:micromark@3.0.10/dev/lib/",
"ms": "https://ga.jspm.io/npm:ms@2.1.2/index.js",
"object-assign": "https://ga.jspm.io/npm:object-assign@4.1.1/index.js",
"optimism": "https://ga.jspm.io/npm:optimism@0.16.1/lib/bundle.cjs.js",
"process": "https://ga.jspm.io/npm:@jspm/core@2.0.0-beta.24/nodelibs/browser/process.js",
"prop-types": "https://ga.jspm.io/npm:prop-types@15.8.1/dev.index.js",
"property-information": "https://ga.jspm.io/npm:property-information@6.1.1/index.js",
"react-is": "https://ga.jspm.io/npm:react-is@18.2.0/dev.index.js",
"react-router": "https://ga.jspm.io/npm:react-router@6.3.0/index.js",
"react-transition-group": "https://ga.jspm.io/npm:react-transition-group@4.4.5/esm/index.js",
"remark-parse": "https://ga.jspm.io/npm:remark-parse@10.0.1/index.js",
"remark-rehype": "https://ga.jspm.io/npm:remark-rehype@10.1.0/index.js",
"scheduler": "https://ga.jspm.io/npm:scheduler@0.23.0/dev.index.js",
"space-separated-tokens": "https://ga.jspm.io/npm:space-separated-tokens@2.0.1/index.js",
"style-to-object": "https://ga.jspm.io/npm:style-to-object@0.3.0/index.js",
"stylis": "https://ga.jspm.io/npm:stylis@4.0.13/index.js",
"symbol-observable": "https://ga.jspm.io/npm:symbol-observable@4.0.0/lib/index.js",
"tabbable": "https://ga.jspm.io/npm:tabbable@5.3.3/dist/index.esm.js",
"trim-lines": "https://ga.jspm.io/npm:trim-lines@3.0.1/index.js",
"trough": "https://ga.jspm.io/npm:trough@2.1.0/index.js",
"ts-invariant": "https://ga.jspm.io/npm:ts-invariant@0.10.3/lib/invariant.js",
"ts-invariant/process/index.js": "https://ga.jspm.io/npm:ts-invariant@0.10.3/process/index.js",
"tslib": "https://ga.jspm.io/npm:tslib@2.4.0/tslib.es6.js",
"unified": "https://ga.jspm.io/npm:unified@10.1.2/index.js",
"unist-builder": "https://ga.jspm.io/npm:unist-builder@3.0.0/index.js",
"unist-util-generated": "https://ga.jspm.io/npm:unist-util-generated@2.0.0/index.js",
"unist-util-is": "https://ga.jspm.io/npm:unist-util-is@5.1.1/index.js",
"unist-util-position": "https://ga.jspm.io/npm:unist-util-position@4.0.3/index.js",
"unist-util-stringify-position": "https://ga.jspm.io/npm:unist-util-stringify-position@3.0.2/index.js",
"unist-util-visit": "https://ga.jspm.io/npm:unist-util-visit@4.1.0/index.js",
"unist-util-visit-parents": "https://ga.jspm.io/npm:unist-util-visit-parents@5.1.0/index.js",
"uvu/assert": "https://ga.jspm.io/npm:uvu@0.5.6/assert/index.mjs",
"uvu/diff": "https://ga.jspm.io/npm:uvu@0.5.6/diff/index.mjs",
"vfile": "https://ga.jspm.io/npm:vfile@5.3.4/index.js",
"vfile-message": "https://ga.jspm.io/npm:vfile-message@3.1.2/index.js",
"zen-observable-ts": "https://ga.jspm.io/npm:zen-observable-ts@1.2.5/module.js"
},
"https://ga.jspm.io/npm:hoist-non-react-statics@3.3.2/": {
"react-is": "https://ga.jspm.io/npm:react-is@16.13.1/dev.index.js"
},
"https://ga.jspm.io/npm:prop-types@15.8.1/": {
"react-is": "https://ga.jspm.io/npm:react-is@16.13.1/dev.index.js"
}
}
}
Some issues:
<pkg>@
would give me the latest unstable version. This doesn't seem to be the case, since I'm getting the latest stable version for the @arcgis/core
packages, and this is the case for React as well. I assume there are lots of other examples where I'm not getting the latest unstable.@apollo/client
should be 3.6.9@
Running:
generator.install('@arcgis/core@next/Map')
DOES then give me the latest unstable version. And subsequently running
generator.install('@arcgis/core@/Map')
goes back to the latest stable version
The react-router-dom case was specifically a CDN build issue, I've run a rebuild and this is now working. Thanks for reporting it!
The versioning issues do sound like real regressions, I'm working on versioning cases today and will address this issue.
Turns out the pkg@
pattern wasn't completely piped through. I've fixed this in https://github.com/jspm/generator/pull/167.
Using
@jspm/generator@^1.0.0-beta.35
, runninggenerator.install
does not default to the latest stable version of a package as present on NPM. For example:This outputs in the import map: