Skip to content

Commit 27fddfc

Browse files
authored
feat: upgrade action to node20 (#19)
- Upgrade node from 16 to 20 - Replace `lodash.get/set` with `get/set-value` - Upgrade actions in ci
1 parent 0bfa2be commit 27fddfc

13 files changed

+17136
-16096
lines changed

.github/workflows/check-dist.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
id: checkout
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3535

3636
- name: Setup Node.js
37-
uses: actions/setup-node@v3
37+
uses: actions/setup-node@v4
3838
with:
39-
node-version: 16
39+
node-version: 20
4040
cache: npm
4141

4242
- name: Install Dependencies

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
name: Test Action Build
1717
runs-on: macos-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- name: Setup node
21-
uses: actions/setup-node@v3
22-
- name: Install node_modules
23-
uses: bahmutov/npm-install@v1
21+
uses: actions/setup-node@v4
22+
- name: Install node_modules with caching
23+
uses: bahmutov/npm-install@v1.10.4
2424
- run: npm run all
2525
test:
2626
name: Test Action
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
- name: Create mock test object
3131
id: mock
3232
# example object being tested

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Dependency directory
22
node_modules
33

4+
# IDEs
5+
.vscode
6+
47
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
58
# Logs
69
logs
@@ -96,4 +99,4 @@ Thumbs.db
9699

97100
# Ignore built ts files
98101
__tests__/runner/*
99-
lib/**/*
102+
lib/**/*

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.18.1

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
steps:
7474
- name: Simple
7575
id: test # used to access output in other steps
76-
uses: nickofthyme/object-remap@v1
76+
uses: nickofthyme/object-remap@v3
7777
with:
7878
key_number: 1
7979
key_string: string1
@@ -107,7 +107,7 @@ jobs:
107107
steps:
108108
- name: Simple - nested
109109
id: test # used to access output in other steps
110-
uses: nickofthyme/object-remap@v1
110+
uses: nickofthyme/object-remap@v3
111111
with:
112112
top.deep.very_deep: 1
113113
```
@@ -135,7 +135,7 @@ jobs:
135135
steps:
136136
- name: Simple - depth
137137
id: test # used to access output in other steps
138-
uses: nickofthyme/object-remap@v1
138+
uses: nickofthyme/object-remap@v3
139139
with:
140140
__depth: 2
141141
one: '{ "two": 2 }'
@@ -171,7 +171,7 @@ jobs:
171171
steps:
172172
- name: Simple - casing
173173
id: test # used to access output in other steps
174-
uses: nickofthyme/object-remap@v1
174+
uses: nickofthyme/object-remap@v3
175175
with:
176176
__case: kebab
177177
my_key.my_nested_key: 1
@@ -200,7 +200,7 @@ jobs:
200200
steps:
201201
- name: Simple - deep casing
202202
id: test # used to access output in other steps
203-
uses: nickofthyme/object-remap@v1
203+
uses: nickofthyme/object-remap@v3
204204
with:
205205
__case: upper
206206
__deep_casing: true
@@ -269,7 +269,7 @@ jobs:
269269
run: echo "json={\"one\":1,\"two\":{\"one\":1},\"three\":{\"two\":{\"one\":1}},\"numbers\":[1,2,3],\"array\":[{\"test\":\"key1\",\"deeper\":{\"deep\":1}},{\"test\":\"key2\"}]}" >> "$GITHUB_OUTPUT"
270270
- name: Complex values
271271
id: test # used to access output in other steps
272-
uses: nickofthyme/object-remap@v1
272+
uses: nickofthyme/object-remap@v3
273273
with:
274274
test: ${{ steps.mock.outputs.json }}
275275
@@ -319,7 +319,7 @@ jobs:
319319
run: echo "json={\"one\":1,\"two\":{\"one\":1},\"three\":{\"two\":{\"one\":1}},\"numbers\":[1,2,3],\"array\":[{\"test\":\"key1\",\"deeper\":{\"deep\":1}},{\"test\":\"key2\"}]}" >> "$GITHUB_OUTPUT"
320320
- name: Complex values
321321
id: test # used to access output in other steps
322-
uses: nickofthyme/object-remap@v1
322+
uses: nickofthyme/object-remap@v3
323323
with:
324324
test.value: ${{ fromJSON(steps.mock.outputs.json).two.one }} # value is just 1
325325
```
@@ -350,7 +350,7 @@ jobs:
350350
run: echo "json={\"one\":1,\"two\":{\"one\":1},\"three\":{\"two\":{\"one\":1}},\"numbers\":[1,2,3],\"array\":[{\"test\":\"key1\",\"deeper\":{\"deep\":1}},{\"test\":\"key2\"}]}" >> "$GITHUB_OUTPUT"
351351
- name: Complex values
352352
id: test # used to access output in other steps
353-
uses: nickofthyme/object-remap@v1
353+
uses: nickofthyme/object-remap@v3
354354
with:
355355
test.*.key: ${{ fromJSON(steps.mock.outputs.json).array.*.test }} # value is just ['key1', 'key2`]
356356
```
@@ -403,7 +403,7 @@ jobs:
403403
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
404404
- name: Create matrix
405405
id: save
406-
uses: nickofthyme/object-remap@v1
406+
uses: nickofthyme/object-remap@v3
407407
with:
408408
include.*.number: ${{ toJSON(fromJSON(steps.fetch.outputs.data).*.number) }}
409409
include.*.sha: ${{ toJSON(fromJSON(steps.fetch.outputs.data).*.head.sha) }}
@@ -449,7 +449,7 @@ jobs:
449449
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
450450
- name: Store matrix
451451
id: save
452-
uses: nickofthyme/object-remap@v1
452+
uses: nickofthyme/object-remap@v3
453453
with:
454454
include.*.number: ${{ toJSON(fromJSON(steps.fetch.outputs.data).*.number) }}
455455
include.*.head_sha: ${{ toJSON(fromJSON(steps.fetch.outputs.data).*.head.sha) }}

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ outputs:
2828
json:
2929
description: remapped json output as a string
3030
runs:
31-
using: 'node16'
31+
using: 'node20'
3232
main: 'dist/index.js'

0 commit comments

Comments
 (0)