Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aegir

Package Overview
Dependencies
Maintainers
8
Versions
385
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aegir - npm Package Compare versions

Comparing version 45.0.3 to 45.0.4

2

package.json
{
"name": "aegir",
"version": "45.0.3",
"version": "45.0.4",
"description": "JavaScript project management",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

@@ -10,159 +10,163 @@ # aegir

# Install
Aegir is an opinionated tool for TypeScript/JavaScript project management, testing and release. You should use it if you just want to ship working code and have few strongly held opinions on linting, project layout and testing frameworks.
```console
$ npm i aegir
```
It bundles config for standard tools such as eslint, mocha, etc and lets you concentrate on writing code instead of formatting whitespace.
## Project Structure
## Project Structure
The project structure when using this is quite strict, to ease replication and configuration overhead.
The project structure when using this is quite strict, to ease replication and configuration overhead.
All source code should be placed under `src`, with the main entry point being `src/index.js` or `src/index.ts`.
All source code should be placed under `src`, with the main entry point being `src/index.js` or `src/index.ts`.
All test files should be placed under `test`. Individual test files should end in `.spec.js` or `.spec.ts` and will be ran in all environments (node, browser, webworker, electron-main and electron-renderer). To run node specific tests a file named `test/node.js` or `test/node.ts` should be used to require all node test files and the same thing for the other environments with a file named `test/browser.js` or `test/browser.ts`.
All test files should be placed under `test`. Individual test files should end in `.spec.js` or `.spec.ts` and will be ran in all environments (node, browser, webworker, electron-main and electron-renderer).
Your `package.json` should have the following entries and should pass `aegir lint-package-json`.
To run node specific tests a file named `test/node.js` or `test/node.ts` should be used to require all node test files and the same thing for the other environments with a file named `test/browser.js` or `test/browser.ts`.
```json
"main": "src/index.js",
"files": [
"src",
"dist"
],
"scripts": {
"lint": "aegir lint",
"release": "aegir release",
"build": "aegir build",
"test": "aegir test",
"test:node": "aegir test --target node",
"test:browser": "aegir test --target browser"
}
```
Your `package.json` should have the following entries and should pass `aegir lint-package-json`.
## CLI
```json
"main": "src/index.js",
"files": [
"src",
"dist"
],
"scripts": {
"lint": "aegir lint",
"release": "aegir release",
"build": "aegir build",
"test": "aegir test",
"test:node": "aegir test --target node",
"test:browser": "aegir test --target browser"
}
```
Run `aegir --help`
## CLI
```bash
Usage: aegir <command> [options]
Run `aegir --help`
Commands:
aegir completion generate completion script
aegir build Builds a browser bundle and TS type declara
tions from the `src` folder.
aegir check-project Ensure your project has the correct config.
aegir check Check project
aegir clean [files..] Remove created build artifacts.
aegir dependency-check [input...] Run `dependency-check` cli with aegir defau
lts. [aliases: dep-check, dep]
aegir docs Generate documentation from TS type declara
tions.
aegir document-check [input...] Run `document-check` cli with aegir default
s. [aliases: doc-check]
aegir lint-package-json Lint package.json with aegir defaults.
[aliases: lint-package, lpj]
aegir lint Lint all project files
aegir release Release using semantic-release
aegir release-rc Release an RC version of the current module
or monorepo
aegir test-dependant [repo] Run the tests of an module that depends on
this module to see if the current changes h
ave caused a regression
aegir test Test your code in different environments
aegir exec <command> Run a command in each project of a monorepo
aegir run <scripts..> Run one or more npm scripts in each project
of a monorepo
```bash
Usage: aegir <command> [options]
Global Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
-d, --debug Show debug output. [boolean] [default: false]
Commands:
aegir completion generate completion script
aegir build Builds a browser bundle and TS type declara
tions from the `src` folder.
aegir check-project Ensure your project has the correct config.
aegir check Check project
aegir clean [files..] Remove created build artifacts.
aegir dependency-check [input...] Run `dependency-check` cli with aegir defau
lts. [aliases: dep-check, dep]
aegir docs Generate documentation from TS type declara
tions.
aegir document-check [input...] Run `document-check` cli with aegir default
s. [aliases: doc-check]
aegir lint-package-json Lint package.json with aegir defaults.
[aliases: lint-package, lpj]
aegir lint Lint all project files
aegir release Release using semantic-release
aegir release-rc Release an RC version of the current module
or monorepo
aegir test-dependant [repo] Run the tests of an module that depends on
this module to see if the current changes h
ave caused a regression
aegir test Test your code in different environments
aegir exec <command> Run a command in each project of a monorepo
aegir run <scripts..> Run one or more npm scripts in each project
of a monorepo
Examples:
aegir build Runs the build command to bundle JS
code for the browser.
npx aegir build Can be used with `npx` to use a loca
l version
aegir test -t webworker -- --browser fir If the command supports `--` can be
efox used to forward options to the under
lying tool.
npm test -- -- --browser firefox If `npm test` translates to `aegir t
est -t browser` and you want to forw
ard options you need to use `-- --`
instead.
Global Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
-d, --debug Show debug output. [boolean] [default: false]
Use `aegir <command> --help` to learn more about each command.
```
Examples:
aegir build Runs the build command to bundle JS
code for the browser.
npx aegir build Can be used with `npx` to use a loca
l version
aegir test -t webworker -- --browser fir If the command supports `--` can be
efox used to forward options to the under
lying tool.
npm test -- -- --browser firefox If `npm test` translates to `aegir t
est -t browser` and you want to forw
ard options you need to use `-- --`
instead.
## Configuration
Use `aegir <command> --help` to learn more about each command.
```
Aegir can be fully configured using a config file named `.aegir.js` or the package.json using the property `aegir`.
## Configuration
```js
// file: .aegir.js
Aegir can be fully configured using a config file named `.aegir.js` or the package.json using the property `aegir`.
/** @type {import('aegir').PartialOptions} */
module.exports = {
tsRepo: true,
release: {
build: false
}
}
```
### .aegir.js
```json
// file: package.json
"main": "src/index.js",
"files": [
"src",
"dist"
],
"scripts": {
"lint": "aegir lint",
"release": "aegir release",
"build": "aegir build",
"test": "aegir test",
"test:node": "aegir test --target node",
"test:browser": "aegir test --target browser"
},
"aegir" : {
"tsRepo": false
}
```
```js
module.exports = {
tsRepo: true,
release: {
build: false
}
}
```
You can find the complete default config [here](https://github.com/ipfs/aegir/blob/main/src/config/user.js#L12) and the types [here](https://github.com/ipfs/aegir/blob/main/src/types.d.ts).
### package.json
## Continuous Integration
```json
"main": "src/index.js",
"files": [
"src",
"dist"
],
"scripts": {
"lint": "aegir lint",
"release": "aegir release",
"build": "aegir build",
"test": "aegir test",
"test:node": "aegir test --target node",
"test:browser": "aegir test --target browser"
},
"aegir" : {
"tsRepo": false
}
```
Check this template for Github Actions <https://github.com/ipfs/aegir/blob/main/md/github-actions.md>
You can find the complete default config [here](https://github.com/ipfs/aegir/blob/main/src/config/user.js#L12) and the types [here](https://github.com/ipfs/aegir/blob/main/src/types.d.ts).
## Testing helpers
## Continuous Integration
In addition to running the tests `aegir` also provides several helpers to be used by the tests.
Check this template for Github Actions <https://github.com/ipfs/aegir/blob/main/md/github-actions.md>
Check the [documentation](https://ipfs.github.io/aegir/)
## Testing helpers
## Typescript
In addition to running the tests `aegir` also provides several helpers to be used by the tests.
Aegir will detect the presence of `tsconfig.json` files and build typescript as appropriate.
Check the [documentation](https://ipfs.github.io/aegir/)
## Release steps
## Typescript
1. Run linting
2. Run type check
3. Run tests
4. Bump the version in `package.json`
5. Build everything
6. Update contributors based on the git history
7. Generate a changelog based on the git log
8. Commit the version change & `CHANGELOG.md`
9. Create a git tag
10. Run `git push` to `origin/main`
11. Publish a release to Github releases
12. Generate documentation and push to Github Pages
13. Publish to npm
Aegir will detect the presence of `tsconfig.json` files and build typescript as appropriate.
```bash
aegir release --help
## Releases
`aegir release` will run `semantic-release`-style auto-releases with every change to `main`.
If you wish to batch changes up instead, please use `release-please`.
## Config updates
You can keep your project configuration up to date by running:
```console
$ npx aegir check-project
```
It will attempt to add/amend any configuration files that require updating to the latest versions.
If you have any custom config in your project please double check the edits it will make!
# Install
```console
$ npm i aegir
```

@@ -169,0 +173,0 @@

@@ -7,3 +7,4 @@ /* eslint-disable no-console */

import {
ensureFileHasContents
ensureFileHasContents,
ensureFileNotPresent
} from './utils.js'

@@ -29,5 +30,5 @@

console.info(kleur.green('Manifest license field ok'))
await ensureFileHasContents(projectDir, 'LICENSE')
await ensureFileNotPresent(projectDir, 'LICENSE')
await ensureFileHasContents(projectDir, 'LICENSE-APACHE')
await ensureFileHasContents(projectDir, 'LICENSE-MIT')
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc