Yuki Takei пре 2 година
родитељ
комит
3a5398fd69

+ 0 - 4
bin/github-actions/bump-versions/README.md

@@ -1,4 +0,0 @@
-bump-versions.js
-==============
-
-Custom cli for bumping package versions based on [algolia/shipjs@0.23.3](https://github.com/algolia/shipjs/tree/v0.23.3/packages/shipjs)

+ 0 - 18
bin/github-actions/bump-versions/cli.js

@@ -1,18 +0,0 @@
-import { print, parseArgs } from 'shipjs/src/util';
-import bumpVersions from './flow/bump-versions';
-
-export async function cli(argv) {
-  const { fn, arg: argSpec } = bumpVersions;
-  try {
-    const opts = parseArgs(argSpec, argv);
-    await fn(opts);
-  }
-  catch (error) {
-    if (error.code === 'ARG_UNKNOWN_OPTION') {
-      print(error);
-    }
-    else {
-      throw error;
-    }
-  }
-}

+ 0 - 77
bin/github-actions/bump-versions/flow/bump-versions.js

@@ -1,77 +0,0 @@
-import semver from 'semver';
-import { loadConfig, getCurrentVersion, getReleaseType } from 'shipjs-lib';
-
-import printDryRunBanner from 'shipjs/src/step/printDryRunBanner';
-import confirmNextVersion from 'shipjs/src/step/prepare/confirmNextVersion';
-import updateVersion from 'shipjs/src/step/prepare/updateVersion';
-import updateVersionMonorepo from 'shipjs/src/step/prepare/updateVersionMonorepo';
-import installDependencies from 'shipjs/src/step/prepare/installDependencies';
-
-import printHelp from '../step/printHelp';
-
-async function bumpVersions({
-  help = false,
-  dir = '.',
-  dryRun = false,
-  updateDependencies = true,
-  increment = 'patch',
-  preid = 'RC',
-}) {
-  if (help) {
-    printHelp();
-    return;
-  }
-  if (dryRun) {
-    printDryRunBanner();
-  }
-
-  const config = await loadConfig(dir, 'bump-versions.config');
-
-  const { monorepo } = config;
-  if (!updateDependencies) {
-    monorepo.updateDependencies = false;
-  }
-
-  // get current version
-  const currentVersion = monorepo && monorepo.mainVersionFile
-    ? getCurrentVersion(dir, monorepo.mainVersionFile)
-    : getCurrentVersion(dir);
-
-  // determine next version
-  let nextVersion = semver.inc(currentVersion, increment, preid); // set preid if type is 'prerelease'
-  nextVersion = await confirmNextVersion({
-    yes: true,
-    currentVersion,
-    nextVersion,
-    dryRun,
-  });
-  const releaseType = getReleaseType(nextVersion);
-
-  // update
-  const updateVersionFn = monorepo
-    ? updateVersionMonorepo
-    : updateVersion;
-  await updateVersionFn({
-    config, nextVersion, releaseType, dir, dryRun,
-  });
-}
-
-const arg = {
-  '--dir': String,
-  '--help': Boolean,
-  '--dry-run': Boolean,
-  '--update-dependencies': Boolean,
-  '--increment': String,
-  '--preid': String,
-
-  // Aliases
-  '-d': '--dir',
-  '-h': '--help',
-  '-D': '--dry-run',
-  '-i': '--increment',
-};
-
-export default {
-  arg,
-  fn: bumpVersions,
-};

+ 0 - 16
bin/github-actions/bump-versions/index.js

@@ -1,16 +0,0 @@
-#!/usr/bin/env node
-
-// eslint-disable-next-line no-global-assign
-require = require('esm')(module);
-
-(async function() {
-  try {
-    process.env.SHIPJS = true;
-    await require('./cli').cli(process.argv);
-  }
-  catch (e) {
-    // eslint-disable-next-line no-console
-    console.error(e);
-    process.exit(1);
-  }
-}());

+ 0 - 58
bin/github-actions/bump-versions/step/printHelp.js

@@ -1,58 +0,0 @@
-import runStep from 'shipjs/src/step/runStep';
-import { print } from 'shipjs/src/util';
-import { bold, underline } from 'shipjs/src/color';
-
-export default () => runStep({}, () => {
-  const indent = line => `\t${line}`;
-
-  const help = '--help';
-  const dir = `--dir ${underline('PATH')}`;
-  const increment = `--increment ${underline('LEVEL')}`;
-  const preId = `--preid ${underline('IDENTIFIER')}`;
-  const updateDependencies = `--update-dependencies ${underline('true/false')}`;
-  const dryRun = '--dry-run';
-  const all = [help, dir, increment, preId, updateDependencies, dryRun]
-    .map(x => `[${x}]`)
-    .join(' ');
-
-  const messages = [
-    bold('NAME'),
-    indent('bump-versions - Bump versions of packages.'),
-    '',
-    bold('USAGE'),
-    indent(`node ./bin/github-actions/bump-versions ${all}`),
-    '',
-    bold('OPTIONS'),
-    indent(`-h, ${help}`),
-    indent('  Print this help'),
-    '',
-    indent(`-d, ${dir}`),
-    indent(
-      `  Specify the ${underline(
-        'PATH',
-      )} of the repository (default: the current directory).`,
-    ),
-    '',
-    indent(`-i, ${increment}`),
-    indent(
-      `  Specify the ${underline(
-        'LEVEL',
-      )} for semver.inc() to increment a version (default: 'patch').`,
-    ),
-    '',
-    indent(`${preId}`),
-    indent(
-      `  Specify the ${underline(
-        'IDENTIFIER',
-      )} for semver.inc() with 'prerelease' type (default: 'RC').`,
-    ),
-    '',
-    indent(`${updateDependencies}`),
-    indent('  Update dependencies or not (default: true).'),
-    '',
-    indent(`-D, ${dryRun}`),
-    indent('  Displays the steps without actually doing them.'),
-    '',
-  ];
-  print(messages.join('\n'));
-});

+ 0 - 1
package.json

@@ -86,7 +86,6 @@
     "reg-notify-slack-plugin": "^0.11.0",
     "reg-notify-slack-plugin": "^0.11.0",
     "reg-publish-s3-plugin": "^0.11.0",
     "reg-publish-s3-plugin": "^0.11.0",
     "reg-suit": "^0.12.1",
     "reg-suit": "^0.12.1",
-    "shipjs": "^0.24.1",
     "stylelint": "^14.2.0",
     "stylelint": "^14.2.0",
     "stylelint-config-recess-order": "^3.0.0",
     "stylelint-config-recess-order": "^3.0.0",
     "ts-node-dev": "^2.0.0",
     "ts-node-dev": "^2.0.0",

Разлика између датотеке није приказан због своје велике величине
+ 41 - 509
yarn.lock


Неке датотеке нису приказане због велике количине промена