diff --git a/.babelrc.json b/.babelrc.json index 2a924761..2b83d071 100644 --- a/.babelrc.json +++ b/.babelrc.json @@ -1,18 +1,18 @@ { - "presets": [ - ["@babel/preset-env", { "targets": "defaults" }], - "@babel/typescript" - ], - "plugins": [ - "@babel/proposal-class-properties", - "lodash" - ], - "env": { - "test": { - "presets": [ - ["@babel/preset-env", { "targets": "defaults" }], - "@babel/typescript" - ] - } - } + "presets": [ + ["@babel/preset-env", { "targets": "defaults" }], + "@babel/typescript" + ], + "plugins": [ + "@babel/proposal-class-properties", + "lodash" + ], + "env": { + "test": { + "presets": [ + ["@babel/preset-env", { "targets": "defaults" }], + "@babel/typescript" + ] + } + } } diff --git a/package.json b/package.json index 5a1b648d..e540aac8 100644 --- a/package.json +++ b/package.json @@ -1,94 +1,94 @@ { - "name": "@zimbra/api-client", - "amdName": "zmApiJsClient", - "version": "65.0.0", - "description": "Zimbra JS API Client and GraphQL client for making requests against the Zimbra SOAP API.", - "main": "dist/zm-api-js-client.js", - "source": "index.ts", - "module": "dist/zm-api-js-client.esm.js", - "umd:main": "dist/zm-api-js-client.umd.js", - "types": "dist/index.d.ts", - "scripts": { - "generateSchemaTypes": "rimraf src/schema/generated-schema-types.ts && graphql-codegen", - "lint": "tslint --project .", - "lint:fix": "npm run lint -- --fix", - "test:unit": "BABEL_ENV=test mocha --require ./babelRegisterConfig.js test/**/*.js", - "test:watch": "npm run test:unit -- --watch", - "test:no-synacor-npm-refs": "node ./scripts/synacor-npm-refs.js", - "clean": "rimraf dist", - "build": "npm-run-all clean generateSchemaTypes rollup:* -p build:ts minify:* copySchema", - "build:ts": "tsc --emitDeclarationOnly --declaration --outDir \"dist\"", - "copySchema": "copyfiles -f src/schema/schema.graphql dist", - "rollup:cjs": "cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main", - "rollup:umd": "cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main", - "rollup:esm": "cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName $npm_package_source -o $npm_package_module", - "linkedBuild": "npm run rollup:esm -- --watch", - "minify:cjs": "cross-var uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel,reserved=['_createClass'] --keep-fnames -o $npm_package_main --source-map content=$npm_package_main.map,url=zm-api-js-client.js.map,filename=$npm_package_main.map", - "minify:umd": "cross-var uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m toplevel,reserved=['_createClass'] --keep-fnames -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map,url=zm-api-js-client.umd.js.map,filename=$npm_package_umd_main.map", - "size": "echo \"Gzipped Size: $(gzip-size $npm_package_main | pretty-bytes)\"", - "prepublishOnly": "npm test && npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags", - "publish:beta": "npm publish --tag=beta", - "security:audit": "audit-ci --moderate --report-type summary --pass-enoaudit --skip-dev", - "prepare": "is-ci || husky install" - }, - "keywords": [ - "zimbra", - "api", - "graphql" - ], - "repository": "Zimbra/zm-api-js-client", - "license": "BSD-3-Clause", + "name": "@zimbra/api-client", + "amdName": "zmApiJsClient", + "version": "65.0.0", + "description": "Zimbra JS API Client and GraphQL client for making requests against the Zimbra SOAP API.", + "main": "dist/zm-api-js-client.js", + "source": "index.ts", + "module": "dist/zm-api-js-client.esm.js", + "umd:main": "dist/zm-api-js-client.umd.js", + "types": "dist/index.d.ts", + "scripts": { + "generateSchemaTypes": "rimraf src/schema/generated-schema-types.ts && graphql-codegen", + "lint": "tslint --project .", + "lint:fix": "npm run lint -- --fix", + "test:unit": "BABEL_ENV=test mocha --require ./babelRegisterConfig.js test/**/*.js", + "test:watch": "npm run test:unit -- --watch", + "test:no-synacor-npm-refs": "node ./scripts/synacor-npm-refs.js", + "clean": "rimraf dist", + "build": "npm-run-all clean generateSchemaTypes rollup:* -p build:ts minify:* copySchema", + "build:ts": "tsc --emitDeclarationOnly --declaration --outDir \"dist\"", + "copySchema": "copyfiles -f src/schema/schema.graphql dist", + "rollup:cjs": "cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main", + "rollup:umd": "cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main", + "rollup:esm": "cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName $npm_package_source -o $npm_package_module", + "linkedBuild": "npm run rollup:esm -- --watch", + "minify:cjs": "cross-var uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel,reserved=['_createClass'] --keep-fnames -o $npm_package_main --source-map content=$npm_package_main.map,url=zm-api-js-client.js.map,filename=$npm_package_main.map", + "minify:umd": "cross-var uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m toplevel,reserved=['_createClass'] --keep-fnames -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map,url=zm-api-js-client.umd.js.map,filename=$npm_package_umd_main.map", + "size": "echo \"Gzipped Size: $(gzip-size $npm_package_main | pretty-bytes)\"", + "prepublishOnly": "npm test && npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags", + "publish:beta": "npm publish --tag=beta", + "security:audit": "audit-ci --moderate --report-type summary --pass-enoaudit --skip-dev", + "prepare": "is-ci || husky install" + }, + "keywords": [ + "zimbra", + "api", + "graphql" + ], + "repository": "Zimbra/zm-api-js-client", + "license": "BSD-3-Clause", "lint-staged": { "**/*.ts": [ "tslint" ] }, - "dependencies": { - "@apollo/client": "^3.2.1", - "dataloader": "^1.4.0", - "graphql": "^15.3.0", - "graphql-tools": "^7.0.4", - "lodash": "^4.17.21", - "mitt": "^2.1.0" - }, - "devDependencies": { - "@babel/cli": "^7.12.1", - "@babel/core": "^7.12.3", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/preset-env": "^7.12.1", - "@babel/preset-typescript": "^7.12.1", - "@babel/register": "^7.12.1", - "@graphql-codegen/cli": "^1.21.4", - "@graphql-codegen/typescript": "^1.22.0", - "@rollup/plugin-babel": "^5.2.1", - "@rollup/plugin-commonjs": "^15.1.0", - "@rollup/plugin-node-resolve": "^9.0.0", - "@rollup/plugin-typescript": "^6.0.0", - "@types/graphql": "^14.5.0", - "@types/lodash": "^4.14.162", - "@types/node": "^14.14.2", - "@types/whatwg-fetch": "^0.0.33", - "audit-ci": "^4.1.0", - "babel-plugin-lodash": "^3.3.4", - "chai": "^4.2.0", - "copyfiles": "^2.4.1", - "cross-var": "^1.1.0", - "file-matcher": "^1.3.0", - "husky": "^6.0.0", - "is-ci": "^3.0.0", - "lint-staged": "^11.1.1", - "mocha": "^8.3.2", - "npm-run-all": "^4.1.5", - "prettier": "^2.3.1", - "rimraf": "^3.0.2", - "rollup": "^2.32.1", - "rollup-plugin-graphql": "^0.1.0", - "rollup-plugin-local-resolve": "^1.0.7", - "tslib": "^2.0.3", - "tslint": "^5.20.1", - "tslint-config-prettier": "^1.18.0", - "tslint-plugin-prettier": "^2.3.0", - "typescript": "^4.0.3", - "uglify-js": "^3.12.1" - } + "dependencies": { + "@apollo/client": "^3.2.1", + "dataloader": "^1.4.0", + "graphql": "^15.3.0", + "graphql-tools": "^7.0.4", + "lodash": "^4.17.21", + "mitt": "^2.1.0" + }, + "devDependencies": { + "@babel/cli": "^7.12.1", + "@babel/core": "^7.12.3", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/preset-env": "^7.12.1", + "@babel/preset-typescript": "^7.12.1", + "@babel/register": "^7.12.1", + "@graphql-codegen/cli": "^1.21.4", + "@graphql-codegen/typescript": "^1.22.0", + "@rollup/plugin-babel": "^5.2.1", + "@rollup/plugin-commonjs": "^15.1.0", + "@rollup/plugin-node-resolve": "^9.0.0", + "@rollup/plugin-typescript": "^6.0.0", + "@types/graphql": "^14.5.0", + "@types/lodash": "^4.14.162", + "@types/node": "^14.14.2", + "@types/whatwg-fetch": "^0.0.33", + "audit-ci": "^4.1.0", + "babel-plugin-lodash": "^3.3.4", + "chai": "^4.2.0", + "copyfiles": "^2.4.1", + "cross-var": "^1.1.0", + "file-matcher": "^1.3.0", + "husky": "^6.0.0", + "is-ci": "^3.0.0", + "lint-staged": "^11.1.1", + "mocha": "^8.3.2", + "npm-run-all": "^4.1.5", + "prettier": "^2.3.1", + "rimraf": "^3.0.2", + "rollup": "^2.32.1", + "rollup-plugin-graphql": "^0.1.0", + "rollup-plugin-local-resolve": "^1.0.7", + "tslib": "^2.0.3", + "tslint": "^5.20.1", + "tslint-config-prettier": "^1.18.0", + "tslint-plugin-prettier": "^2.3.0", + "typescript": "^4.0.3", + "uglify-js": "^3.12.1" + } } diff --git a/tsconfig.json b/tsconfig.json index 9ece898e..8156f961 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,23 +1,23 @@ { - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "declaration": false, - "jsx": "react", - "jsxFactory": "h", - "lib": ["dom", "es2015", "es2016"], - "module": "ESNext", - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "removeComments": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "target": "esnext" - }, - "include": [ - "./src/**/*", - "./*.ts" - ] + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "declaration": false, + "jsx": "react", + "jsxFactory": "h", + "lib": ["dom", "es2015", "es2016"], + "module": "ESNext", + "moduleResolution": "node", + "noUnusedLocals": true, + "noUnusedParameters": true, + "removeComments": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "target": "esnext" + }, + "include": [ + "./src/**/*", + "./*.ts" + ] } diff --git a/tslint.json b/tslint.json index ddea3882..eb49ed72 100644 --- a/tslint.json +++ b/tslint.json @@ -1,20 +1,20 @@ { - "extends": [ - "tslint-config-prettier", - "tslint-plugin-prettier" - ], - "rules": { - "function-name": false, - "import-name": false, - "member-ordering": [true, {"order": "fields-first", "alphabetize": true }], - "ordered-imports": true, - "prefer-array-literal": false, - "prettier": [true, ".prettierrc"], - "variable-name": false - }, - "linterOptions": { - "exclude": [ - "src/schema/generated-schema-types.ts" - ] - } + "extends": [ + "tslint-config-prettier", + "tslint-plugin-prettier" + ], + "rules": { + "function-name": false, + "import-name": false, + "member-ordering": [true, {"order": "fields-first", "alphabetize": true }], + "ordered-imports": true, + "prefer-array-literal": false, + "prettier": [true, ".prettierrc"], + "variable-name": false + }, + "linterOptions": { + "exclude": [ + "src/schema/generated-schema-types.ts" + ] + } }