From 7c2bb6225caab06ce9012992e2dfe339efe58767 Mon Sep 17 00:00:00 2001 From: Daniel Dietrich Date: Wed, 25 Sep 2019 14:13:30 +0200 Subject: [PATCH] Removed shims, targeting ES8/ES2017 --- README.md | 2 +- src/index.test.ts | 6 +++--- src/index.ts | 4 ++-- tsconfig.json | 6 ++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0acee63..d5f94fb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@   [![build](https://img.shields.io/travis/danieldietrich/copy?logo=github&style=flat-square)](https://travis-ci.org/danieldietrich/copy/)[![coverage](https://img.shields.io/codecov/c/github/danieldietrich/copy?style=flat-square)](https://codecov.io/gh/danieldietrich/copy/)   -![Platform](https://img.shields.io/badge/platform-Node%20v10%20%28ES6%2fES2015%29-decc47?logo=TypeScript&style=flat-square) +![Platform](https://img.shields.io/badge/platform-Node%20v10%20%28ES8%2fES2017%29-decc47?logo=TypeScript&style=flat-square)   [![donate](https://img.shields.io/badge/Donate-PayPal-blue.svg?logo=paypal&style=flat-square)](https://paypal.me/danieldietrich13)[![patrons](https://img.shields.io/liberapay/patrons/danieldietrich?style=flat-square)](https://liberapay.com/danieldietrich/)[![license](https://img.shields.io/github/license/danieldietrich/copy?style=flat-square)](https://opensource.org/licenses/MIT/)   diff --git a/src/index.test.ts b/src/index.test.ts index 0b48bd5..add8033 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1,6 +1,6 @@ -import copy from '.'; -import fs from 'fs'; -import rimraf from 'rimraf'; +import * as copy from '.'; +import * as fs from 'fs'; +import * as rimraf from 'rimraf'; import { promisify } from 'util'; // promisify all the things as long as fs.promises is stage-1 experimental diff --git a/src/index.ts b/src/index.ts index d80fcf3..1b6681e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ -import fs from 'fs'; -import path from 'path'; +import * as fs from 'fs'; +import * as path from 'path'; import { promisify } from 'util'; /** diff --git a/tsconfig.json b/tsconfig.json index b091f34..07a2115 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,8 @@ { "compilerOptions": { - "allowSyntheticDefaultImports": true, "declaration": true, - "esModuleInterop": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es2017"], "module": "commonjs", "moduleResolution": "node", "noImplicitReturns": true, @@ -12,7 +10,7 @@ "removeComments": true, "sourceMap": true, "strict": true, - "target": "es6", + "target": "es2017", "outDir": "./dist" }, "include": [