Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

remove-package.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. "use strict";
  2. /* -----------------------------------------------------------------------------
  3. | Copyright (c) Jupyter Development Team.
  4. | Distributed under the terms of the Modified BSD License.
  5. |----------------------------------------------------------------------------*/
  6. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
  7. if (k2 === undefined) k2 = k;
  8. Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
  9. }) : (function(o, m, k, k2) {
  10. if (k2 === undefined) k2 = k;
  11. o[k2] = m[k];
  12. }));
  13. var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
  14. Object.defineProperty(o, "default", { enumerable: true, value: v });
  15. }) : function(o, v) {
  16. o["default"] = v;
  17. });
  18. var __importStar = (this && this.__importStar) || function (mod) {
  19. if (mod && mod.__esModule) return mod;
  20. var result = {};
  21. if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  22. __setModuleDefault(result, mod);
  23. return result;
  24. };
  25. Object.defineProperty(exports, "__esModule", { value: true });
  26. /**
  27. * Remove an extension from the relevant metadata
  28. * files of the JupyterLab source tree so that it
  29. * is not included in the build. Intended for testing
  30. * adding/removing extensions against development
  31. * branches of JupyterLab.
  32. */
  33. const fs = __importStar(require("fs-extra"));
  34. const path = __importStar(require("path"));
  35. const utils = __importStar(require("./utils"));
  36. // Make sure we have required command line arguments.
  37. if (process.argv.length < 3) {
  38. const msg = '** Must supply a target extension name';
  39. process.stderr.write(msg);
  40. process.exit(1);
  41. }
  42. // Get the package name or path.
  43. const target = process.argv[2];
  44. const basePath = path.resolve('.');
  45. // Get the package.json of the extension.
  46. const packagePath = path.join(basePath, 'packages', target, 'package.json');
  47. if (!fs.existsSync(packagePath)) {
  48. const msg = '** Absolute paths for packages are not allowed.';
  49. process.stderr.write(msg);
  50. process.exit(1);
  51. }
  52. // Remove the package from the local tree.
  53. fs.removeSync(path.dirname(packagePath));
  54. // Remove any dependencies on the package (will also run `jlpm integrity`)
  55. utils.run(`jlpm remove:dependency ${target}`);
  56. //# sourceMappingURL=remove-package.js.map