Skip to content

Commit 6f304dc

Browse files
authored
Merge pull request #39 from seangwright/feat/packaging-updates
Feature: Packaging updates
2 parents 5567f43 + f2112e4 commit 6f304dc

20 files changed

+941
-614
lines changed

.github/actions/set-env/action.yml

-18
This file was deleted.

.github/actions/set-package-version/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 'Set package.json version environment variable'
22

3-
description: 'Sets the current npm package version a workflow'
3+
description: 'Sets the current npm package version in a workflow'
44

55
runs:
66
using: 'composite'

.github/variables/build.env

-1
This file was deleted.

.github/workflows/ci.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@v3
24-
- name: Set Environment Variables
25-
uses: ./.github/actions/set-env
23+
- uses: actions/checkout@v4
2624

2725
- name: Setup Node.js
28-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2927
with:
30-
node-version: ${{ env.NODE_VERSION }}
28+
node-version-file: 'package.json'
3129

3230
- name: Install dependencies
3331
run: npm ci --ignore-scripts

.github/workflows/publish.yml

+25-14
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
18-
19-
- name: Set Environment Variables
20-
uses: ./.github/actions/set-env
17+
- uses: actions/checkout@v4
2118

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

2522
- name: Setup Node.js
26-
uses: actions/setup-node@v3
23+
uses: actions/setup-node@v4
2724
with:
28-
node-version: ${{ env.NODE_VERSION }}
25+
node-version-file: 'package.json'
2926

3027
- name: Install dependencies
3128
run: npm ci --ignore-scripts
@@ -47,7 +44,7 @@ jobs:
4744
run: npm pack --pack-destination ./artifacts/release
4845

4946
- name: 'Save release artifact'
50-
uses: actions/upload-artifact@v3
47+
uses: actions/upload-artifact@v4
5148
with:
5249
name: release
5350
path: ./artifacts/release/*
@@ -59,7 +56,7 @@ jobs:
5956
run: npm pack --pack-destination ./artifacts/prerelease
6057

6158
- name: 'Save prerelease artifact'
62-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
6360
with:
6461
name: prerelease
6562
path: ./artifacts/prerelease/*
@@ -71,14 +68,21 @@ jobs:
7168
runs-on: ubuntu-latest
7269
steps:
7370
- name: Download artifact
74-
uses: actions/download-artifact@v3
71+
uses: actions/download-artifact@v4
7572
with:
7673
name: prerelease
7774

75+
- name: Extract package.json from artifact
76+
run: |
77+
mkdir -p extracted
78+
tar -xzf *.tgz -C extracted
79+
cp extracted/package/package.json ./package.json
80+
shell: bash
81+
7882
- name: Setup Node.js
79-
uses: actions/setup-node@v3
83+
uses: actions/setup-node@v4
8084
with:
81-
node-version: ${{ env.NODE_VERSION }}
85+
node-version-file: 'package.json'
8286
registry-url: 'https://registry.npmjs.org'
8387

8488
- name: Publish npm Package
@@ -93,14 +97,21 @@ jobs:
9397
runs-on: ubuntu-latest
9498
steps:
9599
- name: Download artifact
96-
uses: actions/download-artifact@v3
100+
uses: actions/download-artifact@v4
97101
with:
98102
name: release
99103

104+
- name: Extract package.json from artifact
105+
run: |
106+
mkdir -p extracted
107+
tar -xzf *.tgz -C extracted
108+
cp extracted/package/package.json ./package.json
109+
shell: bash
110+
100111
- name: Setup Node.js
101-
uses: actions/setup-node@v3
112+
uses: actions/setup-node@v4
102113
with:
103-
node-version: ${{ env.NODE_VERSION }}
114+
node-version-file: 'package.json'
104115
registry-url: 'https://registry.npmjs.org'
105116

106117
- name: Publish npm Package

.vscode/extensions.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"recommendations": [
33
"esbenp.prettier-vscode",
4-
"ZixuanChen.vitest-explorer",
5-
"dbaeumer.vscode-eslint"
4+
"dbaeumer.vscode-eslint",
5+
"vitest.explorer"
66
],
77

88
"unwantedRecommendations": []

README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ npm i typescript-functional-extensions
3737
3838
#### Full distributed source
3939

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

4242
#### ES Modules
4343

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

4646
Example:
4747

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

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

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

6262
- api.js: 0.15 kb
6363
- index.js: 0.09 kb
64-
- maybe.js: 0.81 kb
65-
- maybe.utilities.js: 0.27 kb
64+
- maybe.js: 0.82 kb
65+
- maybe.utilities.js: 0.26 kb
6666
- maybeAsync.js: 0.64 kb
67-
- result.js: 1.28 kb
68-
- resultAsync.js: 0.76 kb
67+
- result.js: 1.32 kb
68+
- resultAsync.js: 0.99 kb
6969
- unit.js: 0.13 kb
7070
- utilities.js: 0.27 kb
7171

72-
Total: 4.39 kb
72+
Total: 4.66 kb
7373

7474
### Core Monads
7575

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

268268
## Contributing
269269

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

273272
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.
274273

0 commit comments

Comments
 (0)