Skip to content

Commit

Permalink
Merge pull request #6938 from jasongrout/package-resolution
Browse files Browse the repository at this point in the history
Adds yarn package resolution to build
  • Loading branch information
blink1073 committed Aug 2, 2019
2 parents 76c969c + 805a9fb commit 73fef64
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 39 deletions.
7 changes: 6 additions & 1 deletion buildutils/src/ensure-repo.ts
Expand Up @@ -146,6 +146,7 @@ function ensureJupyterlab(): string[] {
corePackage.jupyterlab.mimeExtensions = {};
corePackage.jupyterlab.linkedPackages = {};
corePackage.dependencies = {};
corePackage.resolutions = {};

let singletonPackages = corePackage.jupyterlab.singletonPackages;
let vendorPackages = corePackage.jupyterlab.vendor;
Expand Down Expand Up @@ -179,13 +180,17 @@ function ensureJupyterlab(): string[] {
}

// Make sure it is included as a dependency.
corePackage.dependencies[data.name] = '^' + String(data.version);
corePackage.dependencies[data.name] = '~' + String(data.version);
corePackage.resolutions[data.name] = '~' + String(data.version);
// Add its dependencies to the core dependencies if they are in the
// singleton packages or vendor packages.
let deps = data.dependencies || {};
for (let dep in deps) {
if (singletonPackages.indexOf(dep) !== -1) {
corePackage.dependencies[dep] = deps[dep];
if (!(dep in corePackage.resolutions)) {
corePackage.resolutions[dep] = deps[dep];
}
}
if (vendorPackages.indexOf(dep) !== -1) {
corePackage.dependencies[dep] = deps[dep];
Expand Down
137 changes: 99 additions & 38 deletions dev_mode/package.json
Expand Up @@ -16,58 +16,58 @@
},
"dependencies": {
"@jupyterlab/application": "^1.0.2",
"@jupyterlab/application-extension": "^1.0.2",
"@jupyterlab/application-extension": "~1.0.2",
"@jupyterlab/apputils": "^1.0.2",
"@jupyterlab/apputils-extension": "^1.0.2",
"@jupyterlab/codemirror-extension": "^1.0.2",
"@jupyterlab/completer-extension": "^1.0.2",
"@jupyterlab/apputils-extension": "~1.0.2",
"@jupyterlab/codemirror-extension": "~1.0.2",
"@jupyterlab/completer-extension": "~1.0.2",
"@jupyterlab/console": "^1.0.2",
"@jupyterlab/console-extension": "^1.0.3",
"@jupyterlab/console-extension": "~1.0.3",
"@jupyterlab/coreutils": "^3.0.0",
"@jupyterlab/csvviewer-extension": "^1.0.2",
"@jupyterlab/csvviewer-extension": "~1.0.2",
"@jupyterlab/docmanager": "^1.0.2",
"@jupyterlab/docmanager-extension": "^1.0.2",
"@jupyterlab/documentsearch-extension": "^1.0.2",
"@jupyterlab/docmanager-extension": "~1.0.2",
"@jupyterlab/documentsearch-extension": "~1.0.2",
"@jupyterlab/extensionmanager": "^1.0.2",
"@jupyterlab/extensionmanager-extension": "^1.0.2",
"@jupyterlab/extensionmanager-extension": "~1.0.2",
"@jupyterlab/filebrowser": "^1.0.3",
"@jupyterlab/filebrowser-extension": "^1.0.4",
"@jupyterlab/filebrowser-extension": "~1.0.4",
"@jupyterlab/fileeditor": "^1.0.2",
"@jupyterlab/fileeditor-extension": "^1.0.3",
"@jupyterlab/help-extension": "^1.0.2",
"@jupyterlab/htmlviewer-extension": "^1.0.2",
"@jupyterlab/hub-extension": "^1.0.2",
"@jupyterlab/fileeditor-extension": "~1.0.3",
"@jupyterlab/help-extension": "~1.0.2",
"@jupyterlab/htmlviewer-extension": "~1.0.2",
"@jupyterlab/hub-extension": "~1.0.2",
"@jupyterlab/imageviewer": "^1.0.2",
"@jupyterlab/imageviewer-extension": "^1.0.2",
"@jupyterlab/inspector-extension": "^1.0.2",
"@jupyterlab/javascript-extension": "^1.0.2",
"@jupyterlab/json-extension": "^1.0.2",
"@jupyterlab/imageviewer-extension": "~1.0.2",
"@jupyterlab/inspector-extension": "~1.0.2",
"@jupyterlab/javascript-extension": "~1.0.2",
"@jupyterlab/json-extension": "~1.0.2",
"@jupyterlab/launcher": "^1.0.2",
"@jupyterlab/launcher-extension": "^1.0.2",
"@jupyterlab/mainmenu-extension": "^1.0.2",
"@jupyterlab/markdownviewer-extension": "^1.0.2",
"@jupyterlab/mathjax2-extension": "^1.0.2",
"@jupyterlab/launcher-extension": "~1.0.2",
"@jupyterlab/mainmenu-extension": "~1.0.2",
"@jupyterlab/markdownviewer-extension": "~1.0.2",
"@jupyterlab/mathjax2-extension": "~1.0.2",
"@jupyterlab/notebook": "^1.0.2",
"@jupyterlab/notebook-extension": "^1.0.3",
"@jupyterlab/pdf-extension": "^1.0.0",
"@jupyterlab/notebook-extension": "~1.0.3",
"@jupyterlab/pdf-extension": "~1.0.0",
"@jupyterlab/rendermime": "^1.0.2",
"@jupyterlab/rendermime-extension": "^1.0.2",
"@jupyterlab/rendermime-extension": "~1.0.2",
"@jupyterlab/rendermime-interfaces": "^1.3.0",
"@jupyterlab/running-extension": "^1.0.2",
"@jupyterlab/running-extension": "~1.0.2",
"@jupyterlab/services": "^4.0.2",
"@jupyterlab/settingeditor-extension": "^1.0.2",
"@jupyterlab/shortcuts-extension": "^1.0.2",
"@jupyterlab/statusbar-extension": "^1.0.2",
"@jupyterlab/tabmanager-extension": "^1.0.2",
"@jupyterlab/settingeditor-extension": "~1.0.2",
"@jupyterlab/shortcuts-extension": "~1.0.2",
"@jupyterlab/statusbar-extension": "~1.0.2",
"@jupyterlab/tabmanager-extension": "~1.0.2",
"@jupyterlab/terminal": "^1.0.2",
"@jupyterlab/terminal-extension": "^1.0.2",
"@jupyterlab/theme-dark-extension": "^1.0.2",
"@jupyterlab/theme-light-extension": "^1.0.2",
"@jupyterlab/terminal-extension": "~1.0.2",
"@jupyterlab/theme-dark-extension": "~1.0.2",
"@jupyterlab/theme-light-extension": "~1.0.2",
"@jupyterlab/tooltip": "^1.0.2",
"@jupyterlab/tooltip-extension": "^1.0.2",
"@jupyterlab/vdom-extension": "^1.0.2",
"@jupyterlab/vega4-extension": "^1.0.1",
"@jupyterlab/vega5-extension": "^1.0.1",
"@jupyterlab/tooltip-extension": "~1.0.2",
"@jupyterlab/vdom-extension": "~1.0.2",
"@jupyterlab/vega4-extension": "~1.0.1",
"@jupyterlab/vega5-extension": "~1.0.1",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/application": "^1.6.3",
"@phosphor/commands": "^1.6.3",
Expand Down Expand Up @@ -116,6 +116,65 @@
"webpack-visualizer-plugin": "^0.1.11",
"yarn-deduplicate": "^1.1.1"
},
"resolutions": {
"@jupyterlab/application": "~1.0.2",
"@jupyterlab/application-extension": "~1.0.2",
"@jupyterlab/apputils": "^1.0.2",
"@jupyterlab/apputils-extension": "~1.0.2",
"@jupyterlab/codemirror-extension": "~1.0.2",
"@jupyterlab/completer-extension": "~1.0.2",
"@jupyterlab/console": "^1.0.2",
"@jupyterlab/console-extension": "~1.0.3",
"@jupyterlab/coreutils": "~3.0.0",
"@jupyterlab/csvviewer-extension": "~1.0.2",
"@jupyterlab/docmanager": "^1.0.2",
"@jupyterlab/docmanager-extension": "~1.0.2",
"@jupyterlab/documentsearch-extension": "~1.0.2",
"@jupyterlab/extensionmanager": "^1.0.2",
"@jupyterlab/extensionmanager-extension": "~1.0.2",
"@jupyterlab/filebrowser": "^1.0.3",
"@jupyterlab/filebrowser-extension": "~1.0.4",
"@jupyterlab/fileeditor": "^1.0.2",
"@jupyterlab/fileeditor-extension": "~1.0.3",
"@jupyterlab/help-extension": "~1.0.2",
"@jupyterlab/htmlviewer-extension": "~1.0.2",
"@jupyterlab/hub-extension": "~1.0.2",
"@jupyterlab/imageviewer": "^1.0.2",
"@jupyterlab/imageviewer-extension": "~1.0.2",
"@jupyterlab/inspector-extension": "~1.0.2",
"@jupyterlab/javascript-extension": "~1.0.2",
"@jupyterlab/json-extension": "~1.0.2",
"@jupyterlab/launcher": "^1.0.2",
"@jupyterlab/launcher-extension": "~1.0.2",
"@jupyterlab/mainmenu-extension": "~1.0.2",
"@jupyterlab/markdownviewer-extension": "~1.0.2",
"@jupyterlab/mathjax2-extension": "~1.0.2",
"@jupyterlab/notebook": "^1.0.2",
"@jupyterlab/notebook-extension": "~1.0.3",
"@jupyterlab/pdf-extension": "~1.0.0",
"@jupyterlab/rendermime": "^1.0.2",
"@jupyterlab/rendermime-extension": "~1.0.2",
"@jupyterlab/rendermime-interfaces": "^1.3.0",
"@jupyterlab/running-extension": "~1.0.2",
"@jupyterlab/services": "^4.0.2",
"@jupyterlab/settingeditor-extension": "~1.0.2",
"@jupyterlab/shortcuts-extension": "~1.0.2",
"@jupyterlab/statusbar-extension": "~1.0.2",
"@jupyterlab/tabmanager-extension": "~1.0.2",
"@jupyterlab/terminal": "^1.0.2",
"@jupyterlab/terminal-extension": "~1.0.2",
"@jupyterlab/theme-dark-extension": "~1.0.2",
"@jupyterlab/theme-light-extension": "~1.0.2",
"@jupyterlab/tooltip": "^1.0.2",
"@jupyterlab/tooltip-extension": "~1.0.2",
"@jupyterlab/vdom-extension": "~1.0.2",
"@jupyterlab/vega4-extension": "~1.0.1",
"@jupyterlab/vega5-extension": "~1.0.1",
"@phosphor/coreutils": "^1.3.1",
"@phosphor/widgets": "^1.8.0",
"react": "~16.8.4",
"react-dom": "~16.8.4"
},
"engines": {
"node": ">=6.11.5"
},
Expand Down Expand Up @@ -183,7 +242,9 @@
"@jupyterlab/terminal",
"@jupyterlab/tooltip",
"@phosphor/coreutils",
"@phosphor/widgets"
"@phosphor/widgets",
"react",
"react-dom"
],
"vendor": [
"@phosphor/algorithm",
Expand Down

0 comments on commit 73fef64

Please sign in to comment.