Socket
Socket
Sign inDemoInstall

grunt-ts

Package Overview
Dependencies
Maintainers
5
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-ts - npm Package Compare versions

Comparing version 4.2.0-beta.1 to 4.2.0

.vs/config/applicationhost.config

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Releases

## v4.2.0 (2015-07-21)
* FEAT: TypeScript 1.5.3 support (TypeScript 1.5 "RTM").
* In addition to features added in 4.2.0-beta.1, added experimentalDecorators flag.
* If emitDecoratorMetadata is specified, experimentalDecorators will now be enabled automatically.
* If both inlineSources and inlineSourceMap are specified, sourceMap will now be disabled automatically.
* DOCS: Updated for the above. Thanks to @hdeshev for the PR.
## v4.2.0-beta.1 (2015-06-07)

@@ -7,0 +14,0 @@ * FEAT: TypeScript 1.5 beta support.

4

package.json

@@ -5,3 +5,3 @@ {

"description": "Compile and manage your TypeScript project",
"version": "4.2.0-beta.1",
"version": "4.2.0",
"homepage": "https://github.com/grunt-ts/grunt-ts",

@@ -53,3 +53,3 @@ "repository": {

"rimraf": "2.2.6",
"typescript": "1.5.0-beta",
"typescript": "1.5.3",
"underscore": "1.5.1",

@@ -56,0 +56,0 @@ "underscore.string": "2.3.3"

@@ -10,6 +10,4 @@ # grunt-ts

### Latest Changes
Current major release is v4.1.2, which includes TypeScript 1.4. This is the best release for coding with ES5 syntax only.
Current major release is 4.2, which includes TypeScript 1.5.
Current beta release is v4.2.0-beta.1, which includes TypeScript 1.5-beta and supports all currently available functionality from that release. This release is stable enough for us to use it for grunt-ts itself. If you want to start using ES6 syntax today (while transpiling down to ES5), this is the correct release to use. We will keep this up to date (but marked as beta), until TypeScript 1.5 is officially released (hopefully in the next week or two).
[Full changelog is here](CHANGELOG.md).

@@ -65,3 +63,4 @@

|--declaration|[declaration](#declaration)|Generates a `.d.ts` definitions file for compiled TypeScript files|
|--emitDecoratorMetadata|[emitDecoratorMetadata](#emitdecoratormetadata)|Emit design-type metadata for decorated declarations in source|
|--emitDecoratorMetadata|[emitDecoratorMetadata](#emitdecoratormetadata)|Emit metadata for type/parameter decorators.|
|--experimentalDecorators|[experimentalDecorators](#experimentaldecorators)|Enables experimental support for ES7 decorators|
|--inlineSourceMap|[inlineSourceMap](#inlinesourcemap)|Emit a single file that includes source maps instead of emitting a separate `.js.map` file.|

@@ -98,3 +97,4 @@ |--inlineSources|[inlineSources](#inlinesources)|Emit the TypeScript source alongside the sourcemaps within a single file; requires `--inlineSourceMap` to be set.|

|[declaration](#declaration)|option|`true`, `false` (default) - indicates that definition files should be emitted.|
|[emitDecoratorMetadata](#emitdecoratormetadata)|option|`true`, `false` (default) - set to true to emit metadata for ES7 decorators|
|[emitDecoratorMetadata](#emitdecoratormetadata)|option|`true`, `false` (default) - set to true to emit metadata for ES7 decorators (will enable experimentalDecorators)|
|[experimentalDecorators](#experimentaldecorators)|option|`true`, `false` (default) - set to true to enable support for ES7 decorators|
|[failOnTypeErrors](#failontypeerrors)|option|`true` (default), `false` - fail Grunt pipeline if there is a type error|

@@ -494,4 +494,8 @@ |[fast](#fast)|option|`'watch'` (default), `'always'`, `'never'` - how to decide on a "fast" grunt-ts compile.|

Emit design-type metadata for decorated declarations in source. This is only available in TypeScript 1.5 and higher.
Set to true to pass `--emitDecoratorMetadata` to the compiler. If set to true, TypeScript will emit type information about type and parameter decorators, so it's available at runtime.
Used by tools like [Angular](https://angular.io/). You will probably need to import the [reflect-metadata](https://www.npmjs.com/package/reflect-metadata) package in your app when using this feature.
This is only available in TypeScript 1.5 and higher. If enabled, will automatically enable `experimentalDecorators`
````javascript

@@ -507,2 +511,20 @@ grunt.initConfig({

#### experimentalDecorators
````javascript
true | false (default)
````
Enable support for experimental ES7 decorators. This is only available in TypeScript 1.5 and higher.
````javascript
grunt.initConfig({
ts: {
options: {
experimentalDecorators: true
}
}
});
````
#### failOnTypeErrors

@@ -625,3 +647,3 @@

When true, TypeScript will emit source maps inline at the bottom of each JS file, instead of emitting a separate `.js.map` file. Note: specifying this option will automatically enable `sourceMap`.
When true, TypeScript will emit source maps inline at the bottom of each JS file, instead of emitting a separate `.js.map` file. If this option is used with `sourceMap`, `inlineSourceMap` will win.

@@ -646,3 +668,3 @@ ````javascript

When true, TypeScript will emit the TypeScript sources at the bottom of each JS file along with an inline sourcemap, instead of emitting source maps that reference an external `.ts` file. Note: specifying this option will automatically enable both `sourceMap` and `inlineSourceMap`.
When true, TypeScript will emit TypeScript sources "inline". This *must* be used with either `inlineSourceMap` or `sourceMap`. When used with `inlineSourceMap`, the TypeScript sources and the source map itself are included in a Base64-encoded string in a comment at the end of the emitted JavaScript file. When used with `sourceMap`, the escaped TypeScript sources are included in the .js.map file itself under a `sourcesContent` property.

@@ -654,3 +676,4 @@ ````javascript

options: {
inlineSources: true
inlineSources: true,
inlineSourceMap: true
}

@@ -882,3 +905,3 @@ }

If true, grunt-ts will instruct `tsc` to emit source maps (`.js.map` files).
If true, grunt-ts will instruct `tsc` to emit source maps (`.js.map` files). If this option is used with `inlineSourceMap`, `inlineSourceMap` will win.

@@ -947,2 +970,12 @@ ````javascript

#### emitDecoratorMetadata
````javascript
true | false (default)
````
Set to true to pass `--emitDecoratorMetadata` to the compiler. If set to true, TypeScript will emit type information about type and parameter decorators, so it's available at runtime.
Used by tools like [Angular](https://angular.io/). You will probably need to import the [reflect-metadata](https://www.npmjs.com/package/reflect-metadata) package in your app when using this feature.
#### target

@@ -949,0 +982,0 @@

@@ -174,2 +174,5 @@ /// <reference path="../../defs/tsd.d.ts"/>

}
if (task.experimentalDecorators) {
args.push('--experimentalDecorators');
}
// string options

@@ -273,4 +276,11 @@ args.push('--target', task.target.toUpperCase());

// Switch implementation if a test version of executeNode exists.
if (target.testExecute) {
executeNode = target.testExecute;
if ('testExecute' in target) {
if (_.isFunction(target.testExecute)) {
executeNode = target.testExecute;
}
else {
var invalidTestExecuteError = 'Invalid testExecute node present on target "' + targetName +
'". Value of testExecute must be a function.';
throw (new Error(invalidTestExecuteError));
}
}

@@ -277,0 +287,0 @@ else {

@@ -208,2 +208,5 @@ /// <reference path="../../defs/tsd.d.ts"/>

}
if (task.experimentalDecorators) {
args.push('--experimentalDecorators');
}

@@ -315,4 +318,10 @@ // string options

// Switch implementation if a test version of executeNode exists.
if (target.testExecute) {
executeNode = target.testExecute;
if ('testExecute' in target) {
if (_.isFunction(target.testExecute)) {
executeNode = target.testExecute;
} else {
let invalidTestExecuteError = 'Invalid testExecute node present on target "' + targetName +
'". Value of testExecute must be a function.';
throw (new Error(invalidTestExecuteError));
}
} else {

@@ -319,0 +328,0 @@ // this is the normal path.

@@ -35,2 +35,3 @@

emitDecoratorMetadata: boolean;
experimentalDecorators: boolean;
mapRoot: string;

@@ -37,0 +38,0 @@ /** amd | commonjs | umd | system */

/// <reference path="../../defs/tsd.d.ts"/>
/// <reference path="./interfaces.d.ts"/>
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

@@ -5,0 +5,0 @@ function __() { this.constructor = d; }

@@ -79,2 +79,3 @@ /// <reference path="../defs/tsd.d.ts"/>

emitDecoratorMetadata: false,
experimentalDecorators: false,
mapRoot: '',

@@ -214,2 +215,12 @@ module: null,

options.additionalFlags = utils.firstElementWithValue([rawTargetOptions.additionalFlags, rawTaskOptions.additionalFlags]);
options.sourceMap = utils.firstElementWithValue([options.sourceMap,
rawTargetOptions.sourceMap, rawTaskOptions.sourceMap]);
options.inlineSources = utils.firstElementWithValue([options.inlineSources,
rawTargetOptions.inlineSources, rawTaskOptions.inlineSources]);
options.inlineSourceMap = utils.firstElementWithValue([options.inlineSourceMap,
rawTargetOptions.inlineSourceMap, rawTaskOptions.inlineSourceMap]);
options.experimentalDecorators = utils.firstElementWithValue([options.experimentalDecorators,
rawTargetOptions.experimentalDecorators, rawTaskOptions.experimentalDecorators]);
options.emitDecoratorMetadata = utils.firstElementWithValue([options.emitDecoratorMetadata,
rawTargetOptions.emitDecoratorMetadata, rawTaskOptions.emitDecoratorMetadata]);
// fix the improperly cased options to their appropriate values

@@ -283,8 +294,16 @@ options.allowBool = 'allowbool' in options ?

options.removeComments = !!options.removeComments;
if (options.inlineSources) {
if (options.inlineSources && !(options.inlineSourceMap || options.sourceMap)) {
// Assume inline source maps, if inline sources is enabled and the other settings are off.
options.inlineSourceMap = true;
}
if (options.inlineSourceMap) {
options.sourceMap = true;
if (options.sourceMap && options.inlineSourceMap) {
// todo: If the parameter reading code is ever rewritten, we should be able to tell if sourceMap
// is on only because of the grunt-ts defaults. At that time we should pass a warning if they're
// both affirmatively enabled instead of just silently fixing.
options.sourceMap = false;
options.inlineSourceMap = true;
}
if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
options.experimentalDecorators = true;
}
if (currenttask.files.length === 0 && rawTargetOptions.compile) {

@@ -291,0 +310,0 @@ grunt.log.writeln('Zero files found to compile in target "' + currenttask.target + '". Compilation will be skipped.');

@@ -104,2 +104,3 @@ /// <reference path="../defs/tsd.d.ts"/>

emitDecoratorMetadata: false,
experimentalDecorators: false,
mapRoot: '',

@@ -262,2 +263,13 @@ module: null,

options.sourceMap = utils.firstElementWithValue([options.sourceMap,
rawTargetOptions.sourceMap, rawTaskOptions.sourceMap]);
options.inlineSources = utils.firstElementWithValue([options.inlineSources,
rawTargetOptions.inlineSources, rawTaskOptions.inlineSources]);
options.inlineSourceMap = utils.firstElementWithValue([options.inlineSourceMap,
rawTargetOptions.inlineSourceMap, rawTaskOptions.inlineSourceMap]);
options.experimentalDecorators = utils.firstElementWithValue([options.experimentalDecorators,
rawTargetOptions.experimentalDecorators, rawTaskOptions.experimentalDecorators]);
options.emitDecoratorMetadata = utils.firstElementWithValue([options.emitDecoratorMetadata,
rawTargetOptions.emitDecoratorMetadata, rawTaskOptions.emitDecoratorMetadata]);
// fix the improperly cased options to their appropriate values

@@ -339,9 +351,18 @@ options.allowBool = 'allowbool' in options ?

if (options.inlineSources) {
if (options.inlineSources && !(options.inlineSourceMap || options.sourceMap)) {
// Assume inline source maps, if inline sources is enabled and the other settings are off.
options.inlineSourceMap = true;
}
if (options.inlineSourceMap) {
options.sourceMap = true;
if (options.sourceMap && options.inlineSourceMap) {
// todo: If the parameter reading code is ever rewritten, we should be able to tell if sourceMap
// is on only because of the grunt-ts defaults. At that time we should pass a warning if they're
// both affirmatively enabled instead of just silently fixing.
options.sourceMap = false;
options.inlineSourceMap = true;
}
if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
options.experimentalDecorators = true;
}

@@ -348,0 +369,0 @@ if (currenttask.files.length === 0 && rawTargetOptions.compile) {

{
"version": "1.5.0-beta",
"version": "1.5.3",
"compilerOptions": {

@@ -10,4 +10,5 @@ "target": "es5",

"noLib": false,
"preserveConstEnums": true,
"suppressImplicitAnyIndexErrors": true
"preserveConstEnums": false,
"suppressImplicitAnyIndexErrors": true,
"sourceMap": true
},

@@ -14,0 +15,0 @@ "filesGlob": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc