Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: logdna/setup-chain-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.1
Choose a base ref
...
head repository: logdna/setup-chain-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 4 commits
  • 6 files changed
  • 3 contributors

Commits on Mar 22, 2024

  1. fix(lookup): don't parse nested array elements as string templates

    When parsing nested arrays in the lookup function, pass all values
    through the lookup parser instead of just object types and handling the
    rest as if they are string templates.
    
    Signed-off-by: Jacob Hull <[email protected]>
    jakedipity committed Mar 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f25f5cd View commit details
  2. release: 2024-03-22, Version 1.3.2 [skip ci]

    logdnabot committed Mar 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    af0dad4 View commit details
  3. docs: update README.md

    allcontributors[bot] authored and esatterwhite committed Mar 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    935e076 View commit details
  4. docs: update .all-contributorsrc

    allcontributors[bot] authored and esatterwhite committed Mar 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8f168d5 View commit details
Showing with 28 additions and 6 deletions.
  1. +11 −1 .all-contributorsrc
  2. +7 −0 CHANGELOG.md
  3. +2 −1 README.md
  4. +1 −3 lib/chain.js
  5. +1 −1 package.json
  6. +6 −0 test/unit/chain.js
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -70,7 +70,17 @@
"contributions": [
"review"
]
},
{
"login": "jakedipity",
"name": "Jacob Hull",
"avatar_url": "https://avatars.githubusercontent.com/u/29671917?v=4",
"profile": "https://github.com/jakedipity",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7
"contributorsPerLine": 7,
"commitType": "docs"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog

## [1.3.2](https://github.com/logdna/setup-chain-node/compare/v1.3.1...v1.3.2) (2024-03-22)


### Bug Fixes

* **lookup**: don't parse nested array elements as string templates [f25f5cd](https://github.com/logdna/setup-chain-node/commit/f25f5cd6bd9ac70e900784238078f5dee794675b) - Jacob Hull

## [1.3.1](https://github.com/logdna/setup-chain-node/compare/v1.3.0...v1.3.1) (2023-05-05)


3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LogDNA's Test Setup Chain
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)&nbsp;<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

<!-- vim-markdown-toc GFM -->
@@ -801,6 +801,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mdeltito"><img src="https://avatars.githubusercontent.com/u/69520?v=4?s=100" width="100px;" alt="Mike Del Tito"/><br /><sub><b>Mike Del Tito</b></sub></a><br /><a href="https://github.com/logdna/setup-chain-node/commits?author=mdeltito" title="Code">💻</a> <a href="https://github.com/logdna/setup-chain-node/commits?author=mdeltito" title="Documentation">📖</a> <a href="#maintenance-mdeltito" title="Maintenance">🚧</a> <a href="https://github.com/logdna/setup-chain-node/commits?author=mdeltito" title="Tests">⚠️</a> <a href="https://github.com/logdna/setup-chain-node/pulls?q=is%3Apr+reviewed-by%3Amdeltito" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://evanlucas.com/"><img src="https://avatars.githubusercontent.com/u/677994?v=4?s=100" width="100px;" alt="Evan Lucas"/><br /><sub><b>Evan Lucas</b></sub></a><br /><a href="https://github.com/logdna/setup-chain-node/commits?author=evanlucas" title="Code">💻</a> <a href="https://github.com/logdna/setup-chain-node/commits?author=evanlucas" title="Documentation">📖</a> <a href="#maintenance-evanlucas" title="Maintenance">🚧</a> <a href="https://github.com/logdna/setup-chain-node/commits?author=evanlucas" title="Tests">⚠️</a> <a href="https://github.com/logdna/setup-chain-node/pulls?q=is%3Apr+reviewed-by%3Aevanlucas" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dominic-mcallister-logdna"><img src="https://avatars.githubusercontent.com/u/98114655?v=4?s=100" width="100px;" alt="Dominic McAllister"/><br /><sub><b>Dominic McAllister</b></sub></a><br /><a href="https://github.com/logdna/setup-chain-node/pulls?q=is%3Apr+reviewed-by%3Adominic-mcallister-logdna" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jakedipity"><img src="https://avatars.githubusercontent.com/u/29671917?v=4?s=100" width="100px;" alt="Jacob Hull"/><br /><sub><b>Jacob Hull</b></sub></a><br /><a href="https://github.com/logdna/setup-chain-node/issues?q=author%3Ajakedipity" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>
4 changes: 1 addition & 3 deletions lib/chain.js
Original file line number Diff line number Diff line change
@@ -100,9 +100,7 @@ module.exports = class SetupChain {
// remap array values with lookup result
if (Array.isArray(value)) {
out[key] = value.map((val) => {
if (typeOf(val) === 'object') return this.lookup(val)
const resolved = this[lookup](this.parse(val))
return resolved
return this.lookup(val)
})
continue
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@logdna/setup-chain",
"version": "1.3.1",
"version": "1.3.2",
"description": "Base class for implementing seed and resource data for test suites",
"main": "index.js",
"publishConfig": {
6 changes: 6 additions & 0 deletions test/unit/chain.js
Original file line number Diff line number Diff line change
@@ -101,6 +101,12 @@ test('chain', async (t) => {
t.same(chain.lookup(lookup), expected, 'can populate an array')
}

{
const expected = {position: [11, 2]}
const lookup = {position: [11, 2]}
t.same(chain.lookup(lookup), expected, 'array values parse number literals')
}

{
const expected = {key: 11, values: [2, 10, {foo: 3}]}
const lookup = {key: '#g', values: ['#b.c', '#f', {foo: '#b.d.e'}]}