Sign In

@cloudelements/jmespath

Package Overview
Dependencies
Maintainers
43
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudelements/jmespath - npm Package Compare versions

Comparing version
0.17.0
to
0.18.0
+16
.github/workflows/pull-request.yaml
name: pull request CI
on: [pull_request]
env:
NODE_VERSION: "14"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install
- run: npm test
name: main-cicd
on:
push:
branches:
- master
- main
env:
NODE_VERSION: "14"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install
- run: npm test
+1
-1
{
"name": "@cloudelements/jmespath",
"description": "JMESPath implementation in JavaScript",
"version": "0.17.0",
"version": "0.18.0",
"author": {

@@ -6,0 +6,0 @@ "name": "James Saryerwinnie",

@@ -5,2 +5,4 @@ export var types: Record<string, number>;

export function over(jsonDoc: any, query: string, fn: (input: any) => any): any;
export function decorate(fns: Record<string, {_func: Function, _signature: Array<{types: number[]}>}>):

@@ -7,0 +9,0 @@ (query: string) =>

@@ -236,2 +236,29 @@ var assert = require('assert');

describe('over', function() {
it('should mutate objects', function() {
assert.deepStrictEqual(
jmespath.over({a: 1, b: 2}, 'a', (a) => a.toString()),
{a: '1', b: 2}
);
assert.deepStrictEqual(
jmespath.over({a: {b: {c: {d: 1}}}, e: 2}, 'a.b.c.d', (a) => a.toString()),
{a: {b: {c: {d: '1'}}}, e: 2}
);
});
it('should mutate arrays', function() {
assert.deepStrictEqual(
jmespath.over({a: [1, 2, 3]}, 'a | [0]', (a) => a.toString()),
{a: ['1', 2, 3]}
);
});
it('should mutate slices', function() {
assert.deepStrictEqual(
jmespath.over({a: [1, 2, 3]}, 'a[0:3]', (a) => a.toString()),
{a: ['1', '2', '3']}
);
});
});
describe('decorate', function() {

@@ -238,0 +265,0 @@ it(

version: 2.1
jobs:
install:
docker:
- image: circleci/node:12
steps:
- checkout
- restore_cache:
keys:
- npm-{{ .Branch }}-{{ checksum "package.json" }}
- npm-{{ .Branch }}-
- npm-master-
- run: npm install
- save_cache:
key: npm-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- node_modules
test:
docker:
- image: circleci/node:12
parallelism: 1
steps:
- checkout
- restore_cache:
keys:
- npm-{{ .Branch }}-{{ checksum "package.json" }}
- run: npm run test
workflows:
version: 2
test:
jobs:
- install
- test:
requires:
- install

Sorry, the diff of this file is too big to display