From 107a603d7cd9577f7d2f40f06544fa8103aff298 Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Sat, 26 Jan 2019 23:27:14 -0500 Subject: [PATCH] fix: explicitly package node-fetch --- .circleci/config.yml | 10 ++++++++++ .gitignore | 1 + package.json | 1 + serverless.yml | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 87629513..1a2e9093 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,6 +45,12 @@ jobs: steps: - prep_env - run: yarn lint + build: + <<: *docker_defaults + working_directory: ~/repo + steps: + - prep_env + - run: yarn build deploy_sandbox: <<: *docker_defaults working_directory: ~/repo @@ -69,10 +75,14 @@ workflows: - lint: requires: - node_modules + - build: + requires: + - node_modules - deploy_sandbox: requires: - test - lint + - build filters: branches: only: master diff --git a/.gitignore b/.gitignore index b6a19b85..8b6d9e4b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ package-lock.json # We use yarn ;) *.pem test-*-payload.json yarn-error.log +.serverless diff --git a/package.json b/package.json index 8edb5c6f..11d3ed07 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "start": "nodemon", "start-probot": "probot run ./src/tasks/processIssueComment/probot-processIssueComment.js", "start-serverless": "serverless offline start", + "build": "serverless package", "lint": "eslint .", "lint-fix": "eslint --fix .", "test": "jest --collectCoverage", diff --git a/serverless.yml b/serverless.yml index 2cbc87f3..9b6be507 100644 --- a/serverless.yml +++ b/serverless.yml @@ -5,6 +5,11 @@ plugins: - serverless-dotenv-plugin - serverless-offline # must be last +# https://serverless.com/framework/docs/providers/aws/guide/packaging/ +package: + include: + - 'node_modules/node-fetch/**' + custom: stage: ${opt:stage, self:provider.stage} appId: