Skip to content

Commit

Permalink
Merge pull request #116 from nestdotland/dev
Browse files Browse the repository at this point in the history
0.3.5
  • Loading branch information
SteelAlloy authored Feb 9, 2021
2 parents 113aa52 + 42708f4 commit f5fac66
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 87 deletions.
30 changes: 15 additions & 15 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.

### Our Standards

Expand Down Expand Up @@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

### Scope

Expand All @@ -55,20 +55,20 @@ further defined and clarified by project maintainers.
### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported by contacting the project team at [email protected]. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated to
maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
27 changes: 18 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@

# Contributing / Developing

Contributions are welcome. Fork this repository and issue a pull request with your changes.
Contributions are welcome. Fork this repository and issue a pull request with
your changes.

Please add new tests for new functionality, adapt the existing ones if needed, and make sure that `deno test` succeeds.
Please add new tests for new functionality, adapt the existing ones if needed,
and make sure that `deno test` succeeds.

### Prerequisites
You need to have [Git](https://git-scm.com/downloads) and [deno](https://deno.land) installed on your system.

You need to have [Git](https://git-scm.com/downloads) and
[deno](https://deno.land) installed on your system.

### Setting up Dev

Just execute these commands:

```shell
Expand All @@ -26,6 +31,7 @@ cd eggs/
```

This project uses drake to manage project scripts. Run it with Deno:

```sh
deno run -A Drakefile.ts
# A shell alias shortcut can be set to run the default drakefile:
Expand All @@ -34,7 +40,8 @@ alias drake="deno run -A Drakefile.ts"

### Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [link to tags on this repository](/tags).
We use [SemVer](http://semver.org/) for versioning. For the versions available,
see the [link to tags on this repository](/tags).

### Tests

Expand All @@ -49,14 +56,16 @@ drake format
drake lint
```

Make sure to use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
Make sure to use
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).

### Pull request

**Please PR to the `dev` branch!**
Then follow the [pull request template](.github/PULL_REQUEST_TEMPLATE/pull_request.md).
**Please PR to the `dev` branch!** Then follow the
[pull request template](.github/PULL_REQUEST_TEMPLATE/pull_request.md).

### Deploying / Publishing

Submit a pull request after running `drake dev` to ensure it runs correctly.
The module is automatically published to nest.land when a new release is published on github.
Submit a pull request after running `drake dev` to ensure it runs correctly. The
module is automatically published to nest.land when a new release is published
on github.
18 changes: 12 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/pull_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<!-- Make sure you have read the contribution guide!
<!-- Make sure you have read the contribution guide!
https://github.com/nestdotland/template/tree/master/.github/CONTRIBUTING.md
-->

# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Please include a summary of the change and which issue is fixed. Please also
include relevant motivation and context. List any dependencies that are required
for this change.

Fixes # (issue)

Expand All @@ -14,19 +16,23 @@ Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Breaking change (fix or feature that would cause existing functionality to
not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details for your
test configuration

- [ ] Test A
- [ ] Test B

**Test Configuration**:
* OS:
* Version:

- OS:
- Version:

# Checklist:

Expand Down
80 changes: 40 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
</a>

<h3 align="center">Eggs CLI</h3>
<h3 align="center">Eggs CLI</h3>
<p align="center">
The CLI used to publish and update modules in nest.land.
</p>
Expand Down Expand Up @@ -55,7 +55,7 @@
**Note: You need to upgrade to Deno v1.6.0 or newer in order to use our CLI.**

```shell script
deno install -Afq --unstable https://x.nest.land/[email protected].4/eggs.ts
deno install -Afq --unstable https://x.nest.land/[email protected].5/eggs.ts
```

For more information, see the [documentation](https://docs.nest.land/).
Expand All @@ -73,8 +73,8 @@ Then, use `link` to add it to the CLI:
eggs link <key>
```

Alternatively, you can manually create a `.nest-api-key` file at your user
home directory.
Alternatively, you can manually create a `.nest-api-key` file at your user home
directory.

### Init

Expand All @@ -85,8 +85,8 @@ project as well. To do this easily, type:
eggs init
```

Note: If you'd like to specify a version that you'll publish to, you can
include a `version` variable in `egg.json`.
Note: If you'd like to specify a version that you'll publish to, you can include
a `version` variable in `egg.json`.

### Publish

Expand All @@ -97,39 +97,39 @@ your package to our registry with this command:
eggs publish
```

You'll receive a link to your package on our registry, along with an import
URL for others to import your package from the Arweave blockchain!
You'll receive a link to your package on our registry, along with an import URL
for others to import your package from the Arweave blockchain!

Note: It may take some time for the transaction to process in Arweave.
Until then, we upload your files to our server, where they are served for
20 minutes to give the transaction time to process.
Note: It may take some time for the transaction to process in Arweave. Until
then, we upload your files to our server, where they are served for 20 minutes
to give the transaction time to process.

### Update

You can easily update your dependencies and global scripts with
the `update` command.
You can easily update your dependencies and global scripts with the `update`
command.

```shell script
eggs update [deps] <options>
```

Your dependencies are by default checked in the `deps.ts` file
(current working directory). You can change this with `--file`
Your dependencies are by default checked in the `deps.ts` file (current working
directory). You can change this with `--file`

```shell script
eggs update # default to deps.ts
eggs update --file dependencies.ts
```

In regular mode, all your dependencies are updated. You can choose which
ones will be modified by adding them as arguments.
In regular mode, all your dependencies are updated. You can choose which ones
will be modified by adding them as arguments.

```shell script
eggs update # Updates everything
eggs update http fs eggs # Updates only http, fs, eggs
```

Scripts installed with `eggs install` can also be updated with the `-g`
Scripts installed with `eggs install` can also be updated with the `-g`
parameter.

```shell script
Expand All @@ -139,41 +139,41 @@ eggs update eggs denon -g # Updates only eggs, denon

Several registries are supported. The current ones are:

* x.nest.land
* deno.land/x
* deno.land/std
* raw.githubusercontent.com
* denopkg.com
- x.nest.land
- deno.land/x
- deno.land/std
- raw.githubusercontent.com
- denopkg.com

If you want to add a registry, open an issue by specifying the registry
url and we'll add it.
If you want to add a registry, open an issue by specifying the registry url and
we'll add it.

An example of updated file:

```ts
import * as colors from "https://deno.land/[email protected]/fmt/colors.ts";
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts"
import * as eggs from "https://x.nest.land/[email protected]/mod.ts"
import * as http from "https://deno.land/std/http/mod.ts"
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts";
import * as eggs from "https://x.nest.land/[email protected]/mod.ts";
import * as http from "https://deno.land/std/http/mod.ts";
```

After `eggs update`:

```ts
import * as colors from "https://deno.land/[email protected]/fmt/colors.ts";
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts"
import * as eggs from "https://x.nest.land/[email protected]/mod.ts"
import * as http from "https://deno.land/std/http/mod.ts"
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts";
import * as eggs from "https://x.nest.land/[email protected]/mod.ts";
import * as http from "https://deno.land/std/http/mod.ts";
```

### Install

Just like `deno install`, you can install scripts globally with eggs.
By installing it this way, you will be notified if an update is available
for your script.
Just like `deno install`, you can install scripts globally with eggs. By
installing it this way, you will be notified if an update is available for your
script.

The verification is smart, it can't be done more than once a day. To install
a script, simply replace `deno` with `eggs`.
The verification is smart, it can't be done more than once a day. To install a
script, simply replace `deno` with `eggs`.

```shell script
deno install --allow-write --allow-read -n [NAME] https://x.nest.land/[MODULE]@[VERSION]/cli.ts
Expand All @@ -198,8 +198,8 @@ eggs upgrade
## Contributing

All contributions are welcome! If you can think of a command or feature that
might benefit nest.land, fork this repository and make a pull request from
your branch with the additions. Make sure to use [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/)
might benefit nest.land, fork this repository and make a pull request from your
branch with the additions. Make sure to use
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)

[Contribution guide](.github/CONTRIBUTING.md)
[Contribution guide](.github/CONTRIBUTING.md)
28 changes: 17 additions & 11 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,34 @@
Documentation for benchmarks of CLI commands.

# Contents
* [Commands](#commands)
* [Update](#update)

- [Commands](#commands)
- [Update](#update)

# Commands

## Update

**Cautions**

* There may be a time where the deps are too out of date. They need to be out of date for `update` to update them,
so just bump them up to the release before the latest std
- There may be a time where the deps are too out of date. They need to be out of
date for `update` to update them, so just bump them up to the release before
the latest std

**How it Works**

* This benchmark uses a separate `deps.ts` file. The reason for this is so we can have a 'realworld' example, where many dependencies are used, and from various registries
- This benchmark uses a separate `deps.ts` file. The reason for this is so we
can have a 'realworld' example, where many dependencies are used, and from
various registries

* All but 1 dependency are out of date, to fully represent the test, as the `update` would update all the out of date dependencies
- All but 1 dependency are out of date, to fully represent the test, as the
`update` would update all the out of date dependencies

* This benchmark shows the execution time for running `update` against 14 separate dependencies, all varying from:
* deno.land/std/
* deno.land/x/
* x.nest.land
- This benchmark shows the execution time for running `update` against 14
separate dependencies, all varying from:
- deno.land/std/
- deno.land/x/
- x.nest.land

**How to Run**

Expand All @@ -46,4 +52,4 @@ running 1 benchmark ...
benchmark updateCommand ...
3968ms
benchmark result: DONE. 1 measured; 0 filtered
```
```
Loading

0 comments on commit f5fac66

Please sign in to comment.