From 7484cf4fc33713a5e61e063bd2c034a01482391e Mon Sep 17 00:00:00 2001 From: Boris Cherny Date: Thu, 27 Apr 2017 18:03:04 -0700 Subject: [PATCH] housekeeping --- index.tsx | 5 +++-- package.json | 36 +++++++++++++++++------------------- test.tsx | 2 +- tsconfig.json | 4 ++-- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/index.tsx b/index.tsx index 8b7bcba..64e1738 100644 --- a/index.tsx +++ b/index.tsx @@ -1,5 +1,5 @@ import { IAugmentedJQuery, IComponentOptions } from 'angular' -import { fromPairs } from 'lodash' +import fromPairs = require('lodash.frompairs') import NgComponent from 'ngcomponent' import * as React from 'react' import { render, unmountComponentAtNode } from 'react-dom' @@ -30,7 +30,8 @@ export function react2angular( super() } render() { - render(, this.$element[0]) + // TODO: rm any when https://github.com/Microsoft/TypeScript/pull/13288 is merged + render(, this.$element[0]) } componentWillUnmount() { unmountComponentAtNode(this.$element[0]) diff --git a/package.json b/package.json index 41d08df..6e442d9 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "react2angular", - "version": "1.1.2", + "version": "1.1.3", "description": "The easiest way to embed React components in Angular 1 apps!", "main": "index.js", "main:esnext": "index.es2015.js", "typings": "index.d.ts", "scripts": { - "build": "npm run clean; tsc -d -m es2015 && mv ./index.js ./index.es2015.js && tsc -m commonjs -t es5", + "build": "npm run clean; tsc -d -t es2015 && mv ./index.js ./index.es2015.js && tsc -t es5", "clean": "rm ./*.d.ts; rm ./*.map; exit 0", "pretest": "npm run build", "prepublish": "npm test", @@ -28,33 +28,31 @@ "homepage": "https://github.com/coatue-oss/react2angular#readme", "devDependencies": { "@types/angular-mocks": "^1.5.9", - "@types/jasmine": "^2.5.43", - "@types/react-addons-test-utils": "^0.14.17", - "angular-mocks": "^1.6.2", - "jasmine": "^2.5.3", - "karma": "^1.5.0", + "@types/jasmine": "^2.5.47", + "angular-mocks": "^1.6.4", + "jasmine": "^2.6.0", + "karma": "^1.6.0", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.0.0", "karma-jasmine": "^1.1.0", - "karma-mocha-reporter": "^2.2.2", + "karma-mocha-reporter": "^2.2.3", "karma-source-map-support": "^1.2.0", - "ngimport": "^0.6.0", + "ngimport": "^0.6.1", "npm-run-all": "^4.0.2", - "react-addons-test-utils": "^15.4.2", "rollupify": "^0.3.9", - "tslint": "^5.0.0", - "typescript": "^2.2.1", + "tslint": "^5.1.0", + "typescript": "^2.3.1", "watchify": "^3.9.0" }, "dependencies": { - "@types/angular": "^1.6.7", - "@types/lodash.frompairs": "^4.0.1", - "@types/react": "^15.0.12", + "@types/angular": "^1.6.16", + "@types/lodash.frompairs": "^4.0.2", + "@types/react": "^15.0.23", "@types/react-dom": "^15.5.0", - "angular": "^1.6.2", + "angular": ">=1.5.0", "lodash.frompairs": "^4.0.1", - "ngcomponent": "^3.0.0", - "react": "^15.4.2", - "react-dom": "^15.4.2" + "ngcomponent": "^3.0.1", + "react": "^15.5.4", + "react-dom": "^15.5.4" } } diff --git a/test.tsx b/test.tsx index feab4f3..77d17d7 100644 --- a/test.tsx +++ b/test.tsx @@ -2,7 +2,7 @@ import { bootstrap, element as $, ICompileService, mock, module } from 'angular' import 'angular-mocks' import { $rootScope } from 'ngimport' import * as React from 'react' -import { Simulate } from 'react-addons-test-utils' +import { Simulate } from 'react-dom/test-utils' import { react2angular } from './' class TestOne extends React.Component { diff --git a/tsconfig.json b/tsconfig.json index 6ac9943..a7d97e3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "allowSyntheticDefaultImports": true, + "allowSyntheticDefaultImports": false, "declaration": false, "forceConsistentCasingInFileNames": true, "jsx": "react", @@ -18,7 +18,7 @@ "pretty": true, "sourceMap": true, "strictNullChecks": true, - "target": "es6" + "target": "es2015" }, "files": [ "index.tsx",