Skip to content

Commit

Permalink
back to es5, add sideEffects: false
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Mar 28, 2019
1 parent 457fc09 commit dd77eaa
Show file tree
Hide file tree
Showing 14 changed files with 263 additions and 813 deletions.
1,001 changes: 222 additions & 779 deletions demos/tree-shaking/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions demos/tree-shaking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "Apache-2.0",
"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/preset-env": "^7.3.4",
Expand All @@ -18,7 +18,7 @@
"webpack-cli": "^3.3.0"
},
"dependencies": {
"@esri/arcgis-rest-request": "^1.17.1"
},
"sideEffects": false
"@esri/arcgis-rest-request": "^1.18.0",
"@esri/arcgis-rest-items": "^1.18.0"
}
}
14 changes: 5 additions & 9 deletions demos/tree-shaking/src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { requiresFormData } from "@esri/arcgis-rest-request";
import { searchItems } from "@esri/arcgis-rest-items";

let element = document.createElement('div');
document.body.appendChild(element);

const options = {
params: {
baz: "bar"
}
}

element.innerHTML = requiresFormData(options); // false

searchItems()
.then(response => {
element.innerHTML = JSON.stringify(response); // false
})
5 changes: 3 additions & 2 deletions packages/arcgis-rest-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/auth.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": true,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -26,10 +27,10 @@
"prepare": "npm run build",
"prebuild": "rimraf dist",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/common.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -17,10 +18,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-feature-service-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/feature-service-admin.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -29,10 +30,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-feature-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/feature-service.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -25,10 +26,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/arcgis-rest-geocoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/geocoder.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -30,7 +31,7 @@
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-groups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/groups.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -27,10 +28,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-items/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/items.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -27,10 +28,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/request.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"dependencies": {
Expand All @@ -17,10 +18,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/routing.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -27,10 +28,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-sharing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/sharing.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"dependencies": {
Expand All @@ -29,10 +30,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arcgis-rest-users/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unpkg": "dist/umd/users.umd.js",
"module": "dist/esm/index.js",
"js:next": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/esm/index.d.ts",
"license": "Apache-2.0",
"files": [
Expand All @@ -27,10 +28,10 @@
"scripts": {
"prepare": "npm run build",
"build": "npm run build:node && npm run build:umd && npm run build:esm",
"build:esm": "tsc --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
"build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
"build:node": "tsc --module commonjs --outDir ./dist/node",
"dev:esm": "tsc -w --module es2015 --target es2017 --outDir ./dist/esm --declaration",
"dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
"dev:umd": "rollup -w -c ../../umd-base-profile.js",
"dev:node": "tsc -w --module commonjs --outDir ./dist/node"
},
Expand Down

0 comments on commit dd77eaa

Please sign in to comment.