Skip to content

Commit

Permalink
fix: add back root index.js and middleware.js
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot committed Aug 16, 2018
1 parent 1a7b749 commit 9b7d755
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a name="3.3.1"></a>
## [3.3.1](https://github.com/awslabs/aws-serverless-express/compare/v3.3.0...v3.3.1) (2018-08-16)


### Bug Fixes

* fix package.json files ([4f2e56a](https://github.com/awslabs/aws-serverless-express/commit/4f2e56a))

<a name="3.3.0"></a>
# [3.3.0](https://github.com/awslabs/aws-serverless-express/compare/v3.2.0...v3.3.0) (2018-08-16)

Expand Down
2 changes: 1 addition & 1 deletion __tests__/integration.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path')
const fs = require('fs')
const awsServerlessExpress = require('../src/index')
const awsServerlessExpress = require('../index')
const apiGatewayEvent = require('../examples/basic-starter/api-gateway-event.json')
const app = require('../examples/basic-starter/app')

Expand Down
2 changes: 1 addition & 1 deletion __tests__/middleware.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
const awsServerlessExpressMiddleware = require('../src/middleware')
const awsServerlessExpressMiddleware = require('../middleware')
const eventContextMiddleware = awsServerlessExpressMiddleware.eventContext
const mockNext = () => true
const generateMockReq = () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const path = require('path')

const awsServerlessExpress = require('../src/index')
const awsServerlessExpress = require('../index')

test('getPathWithQueryStringParams: no params', () => {
const event = {
Expand Down
2 changes: 1 addition & 1 deletion examples/basic-starter/lambda.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
const awsServerlessExpress = require(process.env.NODE_ENV === 'test' ? '../src/index' : 'aws-serverless-express')
const awsServerlessExpress = require(process.env.NODE_ENV === 'test' ? '../../index' : 'aws-serverless-express')
const app = require('./app')

// NOTE: If you get ERR_CONTENT_DECODING_FAILED in your browser, this is likely
Expand Down
11 changes: 6 additions & 5 deletions examples/basic-starter/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/basic-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"aws-serverless-express": "^3.0.0",
"aws-serverless-express": "^3.3.0",
"body-parser": "^1.17.1",
"compression": "^1.6.2",
"cors": "^2.8.3",
Expand Down
17 changes: 17 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2016-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file.
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
'use strict'

module.exports = require('./src/index')
17 changes: 17 additions & 0 deletions middleware.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2016-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file.
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
'use strict'

module.exports = require('./src/middleware')
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
},
"license": "Apache-2.0",
"files": [
"src/*"
"index.js",
"middleware.js"
],
"main": "src/index.js",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/awslabs/aws-serverless-express.git"
Expand Down

0 comments on commit 9b7d755

Please sign in to comment.