Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/actions/set-env/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/set-package-version/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Set package.json version environment variable'

description: 'Sets the current npm package version a workflow'
description: 'Sets the current npm package version in a workflow'

runs:
using: 'composite'
Expand Down
1 change: 0 additions & 1 deletion .github/variables/build.env

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set Environment Variables
uses: ./.github/actions/set-env
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: 'package.json'

- name: Install dependencies
run: npm ci --ignore-scripts
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set Environment Variables
uses: ./.github/actions/set-env
- uses: actions/checkout@v4

- name: Set Package Version Environment Variable
uses: ./.github/actions/set-package-version

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: 'package.json'

- name: Install dependencies
run: npm ci --ignore-scripts
Expand All @@ -47,7 +44,7 @@ jobs:
run: npm pack --pack-destination ./artifacts/release

- name: 'Save release artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release
path: ./artifacts/release/*
Expand All @@ -59,7 +56,7 @@ jobs:
run: npm pack --pack-destination ./artifacts/prerelease

- name: 'Save prerelease artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: prerelease
path: ./artifacts/prerelease/*
Expand All @@ -71,14 +68,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: prerelease

- name: Extract package.json from artifact
run: |
mkdir -p extracted
tar -xzf *.tgz -C extracted
cp extracted/package/package.json ./package.json
shell: bash

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: 'package.json'
registry-url: 'https://registry.npmjs.org'

- name: Publish npm Package
Expand All @@ -93,14 +97,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: release

- name: Extract package.json from artifact
run: |
mkdir -p extracted
tar -xzf *.tgz -C extracted
cp extracted/package/package.json ./package.json
shell: bash

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: 'package.json'
registry-url: 'https://registry.npmjs.org'

- name: Publish npm Package
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"ZixuanChen.vitest-explorer",
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"vitest.explorer"
],

"unwantedRecommendations": []
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ npm i typescript-functional-extensions

#### Full distributed source

<https://unpkg.com/browse/typescript-functional-extensions@2.0.0/>
<https://unpkg.com/browse/typescript-functional-extensions@3.0.0/>

#### ES Modules

<https://unpkg.com/typescript-functional-extensions@version/dist/esm/file>

Example:

<https://unpkg.com/typescript-functional-extensions@2.0.0/dist/esm/maybe.js>
<https://unpkg.com/typescript-functional-extensions@3.0.0/dist/esm/maybe.js>

```javascript
const { Maybe } = await import(
'https://unpkg.com/typescript-functional-extensions@2.0.0/dist/esm/maybe.js'
'https://unpkg.com/typescript-functional-extensions@3.0.0/dist/esm/maybe.js'
);

const maybe = Maybe.some('test');
Expand All @@ -61,15 +61,15 @@ The distributed library is currently not minified. Below are the module sizes wh

- api.js: 0.15 kb
- index.js: 0.09 kb
- maybe.js: 0.81 kb
- maybe.utilities.js: 0.27 kb
- maybe.js: 0.82 kb
- maybe.utilities.js: 0.26 kb
- maybeAsync.js: 0.64 kb
- result.js: 1.28 kb
- resultAsync.js: 0.76 kb
- result.js: 1.32 kb
- resultAsync.js: 0.99 kb
- unit.js: 0.13 kb
- utilities.js: 0.27 kb

Total: 4.39 kb
Total: 4.66 kb

### Core Monads

Expand Down Expand Up @@ -267,8 +267,7 @@ See more examples of `ResultAsync` [in the docs](./docs/resultAsync.md) or [in t

## Contributing

To build this project, you must have v18.12.1 or higher
of the [Node.js](https://nodejs.org/dist/v18.12.1/node-v18.12.1-x64.msi) installed.
To build this project, you must have v22.14.0 or higher of [Node.js](https://nodejs.org/en/download) installed.

If you've found a bug or have a feature request, please [open an issue](https://github.com/seangwright/typescript-functional-extensions/issues/new) on GitHub.

Expand Down
Loading