Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Shipit v4.0.0 #156

Closed
36 tasks done
gregberge opened this issue Aug 14, 2017 · 10 comments
Closed
36 tasks done

Shipit v4.0.0 #156

gregberge opened this issue Aug 14, 2017 · 10 comments
Assignees
Milestone

Comments

@gregberge
Copy link
Member

gregberge commented Aug 14, 2017

Hello,

First, I am sorry, I was absent from the project for a long time. Even if @timkelty did a very great job, the project was not actively maintain. Now I am back as the main maintainer on the project. I will try to make Shipit evolve fast and in the right way.

This goal of this issue is to describe and follow the next release of Shipit : v4.0.0.

Global

  • Use lerna to handle multiple packages in the same repository

shipit-cli

Features

Bugs

Refactoring and chores

  • Rewrite project in ES2017 targeting Node.js v6+

Breaking changes

  • Drop callbacks support and use native Promises

Docs

ssh-pool

Features

Bugs

Deprecation for v3

Breaking changes

Refactoring & Chores

  • Rewrite project in ES2017 targeting Node.js v6+
  • Use Jest for testing
  • Add Codecov

Documentation

  • Update readme with new documentation

shipit-deploy

Bugs

Breaking changes

  • Default shallowClone to true
  • Drop grunt-shipit support
  • Workspace is now a temp directory in shallow clone
  • An error is thrown if workspace is set to the current directory

Refactoring & Chores

  • Rewrite project in ES2017 targeting Node.js v6+
  • Use Jest for testing
  • Add Codecov

Documentation

  • Update readme with new documentation
@timkelty
Copy link
Member

timkelty commented Aug 14, 2017

@neoziro Have you considered setting up v4 as a Lerna monorepo? Could make development and releases easier.

@gregberge
Copy link
Member Author

@timkelty yep I was thinking about it. I don't know if we should do it in v4 or v5. It will be my first project using Lerna, I do not have any experience with it.

@gregberge
Copy link
Member Author

gregberge commented Aug 15, 2017

@timkelty I will finally switch to Lerna for v4. https://github.com/shipitjs/shipit/tree/v4.0.0

@timkelty
Copy link
Member

@neoziro sounds good to me!

@timkelty
Copy link
Member

Great to see the project gaining traction again and have @neoziro back.

Here are some of my thoughts & ideas for v4:

Task Orchestration

  • Do we need a 3rd party task manager at all? (Should we just use node events/EventEmitter)?
  • Orchestrator seems dead…consider using https://github.com/gulpjs/undertaker as a replacement?

Packages/repo

Great to see Lerna, I think think that will make development a lot easier.

Wondering if we should split shipit and shipit-cli. This would allow an alternate cli to still use Shipit internals (e.g. https://github.com/timkelty/shipit-captain).

Configuration (Shipitfile)

ES6 support 👍 love it!

Shipit.initConfig seems clumsy and not really necessary (possibly a relic from old Grunt implementation?). Seems simpler to just interact with Shipit.config, e.g.

module.exports = shipit => {
  Object.assign(shipit.config, {
    deployTo: '…'
    /* etc */
  });
}

Furthermore, for users that don't require alot of customizations or task definitions, we could also support just a config object:

module.exports = {
  deployTo: '…'
  /* etc */
}

I've been using Neutrino for webpack configuration for bit, and this is how the .neutrinorc.js file works. It works quite well. Simple when you want it to be, extensible when you need it.

Along those same lines, I think we should implement a Shipit.use method and option to avoid loading tasks like require('shipit-deploy')(shipit).

The result would be much simpler and easier to digest:

Simple version

module.exports =  {
  use: ['shipit-deploy', 'shipit-shared'],
  deployTo: '…'
  /* etc */
}
const deploy = require('shipit-deploy');
const shared = require('shipit-shared');

module.exports = shipit => {
  Object.assign(shipit, {
    deployTo: '…'
    /* etc */
  });

  shipit.use(deploy, shared);

Task options

I think we need a formalized way for tasks to have options. Until now, I've been just piggybacking off a similarly named key in shipit.config, but this seems like a bad idea.
shipit.use would come in here again:

shipit.use(require('shipit-deploy'), {/* my options for shipit-deploy */});

@gregberge
Copy link
Member Author

@timkelty thanks for your ideas! I want to minimize changes for v4, just a refactoring, some deprecations and a new start for the project. No big breaking changes.

Do we need a 3rd party task manager at all? (Should we just use node events/EventEmitter)?

Nop, we should drop it.

Orchestrator seems dead…consider using https://github.com/gulpjs/undertaker as a replacement?

Yes of course.

Wondering if we should split shipit and shipit-cli. This would allow an alternate cli to still use Shipit internals (e.g. https://github.com/timkelty/shipit-captain).

Yes it makes sense, shipit-core is available.

Shipit.initConfig seems clumsy and not really necessary (possibly a relic from old Grunt implementation?). Seems simpler to just interact with Shipit.config, e.g.

We can discuss the API, but mutating config is not a good solution.

Furthermore, for users that don't require alot of customizations or task definitions, we could also support just a config object:

I don't think it's a game changer and we should minimize the API surface.

Along those same lines, I think we should implement a Shipit.use method and option to avoid loading tasks like require('shipit-deploy')(shipit).

Yes we should make it easier to add plugins.

I think we need a formalized way for tasks to have options. Until now, I've been just piggybacking off a similarly named key in shipit.config, but this seems like a bad idea.
shipit.use would come in here again:

Yes plugins should have a reserved namespace it makes sense.

@timkelty
Copy link
Member

Yep, I figured. Just wanted to get some ideas recorded. 👍

@gregberge
Copy link
Member Author

Version 4 is released 🎉 👯

@timkelty
Copy link
Member

Great work @neoziro!

@gregberge
Copy link
Member Author

@timkelty thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants