Skip to content

[CLI] Move away from using master to clone examples via lb4 example #1120

@virkt25

Description

@virkt25

Description / Steps to reproduce / Feature proposal

When we have changes to an example repository that is dependent on changes in a published @loopback/* package, (feature / fix / anything breaking), between the time the PR is merged and a release is published to npm, any new examples cloned via lb4 example will break as it relies on code in master for dependencies.

This happened for 3 days in a row due to 3 different changes to our code base. Using master might be acceptable once we GA, but during alpha I think we need a better way of dealing with these changes.

See #1101, #1090, #1088

Option 1

  • Publish example-* packages to npm and have the lb4 example script use the published package to clone the project instead of master OR even the latest tagged version on GitHub

Option 2

  • Automate releases using Travis. If a PR is merged, Travis can automatically do a release.

Current Behavior

lb4 example getting-started will clone the project from master

Expected Behavior

lb4 example getting-started should clone the last released / stable version of the project so the project doesn't break till new versions of @loopback/* are released.

See Reporting Issues for more tips on writing good issues

Acceptance Criteria

  • Make all examples public npm packages again - remove publishConfig: {private:true} from package.json files (pull request: chore: enable publishing of examples to npm #1283)
  • Publish the first version of all examples to npmjs
  • Rework lb4 example to fetch examples from npm using pacote library provided by npm, Inc.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions