From f7cc2219ffc3cda3e4e6ba51af977614832f1fc7 Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Wed, 24 Aug 2022 13:05:06 +0100 Subject: [PATCH] perf!: import helpers from `tslib` --- package.json | 131 +++++++++++++++++++++++++------------------------- tsconfig.json | 24 ++++----- 2 files changed, 79 insertions(+), 76 deletions(-) diff --git a/package.json b/package.json index 85a3aee..cca9c7e 100644 --- a/package.json +++ b/package.json @@ -1,67 +1,68 @@ { - "name": "@guardian/libs", - "version": "0.0.0-this-never-updates-in-source-code-refer-to-git-tags", - "private": false, - "description": "A collection of JavaScript libraries and TypeScript types for Guardian projects", - "homepage": "https://github.com/guardian/libs#readme", - "bugs": { - "url": "https://github.com/guardian/libs/issues" - }, - "repository": "https://github.com/guardian/libs.git", - "license": "Apache-2.0", - "author": "Guardian developers", - "sideEffects": false, - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", - "types": "dist/types/index.d.ts", - "files": [ - "dist", - "src" - ], - "scripts": { - "prebuild": "yarn clean", - "build": "pkgu build", - "clean": "rm -rf dist", - "lint": "eslint . --ext .js,.ts", - "precommit:logger-preview": "ts-node scripts/generateSvg.logger.teams.ts", - "precommit:update-readme": "ts-node scripts/update-readme.ts", - "prepare": "husky install", - "prepush:test": "jest --runInBand --onlyChanged --coverage=false", - "test": "jest", - "test:watch": "yarn test --watch", - "tsc": "tsc --noEmit --project tsconfig.dev.json", - "validate": "npm-run-all tsc lint test build" - }, - "devDependencies": { - "@guardian/eslint-config": "1.0.1", - "@guardian/eslint-config-typescript": "1.0.2", - "@guardian/pkgu": "0.6.2", - "@guardian/prettier": "2.0.0", - "@guardian/tsconfig": "0.1.4", - "@semantic-release/github": "8.0.5", - "@types/jest": "27.4.1", - "@types/node": "16.11.47", - "@types/wcag-contrast": "3.0.0", - "conventional-changelog-conventionalcommits": "5.0.0", - "eslint": "8.21.0", - "husky": "8.0.1", - "jest": "27.5.1", - "jest-fetch-mock": "3.0.3", - "mockdate": "3.0.5", - "npm-run-all": "4.1.5", - "prettier": "2.7.1", - "semantic-release": "19.0.3", - "ts-jest": "27.1.4", - "ts-node": "10.8.1", - "tslib": "2.4.0", - "typescript": "4.2.2", - "wcag-contrast": "3.0.0", - "web-vitals": "2.0.0" - }, - "peerDependencies": { - "web-vitals": "^2.0.0" - }, - "publishConfig": { - "access": "public" - } + "name": "@guardian/libs", + "version": "0.0.0-this-never-updates-in-source-code-refer-to-git-tags", + "private": false, + "description": "A collection of JavaScript libraries and TypeScript types for Guardian projects", + "homepage": "https://github.com/guardian/libs#readme", + "bugs": { + "url": "https://github.com/guardian/libs/issues" + }, + "repository": "https://github.com/guardian/libs.git", + "license": "Apache-2.0", + "author": "Guardian developers", + "sideEffects": false, + "main": "dist/cjs/index.js", + "module": "dist/esm/index.js", + "types": "dist/types/index.d.ts", + "files": [ + "dist", + "src" + ], + "scripts": { + "prebuild": "yarn clean", + "build": "pkgu build", + "clean": "rm -rf dist", + "lint": "eslint . --ext .js,.ts", + "precommit:logger-preview": "ts-node scripts/generateSvg.logger.teams.ts", + "precommit:update-readme": "ts-node scripts/update-readme.ts", + "prepare": "husky install", + "prepush:test": "jest --runInBand --onlyChanged --coverage=false", + "test": "jest", + "test:watch": "yarn test --watch", + "tsc": "tsc --noEmit --project tsconfig.dev.json", + "validate": "npm-run-all tsc lint test build" + }, + "devDependencies": { + "@guardian/eslint-config": "1.0.1", + "@guardian/eslint-config-typescript": "1.0.2", + "@guardian/pkgu": "0.6.2", + "@guardian/prettier": "2.0.0", + "@guardian/tsconfig": "0.1.4", + "@semantic-release/github": "8.0.5", + "@types/jest": "27.4.1", + "@types/node": "16.11.47", + "@types/wcag-contrast": "3.0.0", + "conventional-changelog-conventionalcommits": "5.0.0", + "eslint": "8.21.0", + "husky": "8.0.1", + "jest": "27.5.1", + "jest-fetch-mock": "3.0.3", + "mockdate": "3.0.5", + "npm-run-all": "4.1.5", + "prettier": "2.7.1", + "semantic-release": "19.0.3", + "ts-jest": "27.1.4", + "ts-node": "10.8.1", + "tslib": "2.4.0", + "typescript": "4.2.2", + "wcag-contrast": "3.0.0", + "web-vitals": "2.0.0" + }, + "peerDependencies": { + "tslib": "^2.4.0", + "web-vitals": "^2.0.0" + }, + "publishConfig": { + "access": "public" + } } diff --git a/tsconfig.json b/tsconfig.json index 6463350..3e9b76a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,15 @@ { - "extends": "@guardian/tsconfig", - "compilerOptions": { - "allowJs": true, - "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "noEmit": true, - "target": "ES2020" - }, - "include": ["src"], - "exclude": ["node_modules", "dist", "coverage"], - "ts-node": { "compilerOptions": { "module": "commonjs" } } + "extends": "@guardian/tsconfig", + "compilerOptions": { + "allowJs": true, + "forceConsistentCasingInFileNames": true, + "importHelpers": true, + "isolatedModules": true, + "module": "ESNext", + "noEmit": true, + "target": "ES2020" + }, + "include": ["src"], + "exclude": ["node_modules", "dist", "coverage"], + "ts-node": { "compilerOptions": { "module": "commonjs" } } }