@formatjs/ts-transformer
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -6,2 +6,10 @@ # Change Log | ||
## 1.1.6 (2020-04-28) | ||
**Note:** Version bump only for package @formatjs/ts-transformer | ||
## [1.1.5](https://github.com/formatjs/formatjs/compare/@formatjs/ts-transformer@1.1.4...@formatjs/ts-transformer@1.1.5) (2020-04-25) | ||
@@ -8,0 +16,0 @@ |
@@ -1,6 +0,6 @@ | ||
import * as ts from 'typescript' | ||
import {Project} from 'ts-morph' | ||
import { transform as intlTransformer } from "./src"; | ||
import * as ts from 'typescript'; | ||
import {Project} from 'ts-morph'; | ||
import {transform as intlTransformer} from './src'; | ||
declare module "fs-extra" { | ||
declare module 'fs-extra' { | ||
export function outputJsonSync(file: string, data: any, opts?: {}): void; | ||
@@ -19,3 +19,3 @@ } | ||
baseUrl: __dirname, | ||
target: ts.ScriptTarget.ES2015 | ||
target: ts.ScriptTarget.ES2015, | ||
}; | ||
@@ -28,6 +28,6 @@ | ||
const project = new Project({ | ||
compilerOptions | ||
}) | ||
project.addExistingSourceFiles(input) | ||
compilerOptions, | ||
}); | ||
project.addExistingSourceFiles(input); | ||
const msgs = {}; | ||
@@ -37,9 +37,10 @@ | ||
customTransformers: { | ||
before: [ | ||
intlTransformer({ | ||
overrideIdFn: "[hash:base64:10]", | ||
program: project.getProgram().compilerObject | ||
}) | ||
] | ||
}}); | ||
before: [ | ||
intlTransformer({ | ||
overrideIdFn: '[hash:base64:10]', | ||
program: project.getProgram().compilerObject, | ||
}), | ||
], | ||
}, | ||
}); | ||
const diagnostics = project.getPreEmitDiagnostics(); | ||
@@ -46,0 +47,0 @@ |
@@ -6,5 +6,5 @@ module.exports = { | ||
'ts-jest': { | ||
tsConfig: 'tsconfig.json' | ||
} | ||
} | ||
}; | ||
tsConfig: 'tsconfig.json', | ||
}, | ||
}, | ||
}; |
{ | ||
"name": "@formatjs/ts-transformer", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "TS Compiler transformer for formatjs", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "rm -rf test/fixture/*.js && cross-env TS_NODE_PROJECT=./tsconfig.json cross-env NODE_ENV=test jest --maxWorkers=100%", | ||
"build": "tsc -p tsconfig.build.json" | ||
"test": "rm -rf test/fixture/*.js && cross-env NODE_ENV=test jest --maxWorkers=100%", | ||
"build": "tsc" | ||
}, | ||
@@ -25,3 +25,3 @@ "repository": { | ||
"loader-utils": "^2.0.0", | ||
"typescript": "3" | ||
"typescript": "3.7.2" | ||
}, | ||
@@ -34,3 +34,9 @@ "author": "Long Ho <holevietlong@gmail.com>", | ||
"homepage": "https://github.com/formatjs/formatjs#readme", | ||
"gitHead": "a35249ca1f5a7db3207e8c383df5958ab2e3c0b4" | ||
"devDependencies": { | ||
"@types/jest": "^25.2.1", | ||
"jest": "^25.4.0", | ||
"ts-jest": "^25.4.0", | ||
"ts-morph": "6" | ||
}, | ||
"gitHead": "84e7cc6f3723801271661fdbdb5391fac7e6f74c" | ||
} |
# @formatjs/ts-transformer | ||
[![npm version](https://badgen.net/npm/v/@formatjs/ts-transformer)](https://badgen.net/npm/v/@formatjs/ts-transformer) | ||
Extracts string messages for translation from modules that use React Intl (similar to [`babel-plugin-react-intl`](https://github.com/formatjs/formatjs/tree/master/packages/babel-plugin-react-intl)). | ||
Take a look at [`compile.ts`](compile.ts) for example in integration. | ||
We've migrated the docs to https://formatjs.io. |
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es6", | ||
"outDir": "dist", | ||
"rootDir": ".", | ||
"module": "commonjs", | ||
"noUnusedLocals": true, | ||
"sourceMap": true, | ||
"types": [ | ||
"eslint", | ||
"estree", | ||
"estree-jsx", | ||
"babel__core", | ||
"babel__generator", | ||
"babel__template", | ||
"babel__traverse", | ||
"benchmark", | ||
"chai", | ||
"estree", | ||
"fs-extra", | ||
"istanbul-lib-coverage", | ||
"istanbul-lib-report", | ||
"istanbul-reports", | ||
// Don't include mocha here | ||
"jest", | ||
"node", | ||
"resolve", | ||
"stack-utils", | ||
"yargs" | ||
] | ||
} | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es6", | ||
"outDir": "dist", | ||
"rootDir": "src", | ||
"noUnusedLocals": true, | ||
"sourceMap": true | ||
}, | ||
"include": ["src"] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
246296
4
1195
4
+ Addedtypescript@3.7.2(transitive)
- Removedtypescript@3.9.10(transitive)
Updatedtypescript@3.7.2