@zimbra/api-client 88.0.0 → 89.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zimbra/api-client",
3
3
  "amdName": "zmApiJsClient",
4
- "version": "88.0.0",
4
+ "version": "89.0.0",
5
5
  "description": "Zimbra JS API Client and GraphQL client for making requests against the Zimbra SOAP API.",
6
6
  "main": "dist/zm-api-js-client.js",
7
7
  "source": "index.ts",
@@ -17,6 +17,7 @@
17
17
  "clean": "rimraf dist",
18
18
  "build": "npm-run-all clean generateSchemaTypes rollup:* -p build:ts minify:* copySchema",
19
19
  "build:ts": "tsc --emitDeclarationOnly --declaration --outDir \"dist\"",
20
+ "build:analyze": "visualize=true npm run build",
20
21
  "copySchema": "copyfiles -f src/schema/schema.graphql dist",
21
22
  "rollup:cjs": "cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main",
22
23
  "rollup:umd": "cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main",
@@ -58,15 +59,15 @@
58
59
  "@babel/preset-typescript": "^7.17.12",
59
60
  "@babel/register": "^7.17.7",
60
61
  "@graphql-codegen/cli": "^2.6.2",
61
- "@graphql-codegen/typescript": "^2.4.11",
62
- "@rollup/plugin-babel": "^5.3.1",
62
+ "@graphql-codegen/typescript": "^4.0.1",
63
+ "@rollup/plugin-babel": "^6.0.4",
63
64
  "@rollup/plugin-commonjs": "^22.0.0",
64
- "@rollup/plugin-node-resolve": "^13.3.0",
65
65
  "@rollup/plugin-graphql": "^1.1.0",
66
+ "@rollup/plugin-node-resolve": "^13.3.0",
66
67
  "@rollup/plugin-typescript": "^11.1.5",
67
68
  "@types/graphql": "^14.5.0",
68
69
  "@types/lodash": "^4.14.182",
69
- "@types/node": "^17.0.35",
70
+ "@types/node": "^20.10.4",
70
71
  "@types/whatwg-fetch": "^0.0.33",
71
72
  "babel-plugin-lodash": "^3.3.4",
72
73
  "chai": "^4.3.7",
@@ -81,11 +82,12 @@
81
82
  "rimraf": "^5.0.1",
82
83
  "rollup": "^2.75.0",
83
84
  "rollup-plugin-local-resolve": "^1.0.7",
85
+ "rollup-plugin-visualizer": "^5.11.0",
84
86
  "tslib": "^2.5.0",
85
87
  "tslint": "^6.1.3",
86
88
  "tslint-config-prettier": "^1.18.0",
87
89
  "tslint-plugin-prettier": "^2.3.0",
88
- "typescript": "^4.7.2",
90
+ "typescript": "^5.3.3",
89
91
  "uglify-js": "^3.15.5"
90
92
  }
91
93
  }
package/rollup.config.js CHANGED
@@ -4,23 +4,21 @@ import graphql from '@rollup/plugin-graphql';
4
4
  import localResolve from 'rollup-plugin-local-resolve';
5
5
  import nodeResolve from '@rollup/plugin-node-resolve';
6
6
  import commonjs from '@rollup/plugin-commonjs';
7
- import pkg from './package.json';
7
+ import { visualizer } from 'rollup-plugin-visualizer';
8
8
 
9
- let FORMAT = process.env.FORMAT;
9
+ const FORMAT = process.env.FORMAT;
10
10
 
11
- // graphql-tools currently has a rollup build failure, so always call it an external until they fix it
12
- // otherwise, make all npm production dependencies external, plus their subpath usages
13
- // throughout the codebase, which rollup doesn't automatically pick up on
14
- let external = FORMAT==='es' ?
15
- Object.keys(pkg.dependencies)
16
- .concat(
17
- ['castArray', 'get','isError', 'isObject', 'mapValues', 'reduce', 'omitBy', 'uniqBy', 'concat', 'uniqBy', 'differenceBy', 'forEach'].map(v => 'lodash/'+v),
18
- ['graphql']) :
19
- [];
11
+ const externalDeps = [
12
+ '@apollo/client',
13
+ 'graphql',
14
+ 'lodash',
15
+ 'mitt'
16
+ ];
20
17
 
18
+ const getExternalDeps = id => externalDeps.find(pkgName => id.includes('/node_modules/' + pkgName + '/'));
21
19
 
22
20
  export default {
23
- external,
21
+ ...(FORMAT==='es' && { external: getExternalDeps }),
24
22
  context: 'commonjsGlobal', // what should "this" be at the top level when it is used by another module
25
23
  plugins: [
26
24
  graphql(),
@@ -34,9 +32,10 @@ export default {
34
32
  extensions: ['.ts'],
35
33
  exclude: 'node_modules/**',
36
34
  babelHelpers: 'bundled'
37
- })
35
+ }),
36
+ ...(process.env.visualize ? [visualizer({ open: true }) ] : [])
38
37
  ],
39
38
  output: {
40
39
  exports: FORMAT==='es' ? null : 'named'
41
- },
40
+ }
42
41
  };