Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include babel-config and global install twilio for internal testing #809

Merged
merged 4 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ ENV NODE_PATH /usr/local/lib/node_modules
COPY lib ./lib
COPY spec ./spec
COPY examples ./examples
COPY index.js .
COPY package* ./
COPY index.js package.json babel.config.js tsconfig.json ./

RUN npm install . --include=dev

RUN npm run build || true # tsc completes but with errors that need to be addressed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious on what the usage of "true" in this statement. Can it be RUN npm run build || #comment...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run build currently has a non-zero return value (it fails) so adding a || true enables the image to continue on its merry.

RUN npm install -g .
2 changes: 1 addition & 1 deletion lib/base/Domain.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
import { trim } from './utility';
const { trim } = require('./utility');

/**
* Base domain object
Expand Down
4 changes: 2 additions & 2 deletions lib/base/Version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var RestException = require('./RestException');
import { trim } from './utility';
const RestException = require('./RestException');
const { trim } = require('./utility');

/**
* @constructor
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/Twilio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,4 +456,4 @@ class Twilio extends BaseTwilio {
}
}

module.exports = Twilio;
export = Twilio;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"test:typescript": "tsc -t es2020 examples/typescript/example.ts --noEmit --strict",
"jshint": "jshint lib/rest/** lib/base/** lib/http/**",
"jscs": "eslint lib/base/**/**.js lib/http/**/**.js --fix",
"build": "tsc",
"check": "npm run jshint && npm run jscs",
"ci": "npm run test && npm run nsp",
"jsdoc": "jsdoc -r lib -d docs",
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"compilerOptions": {
"target": "es2020",
"esModuleInterop": true
"module": "commonjs",
"declaration": true,
"esModuleInterop": true,
"moduleResolution": "node",
}
}