Skip to content

Commit

Permalink
Merge pull request #6338 from blink1073/should-include
Browse files Browse the repository at this point in the history
Add metadata for core mode packages
  • Loading branch information
blink1073 committed May 21, 2019
2 parents fd4e23b + 4e0d10a commit 594076f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 66 deletions.
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -363,7 +363,10 @@ a package by importing from it in the TypeScript file, and then running:
`jlpm run integrity` from the repo root.

We also have scripts for creating and removing packages in `packages/`,
`jlpm run create:package` and `jlpm run remove:package`.
`jlpm run create:package` and `jlpm run remove:package`. When creating a package,
if it is meant to be included in the core bundle, add the `jupyterlab: { coreDependency: true }`
metadata to the `package.json`. Packages with `extension` or `mimeExtension` metadata
are considered to be a core dependency unless they are explicitly marked otherwise.

## Testing Changes to External Packages

Expand Down
18 changes: 17 additions & 1 deletion buildutils/src/ensure-repo.ts
Expand Up @@ -120,7 +120,23 @@ function ensureJupyterlab(): string[] {
} catch (e) {
return;
}
if (data.private === true || data.name === '@jupyterlab/metapackage') {
// Determine whether to include the package.
if (!data.jupyterlab) {
return;
}
// Skip if explicitly marked as not a core dep.
if (
'coreDependency' in data.jupyterlab &&
!data.jupyterlab.coreDependency
) {
return;
}
// Skip if it is not marked as an extension or a core dep.
if (
!data.jupyterlab.coreDependency &&
!data.jupyterlab.extension &&
!data.jupyterlab.mimeExtension
) {
return;
}

Expand Down
65 changes: 1 addition & 64 deletions dev_mode/package.json
Expand Up @@ -16,22 +16,14 @@
"@jupyterlab/application-extension": "^1.0.0-alpha.6",
"@jupyterlab/apputils": "^1.0.0-alpha.6",
"@jupyterlab/apputils-extension": "^1.0.0-alpha.6",
"@jupyterlab/attachments": "^1.0.0-alpha.6",
"@jupyterlab/cells": "^1.0.0-alpha.7",
"@jupyterlab/codeeditor": "^1.0.0-alpha.6",
"@jupyterlab/codemirror": "^1.0.0-alpha.6",
"@jupyterlab/codemirror-extension": "^1.0.0-alpha.6",
"@jupyterlab/completer": "^1.0.0-alpha.6",
"@jupyterlab/completer-extension": "^1.0.0-alpha.6",
"@jupyterlab/console": "^1.0.0-alpha.6",
"@jupyterlab/console-extension": "^1.0.0-alpha.6",
"@jupyterlab/coreutils": "^3.0.0-alpha.6",
"@jupyterlab/csvviewer": "^1.0.0-alpha.6",
"@jupyterlab/csvviewer-extension": "^1.0.0-alpha.7",
"@jupyterlab/docmanager": "^1.0.0-alpha.6",
"@jupyterlab/docmanager-extension": "^1.0.0-alpha.6",
"@jupyterlab/docregistry": "^1.0.0-alpha.6",
"@jupyterlab/documentsearch": "^1.0.0-alpha.7",
"@jupyterlab/documentsearch-extension": "^1.0.0-alpha.8",
"@jupyterlab/extensionmanager": "^1.0.0-alpha.6",
"@jupyterlab/extensionmanager-extension": "^1.0.0-alpha.6",
Expand All @@ -41,38 +33,27 @@
"@jupyterlab/fileeditor": "^1.0.0-alpha.6",
"@jupyterlab/fileeditor-extension": "^1.0.0-alpha.6",
"@jupyterlab/help-extension": "^1.0.0-alpha.6",
"@jupyterlab/htmlviewer": "^1.0.0-alpha.7",
"@jupyterlab/htmlviewer-extension": "^1.0.0-alpha.7",
"@jupyterlab/imageviewer": "^1.0.0-alpha.6",
"@jupyterlab/imageviewer-extension": "^1.0.0-alpha.6",
"@jupyterlab/inspector": "^1.0.0-alpha.6",
"@jupyterlab/inspector-extension": "^1.0.0-alpha.6",
"@jupyterlab/javascript-extension": "^1.0.0-alpha.6",
"@jupyterlab/json-extension": "^1.0.0-alpha.6",
"@jupyterlab/launcher": "^1.0.0-alpha.6",
"@jupyterlab/launcher-extension": "^1.0.0-alpha.6",
"@jupyterlab/mainmenu": "^1.0.0-alpha.6",
"@jupyterlab/mainmenu-extension": "^1.0.0-alpha.6",
"@jupyterlab/markdownviewer": "^1.0.0-alpha.6",
"@jupyterlab/markdownviewer-extension": "^1.0.0-alpha.6",
"@jupyterlab/mathjax2": "^1.0.0-alpha.6",
"@jupyterlab/mathjax2-extension": "^1.0.0-alpha.6",
"@jupyterlab/nbconvert-css": "^0.1.0",
"@jupyterlab/notebook": "^1.0.0-alpha.7",
"@jupyterlab/notebook-extension": "^1.0.0-alpha.6",
"@jupyterlab/observables": "^2.2.0-alpha.6",
"@jupyterlab/outputarea": "^1.0.0-alpha.6",
"@jupyterlab/pdf-extension": "^1.0.0-alpha.6",
"@jupyterlab/rendermime": "^1.0.0-alpha.6",
"@jupyterlab/rendermime-extension": "^1.0.0-alpha.6",
"@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.6",
"@jupyterlab/running": "^1.0.0-alpha.6",
"@jupyterlab/running-extension": "^1.0.0-alpha.6",
"@jupyterlab/services": "^4.0.0-alpha.6",
"@jupyterlab/settingeditor": "^1.0.0-alpha.6",
"@jupyterlab/settingeditor-extension": "^1.0.0-alpha.6",
"@jupyterlab/shortcuts-extension": "^1.0.0-alpha.6",
"@jupyterlab/statusbar": "^1.0.0-alpha.6",
"@jupyterlab/statusbar-extension": "^1.0.0-alpha.6",
"@jupyterlab/tabmanager-extension": "^1.0.0-alpha.6",
"@jupyterlab/terminal": "^1.0.0-alpha.6",
Expand All @@ -81,8 +62,6 @@
"@jupyterlab/theme-light-extension": "^1.0.0-alpha.7",
"@jupyterlab/tooltip": "^1.0.0-alpha.6",
"@jupyterlab/tooltip-extension": "^1.0.0-alpha.6",
"@jupyterlab/ui-components": "^1.0.0-alpha.6",
"@jupyterlab/vdom": "^1.0.0-alpha.6",
"@jupyterlab/vdom-extension": "^1.0.0-alpha.6",
"@jupyterlab/vega5-extension": "^1.0.0-alpha.6",
"@phosphor/algorithm": "^1.1.2",
Expand All @@ -91,12 +70,9 @@
"@phosphor/coreutils": "^1.3.0",
"@phosphor/datagrid": "^0.1.6",
"@phosphor/disposable": "^1.1.2",
"@phosphor/domutils": "^1.1.2",
"@phosphor/dragdrop": "^1.3.0",
"@phosphor/messaging": "^1.2.2",
"@phosphor/properties": "^1.1.2",
"@phosphor/signaling": "^1.2.2",
"@phosphor/virtualdom": "^1.1.2",
"@phosphor/widgets": "^1.6.0",
"ajv": "^6.5.5",
"codemirror": "~5.46.0",
Expand All @@ -107,11 +83,7 @@
"path-posix": "~1.0.0",
"react": "~16.8.4",
"react-dom": "~16.8.4",
"react-paginate": "^5.2.3",
"sanitize-html": "~1.18.2",
"semver": "^5.5.0",
"url-parse": "~1.4.3",
"xterm": "~3.10.1"
"url-parse": "~1.4.3"
},
"devDependencies": {
"@jupyterlab/buildutils": "^1.0.0-alpha.6",
Expand Down Expand Up @@ -240,75 +212,40 @@
"linkedPackages": {
"@jupyterlab/application": "../packages/application",
"@jupyterlab/application-extension": "../packages/application-extension",
"@jupyterlab/apputils": "../packages/apputils",
"@jupyterlab/apputils-extension": "../packages/apputils-extension",
"@jupyterlab/attachments": "../packages/attachments",
"@jupyterlab/cells": "../packages/cells",
"@jupyterlab/codeeditor": "../packages/codeeditor",
"@jupyterlab/codemirror": "../packages/codemirror",
"@jupyterlab/codemirror-extension": "../packages/codemirror-extension",
"@jupyterlab/completer": "../packages/completer",
"@jupyterlab/completer-extension": "../packages/completer-extension",
"@jupyterlab/console": "../packages/console",
"@jupyterlab/console-extension": "../packages/console-extension",
"@jupyterlab/coreutils": "../packages/coreutils",
"@jupyterlab/csvviewer": "../packages/csvviewer",
"@jupyterlab/csvviewer-extension": "../packages/csvviewer-extension",
"@jupyterlab/docmanager": "../packages/docmanager",
"@jupyterlab/docmanager-extension": "../packages/docmanager-extension",
"@jupyterlab/docregistry": "../packages/docregistry",
"@jupyterlab/documentsearch": "../packages/documentsearch",
"@jupyterlab/documentsearch-extension": "../packages/documentsearch-extension",
"@jupyterlab/extensionmanager": "../packages/extensionmanager",
"@jupyterlab/extensionmanager-extension": "../packages/extensionmanager-extension",
"@jupyterlab/faq-extension": "../packages/faq-extension",
"@jupyterlab/filebrowser": "../packages/filebrowser",
"@jupyterlab/filebrowser-extension": "../packages/filebrowser-extension",
"@jupyterlab/fileeditor": "../packages/fileeditor",
"@jupyterlab/fileeditor-extension": "../packages/fileeditor-extension",
"@jupyterlab/help-extension": "../packages/help-extension",
"@jupyterlab/htmlviewer": "../packages/htmlviewer",
"@jupyterlab/htmlviewer-extension": "../packages/htmlviewer-extension",
"@jupyterlab/imageviewer": "../packages/imageviewer",
"@jupyterlab/imageviewer-extension": "../packages/imageviewer-extension",
"@jupyterlab/inspector": "../packages/inspector",
"@jupyterlab/inspector-extension": "../packages/inspector-extension",
"@jupyterlab/javascript-extension": "../packages/javascript-extension",
"@jupyterlab/json-extension": "../packages/json-extension",
"@jupyterlab/launcher": "../packages/launcher",
"@jupyterlab/launcher-extension": "../packages/launcher-extension",
"@jupyterlab/mainmenu": "../packages/mainmenu",
"@jupyterlab/mainmenu-extension": "../packages/mainmenu-extension",
"@jupyterlab/markdownviewer": "../packages/markdownviewer",
"@jupyterlab/markdownviewer-extension": "../packages/markdownviewer-extension",
"@jupyterlab/mathjax2": "../packages/mathjax2",
"@jupyterlab/mathjax2-extension": "../packages/mathjax2-extension",
"@jupyterlab/nbconvert-css": "../packages/nbconvert-css",
"@jupyterlab/notebook": "../packages/notebook",
"@jupyterlab/notebook-extension": "../packages/notebook-extension",
"@jupyterlab/observables": "../packages/observables",
"@jupyterlab/outputarea": "../packages/outputarea",
"@jupyterlab/pdf-extension": "../packages/pdf-extension",
"@jupyterlab/rendermime": "../packages/rendermime",
"@jupyterlab/rendermime-extension": "../packages/rendermime-extension",
"@jupyterlab/rendermime-interfaces": "../packages/rendermime-interfaces",
"@jupyterlab/running": "../packages/running",
"@jupyterlab/running-extension": "../packages/running-extension",
"@jupyterlab/services": "../packages/services",
"@jupyterlab/settingeditor": "../packages/settingeditor",
"@jupyterlab/settingeditor-extension": "../packages/settingeditor-extension",
"@jupyterlab/shortcuts-extension": "../packages/shortcuts-extension",
"@jupyterlab/statusbar": "../packages/statusbar",
"@jupyterlab/statusbar-extension": "../packages/statusbar-extension",
"@jupyterlab/tabmanager-extension": "../packages/tabmanager-extension",
"@jupyterlab/terminal": "../packages/terminal",
"@jupyterlab/terminal-extension": "../packages/terminal-extension",
"@jupyterlab/theme-dark-extension": "../packages/theme-dark-extension",
"@jupyterlab/theme-light-extension": "../packages/theme-light-extension",
"@jupyterlab/tooltip": "../packages/tooltip",
"@jupyterlab/tooltip-extension": "../packages/tooltip-extension",
"@jupyterlab/ui-components": "../packages/ui-components",
"@jupyterlab/vdom": "../packages/vdom",
"@jupyterlab/vdom-extension": "../packages/vdom-extension",
"@jupyterlab/vega5-extension": "../packages/vega5-extension"
}
Expand Down
3 changes: 3 additions & 0 deletions packages/application/package.json
Expand Up @@ -56,5 +56,8 @@
},
"publishConfig": {
"access": "public"
},
"jupyterlab": {
"coreDependency": true
}
}
3 changes: 3 additions & 0 deletions packages/coreutils/package.json
Expand Up @@ -50,5 +50,8 @@
},
"publishConfig": {
"access": "public"
},
"jupyterlab": {
"coreDependency": true
}
}

0 comments on commit 594076f

Please sign in to comment.