Socket
Socket
Sign inDemoInstall

babel-preset-proposal-typescript

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-proposal-typescript - npm Package Compare versions

Comparing version 1.4.5 to 1.4.6

lib/index.d.ts

12

CHANGELOG.md

@@ -5,2 +5,14 @@ # Changelog

### [1.4.6](https://github.com/rx-ts/babel-preset-proposal-typescript/compare/v1.4.5...v1.4.6) (2019-11-10)
### Features
* better TypeScript support ([66f65c5](https://github.com/rx-ts/babel-preset-proposal-typescript/commit/66f65c51bec7d4c67eb1d3f65438a831b2dfe67d))
### Bug Fixes
* lock rollup-plugin-url@^2.2.4 for node 8 ([d0b7bae](https://github.com/rx-ts/babel-preset-proposal-typescript/commit/d0b7baead76b14384326ad72acf1ee1e51409940))
### [1.4.5](https://github.com/rx-ts/babel-preset-proposal-typescript/compare/v1.4.4...v1.4.5) (2019-10-09)

@@ -7,0 +19,0 @@

8

lib/cjs.js

@@ -22,7 +22,7 @@ 'use strict';

var syntaxV8intrinsic = helperPluginUtils.declare(function (api, options) {
var syntaxV8intrinsic = helperPluginUtils.declare(function (api) {
api.assertVersion(7);
return {
name: 'v8intrinsic',
manipulateOptions: function (opts, parserOpts) {
manipulateOptions: function (_opts, parserOpts) {
parserOpts.plugins.push('v8intrinsic');

@@ -33,5 +33,5 @@ },

var index = helperPluginUtils.declare(function (api, opts) {
var index = helperPluginUtils.declare(function (api, _a) {
var _b = _a.classLoose, classLoose = _b === void 0 ? true : _b, decoratorsBeforeExport = _a.decoratorsBeforeExport, _c = _a.decoratorsLegacy, decoratorsLegacy = _c === void 0 ? true : _c, isTSX = _a.isTSX, _d = _a.pipelineOperator, pipelineOperator = _d === void 0 ? 'minimal' : _d;
api.assertVersion(7);
var _a = opts.classLoose, classLoose = _a === void 0 ? true : _a, decoratorsBeforeExport = opts.decoratorsBeforeExport, _b = opts.decoratorsLegacy, decoratorsLegacy = _b === void 0 ? true : _b, isTSX = opts.isTSX, _c = opts.pipelineOperator, pipelineOperator = _c === void 0 ? 'minimal' : _c;
return {

@@ -38,0 +38,0 @@ plugins: [

@@ -18,7 +18,7 @@ import syntaxDecorators from '@babel/plugin-syntax-decorators';

var syntaxV8intrinsic = declare((api, options) => {
var syntaxV8intrinsic = declare((api) => {
api.assertVersion(7);
return {
name: 'v8intrinsic',
manipulateOptions(opts, parserOpts) {
manipulateOptions(_opts, parserOpts) {
parserOpts.plugins.push('v8intrinsic');

@@ -29,5 +29,4 @@ },

var index = declare((api, opts) => {
var index = declare((api, { classLoose = true, decoratorsBeforeExport, decoratorsLegacy = true, isTSX, pipelineOperator = 'minimal', }) => {
api.assertVersion(7);
const { classLoose = true, decoratorsBeforeExport, decoratorsLegacy = true, isTSX, pipelineOperator = 'minimal', } = opts;
return {

@@ -34,0 +33,0 @@ plugins: [

@@ -18,7 +18,7 @@ import syntaxDecorators from '@babel/plugin-syntax-decorators';

var syntaxV8intrinsic = declare(function (api, options) {
var syntaxV8intrinsic = declare(function (api) {
api.assertVersion(7);
return {
name: 'v8intrinsic',
manipulateOptions: function (opts, parserOpts) {
manipulateOptions: function (_opts, parserOpts) {
parserOpts.plugins.push('v8intrinsic');

@@ -29,5 +29,5 @@ },

var index = declare(function (api, opts) {
var index = declare(function (api, _a) {
var _b = _a.classLoose, classLoose = _b === void 0 ? true : _b, decoratorsBeforeExport = _a.decoratorsBeforeExport, _c = _a.decoratorsLegacy, decoratorsLegacy = _c === void 0 ? true : _c, isTSX = _a.isTSX, _d = _a.pipelineOperator, pipelineOperator = _d === void 0 ? 'minimal' : _d;
api.assertVersion(7);
var _a = opts.classLoose, classLoose = _a === void 0 ? true : _a, decoratorsBeforeExport = opts.decoratorsBeforeExport, _b = opts.decoratorsLegacy, decoratorsLegacy = _b === void 0 ? true : _b, isTSX = opts.isTSX, _c = opts.pipelineOperator, pipelineOperator = _c === void 0 ? 'minimal' : _c;
return {

@@ -34,0 +34,0 @@ plugins: [

{
"name": "babel-preset-proposal-typescript",
"version": "1.4.5",
"version": "1.4.6",
"description": "Yet another Babel preset for TypeScript, only transforms proposals which TypeScript does not support now.",

@@ -12,6 +12,9 @@ "repository": "git@github.com/rx-ts/babel-preset-proposal-typescript.git",

"main": "lib/cjs",
"module": "lib/esm",
"module": "lib",
"es2015": "lib/es2015",
"fesm5": "lib/esm",
"types": "lib",
"files": [
"lib"
"lib",
"!*.tsbuildinfo"
],

@@ -28,11 +31,14 @@ "keywords": [

"scripts": {
"build": "r",
"lint": "eslint . --ext js,md,ts -f friendly",
"build": "run-p build:*",
"build:r": "r",
"build:ts": "tsc -P src",
"lint": "run-p lint:*",
"lint:es": "cross-env PARSER_NO_WATCH=true eslint . --ext js,md,ts -f friendly",
"lint:tsc": "tsc -P src --noEmit",
"postinstall": "bash scripts/postinstall.sh || exit 0",
"prepublishOnly": "yarn test",
"pretest": "r",
"test": "jest"
},
"peerDependencies": {
"@babel/core": "^7.6.2",
"@babel/core": "^7.6.4",
"typescript": "^3.0.0"

@@ -42,6 +48,6 @@ },

"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.7.0",
"@babel/plugin-proposal-do-expressions": "^7.6.0",
"@babel/plugin-proposal-function-bind": "^7.2.0",
"@babel/plugin-proposal-function-sent": "^7.5.0",
"@babel/plugin-proposal-function-sent": "^7.7.0",
"@babel/plugin-proposal-json-strings": "^7.2.0",

@@ -60,29 +66,17 @@ "@babel/plugin-proposal-logical-assignment-operators": "^7.2.0",

"devDependencies": {
"@1stg/commitlint-config": "^0.1.0",
"@1stg/eslint-config": "^0.12.20",
"@1stg/husky-config": "^0.3.1",
"@1stg/lint-staged": "^0.8.6",
"@1stg/prettier-config": "^0.4.2",
"@1stg/remark-config": "^0.2.2",
"@1stg/tsconfig": "^0.6.0",
"@babel/cli": "^7.6.3",
"@babel/core": "^7.6.3",
"@babel/parser": "^7.6.3",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/preset-env": "^7.6.3",
"@babel/preset-typescript": "^7.6.0",
"@commitlint/cli": "^8.2.0",
"@pkgr/rollup": "^0.2.4",
"@1stg/lib-config": "^0.1.13",
"@babel/parser": "^7.7.3",
"@babel/preset-env": "^7.7.1",
"@pkgr/rollup": "^0.8.2",
"@types/babel__core": "^7.1.3",
"@types/jest": "^24.0.18",
"@types/jest": "^24.0.22",
"babel-jest": "^24.9.0",
"babel-preset-proposal-typescript": "link:.",
"eslint": "^6.5.1",
"husky": "^3.0.8",
"jest": "^24.9.0",
"lint-staged": "^9.4.2",
"prettier": "^1.18.2",
"rollup": "^1.23.1",
"typescript": "^3.6.3"
"npm-run-all": "^4.1.5"
},
"resolutions": {
"prettier": "^1.19.1",
"typescript": "~3.6.4"
}
}
# babel-preset-proposal-typescript
[![Travis](https://img.shields.io/travis/com/rx-ts/babel-preset-proposal-typescript.svg)](https://travis-ci.com/rx-ts/babel-preset-proposal-typescript)
[![GitHub Actions](https://github.com/rx-ts/babel-preset-proposal-typescript/workflows/Node%20CI/badge.svg)](https://github.com/rx-ts/babel-preset-proposal-typescript/actions?query=workflow%3A%22Node+CI%22)
[![Codecov](https://img.shields.io/codecov/c/github/rx-ts/babel-preset-proposal-typescript.svg)](https://codecov.io/gh/rx-ts/babel-preset-proposal-typescript)
[![Codacy Grade](https://img.shields.io/codacy/grade/53177b35c7a1440184d819836ea7a5ed)](https://www.codacy.com/app/JounQin/babel-preset-proposal-typescript)
[![David Peer](https://img.shields.io/david/peer/rx-ts/babel-preset-proposal-typescript.svg)](https://david-dm.org/rx-ts/babel-preset-proposal-typescript?type=peer)

@@ -10,2 +11,7 @@ [![David](https://img.shields.io/david/rx-ts/babel-preset-proposal-typescript.svg)](https://david-dm.org/rx-ts/babel-preset-proposal-typescript)

[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![codechecks.io](https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true)](https://codechecks.io)
Yet another Babel preset for TypeScript, only transforms proposals which TypeScript does not support now.

@@ -57,5 +63,5 @@

| `classLoose` | whether to use loose mode for class properties and private methods | `true` |
| `decoratorsBeforeExport` | See [Babel Document](https://babeljs.io/docs/en/babel-plugin-proposal-decorators#decoratorsbeforeexport) | N/A |
| `decoratorsBeforeExport` | See [Babel Document](https://babeljs.io/docs/en/babel-plugin-proposal-decorators#decoratorsbeforeexport) | `undefined` |
| `decoratorsLegacy` | whether to use legacy decorators semantic | `true` |
| `isTSX` | whether to enable `jsx` plugin with `typescript` | `false`, `true` but for `/\.[jt]sx$/` |
| `isTSX` | whether to enable `jsx` plugin with `typescript` | `false`, but `true` for `/\.[jt]sx$/` |
| `pipelineOperator` | implementation of pipeline operator | `"minimal"` |

@@ -91,7 +97,16 @@

Pipe codes through `babel-loader` to `ts-loader` or `awesome-typescript-loader`.
Pipe codes through `babel-loader`.
```js
loader = {
test: /\.ts$/,
test: /\.[jt]sx?$/,
loader: 'babel-loader',
options: {
presets: ['proposal-typescript'],
},
}
// if you prefer `ts-loader` or `awesome-typescript-loader`
loader = {
test: /\.tsx?$/,
use: [

@@ -98,0 +113,0 @@ {

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