5.0.0 • Published 2 years ago

@verdn/athena v5.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Athena, god of wisdom

Why wisdom? Because it was the closest I could come to tenuously tying what a Big-List-of-Constants™ would be as a Greek god.

The goal of Athena is to be a central resource of constants and convenience functions that get used by our multitude of packages (in core and out). These are constants chiefly relating to Impact Types and Impact "Tiers", although we expect to phase-out Impact Tiers eventually (as they are emblematic of our old pricing aspirations before we became focussed on unit / volumetric pricing).

There is currently work on Athena to make it much more powerful, relevant, and extendable. Work has started on it being used as a local dependency within core and a private NPM package outside of core.

In the future, our ambition is to use Athena in a more general sense (not just focussed so much on Impact typings) — as a package that provides convenience methods for common Verdn tech and business logic...

However, we're not there yet as it really only becomes useful with a larger team and more unit testing across the board.

Think of Athena now as @verdn/impact-constants and Athena soon as @verdn/core-lib...

Build

To build the package, simply run the build script from the project root:

npm run build:athena

@verdn/athena is bundled by esbuild. The package build produces two bundles (and corresponding entry points) that target different environments:

  • @verdn/athena/web for web
  • @verdn/athena/node for Node.js. For convenience, @verdn/athena is the same as @verdn/athena/node

Use the package as follows in web projects:

import { business } from "@verdn/athena/web";

And as follows in Node.js projects:

import { business } from "@verdn/athena";

Publish

We publish @verdn/athena as a private npm package, so that other projects can use it. Ensure you have "publishing" access to the @verdn/athena private npm package.

Bump the version of @verdn/athena with npm version. Make sure to use semantic versioning:

npm version prerelease --preid=alpha

Then, from the root folder, publish the package:

npm run publish:athena

Current implementation gotchas

Athena is currently being imported as a relative dependency, and this can create issues for services that don't fully support NPM workspace deploys. Vercel — for example — is supposed to support NPM workspaces natively, but instead of running

npm build:ski

To create our API dashboards, we actually have to run

npm build:ski:legacy

# Which is an alias for:
# --> cd packages/athena && npm run build && cd ../ski && npm run build

Because ski relies on athena (which has to be built separately before as it's TypeScript).

5.0.0

2 years ago

5.0.0-rc.1

2 years ago

5.0.0-rc.0

2 years ago

4.0.3

2 years ago

4.0.3-alpha.0

2 years ago

4.0.2

2 years ago

4.0.2-alpha.4

2 years ago

4.0.2-alpha.3

2 years ago

4.0.2-alpha.2

2 years ago

4.0.2-alpha.1

2 years ago

4.0.2-alpha.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.0-alpha.11

2 years ago

4.0.0-alpha.10

2 years ago

4.0.0-alpha.9

2 years ago

4.0.0-alpha.8

2 years ago

4.0.0-alpha.7

2 years ago

4.0.0-alpha.6

2 years ago

4.0.0-alpha.5

2 years ago

4.0.0-alpha.4

2 years ago

4.0.0-alpha.3

2 years ago

4.0.0-alpha.2

2 years ago

4.0.0-alpha.1

2 years ago

4.0.0-alpha.0

2 years ago

3.4.0

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago