version: 2
jobs:
  build:
    docker:
      - image: circleci/node:10.13.0
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package.json" }}
            - v1-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      # TOD: - run: npm audit
      - run: npm run release
      - run: npm run format:ci
      - run: npm run lint:ci
      - run: npm run test:ci

version: 2
jobs:
  build:
    docker:
      - image: circleci/node:10.13.0
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package-lock.json" }}
            - v1-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package-lock.json" }}
      # TOD: - run: npm audit
      - run: npm run release
      - run: npm run format:ci
      - run: npm run lint:ci
      - run: npm run test:ci

Create cache key by package-lock.json
Create cache key by package-lock.json
