Skip to content

Commit

Permalink
feat(common): RS-28 add ESM support (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
roopakv committed Jun 10, 2020
1 parent 3a69a36 commit 45a0d87
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.log
/coverage
/lib
/esm
/node_modules
.vscode
20 changes: 18 additions & 2 deletions package-lock.json

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

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"license": "MIT",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"module": "esm/index.js",
"files": [
"lib/"
"lib/",
"esm/"
],
"repository": {
"type": "git",
Expand All @@ -19,7 +21,9 @@
"homepage": "https://github.com/bigcommerce/request-sender-js",
"scripts": {
"prebuild": "rm -rf lib",
"build": "tsc --outDir lib --project tsconfig-build.json",
"build:cjs": "tsc --outDir lib --project tsconfig-build.json",
"build:esm": "tsc --outDir esm --project tsconfig-build.json --target ES2015 --module esnext",
"build": "npm run build:cjs && npm run build:esm",
"lint": "tslint 'src/**/*.ts' --config tslint.json --project tsconfig.json && tsc --noEmit",
"prepare": "npm run build",
"prerelease": "git fetch --tags && npm run validate-commits && npm run lint && npm test",
Expand All @@ -33,17 +37,17 @@
},
"dependencies": {
"@types/js-cookie": "^2.2.6",
"@types/lodash": "^4.14.150",
"@types/query-string": "^5.1.0",
"js-cookie": "^2.2.1",
"lodash": "^4.17.15",
"lodash.merge": "^4.6.2",
"query-string": "^5.1.1",
"tslib": "^1.11.0"
},
"devDependencies": {
"@bigcommerce/tslint-config": "^4.1.0",
"@bigcommerce/validate-commits": "^2.2.0",
"@types/jest": "^25.2.1",
"@types/lodash.merge": "^4.6.6",
"@types/node": "^13.13.4",
"@typescript-eslint/parser": "^2.30.0",
"eslint": "^6.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/request-sender.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CookiesStatic } from 'js-cookie';
import merge from 'lodash/merge';
import merge from 'lodash.merge';

import Cache, { DefaultCache } from './cache';
import isPromise from './is-promise';
Expand Down

0 comments on commit 45a0d87

Please sign in to comment.