Skip to content

Commit

Permalink
[core-paging] Include esm version too in addition to CommonJS (#11563)
Browse files Browse the repository at this point in the history
* [core-paging] Include esm version too in addition to CommonJS

* Make linter happy

* Prepare CHANGELOG for release
  • Loading branch information
jeremymeng authored Sep 30, 2020
1 parent b4b2b63 commit 296bc1c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
10 changes: 1 addition & 9 deletions sdk/core/core-paging/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
"rules": {
// `package.json`'s sideEffects has to be true because this package loads a
// polyfill.
"@azure/azure-sdk/ts-package-json-sideeffects": "off",
// this package does not have a module in `dist` because the directory does
// not exist.
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
// this package does not export a module.
"@azure/azure-sdk/ts-package-json-module": "off",
// this package does not create a `dist` directory to be included in `files`
// list in `package.json`.
"@azure/azure-sdk/ts-package-json-files-required": "off"
"@azure/azure-sdk/ts-package-json-sideeffects": "off"
}
}
3 changes: 2 additions & 1 deletion sdk/core/core-paging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.1.3 (Unreleased)
## 1.1.3 (2020-09-30)

- Also pack `esm` build in addition to `commonjs` build. This fixes the warning about `core-paging` in Angular 10 applications [Issue 11550](https://github.com/Azure/azure-sdk-for-js/issues/11550).

## 1.1.2 (2020-09-02)

Expand Down
10 changes: 6 additions & 4 deletions sdk/core/core-paging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"azure",
"cloud"
],
"main": "dist-esm/index.js",
"main": "dist/index.js",
"module": "dist-esm/src/index.js",
"types": "./types/latest/core-paging.d.ts",
"typesVersions": {
"<3.6": {
Expand All @@ -26,7 +27,8 @@
"files": [
"types/latest/core-paging.d.ts",
"types/3.1",
"dist-esm/index.js",
"dist/index.js",
"dist-esm/src/index.js",
"LICENSE",
"README.md"
],
Expand All @@ -41,10 +43,10 @@
},
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build": "tsc -p .",
"build": "tsc -p tsconfig.json && tsc -p tsconfig.es.json",
"build:test": "echo skipped",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\"",
"clean": "echo skipped",
"clean": "rimraf dist dist-esm",
"execute:samples": "echo skipped",
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "echo skipped",
Expand Down
7 changes: 7 additions & 0 deletions sdk/core/core-paging/tsconfig.es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "es6",
"outDir": "dist-esm/src"
}
}
2 changes: 1 addition & 1 deletion sdk/core/core-paging/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"declarationMap": false,
"sourceMap": false,
"inlineSources": false,
"outDir": "./dist-esm",
"outDir": "./dist",
"resolveJsonModule": true
},
"exclude": ["node_modules"],
Expand Down

0 comments on commit 296bc1c

Please sign in to comment.