Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract packager into universal interface. #330

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

HyperBrain
Copy link
Member

@HyperBrain HyperBrain commented Feb 28, 2018

What did you implement:

Closes #329

This PR opens the way to add other packagers (than npm) to serverless-webpack. It is a prerequisite for #286 which proposes the alternative use of Yarn.

How did you implement it:

Added a packager factory (./lib/packagers/index) and ported npm functionality to the new interface.
Serverless-webpack will now try to create the wanted packager with the factory.

Additionally started transition of unit tests adjacent to their code under test. That makes it clear what is correctly tested and what not.

How can we verify it:

Everything should still work as before :)

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: NO
Is it a breaking change?: NO

@HyperBrain
Copy link
Member Author

The unit tests have to be adapted and new ones have to be added for the packagers.

@HyperBrain HyperBrain added this to the 4.4.0 milestone Mar 1, 2018
Extended pack external unit tests

Added unit tests for npm packager

Adapted unit tests

Exclude test.js files from nyc statistics

Added unit test for packager factory

Extract optional lock file adaption

Fixed ESLint

ESLint fixes

Moved npm to a separate packager class.
@HyperBrain HyperBrain force-pushed the 329-packager-interface branch from 0db36a3 to fee4947 Compare March 1, 2018 14:31
@HyperBrain HyperBrain merged commit 1b8a3be into master Mar 1, 2018
@HyperBrain HyperBrain deleted the 329-packager-interface branch March 1, 2018 15:03
jamesmbourne pushed a commit to jamesmbourne/serverless-webpack that referenced this pull request Oct 15, 2019
…ackager-interface

Abstract packager into universal interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: Abstract packager to a common interface so that other packagers can be used
1 participant