babel-preset-kyt-react
Advanced tools
Comparing version 1.0.0-alpha.8a16cb19 to 1.0.0-alpha.8a69a26a
@@ -1,22 +0,48 @@ | ||
var babelPresetReact = require('babel-preset-react'); | ||
var babelPresetReact = require('@babel/preset-react'); | ||
var addReactDisplayName = require('babel-plugin-add-react-displayname'); | ||
var reactRemovePropTypes = require('babel-plugin-transform-react-remove-prop-types'); | ||
var reactTransformConstant = require('babel-plugin-transform-react-constant-elements'); | ||
var reactTransformInline = require('babel-plugin-transform-react-inline-elements'); | ||
var reactTransformJsxSource = require('babel-plugin-transform-react-jsx-source'); | ||
var reactTransformConstant = require('@babel/plugin-transform-react-constant-elements'); | ||
var reactTransformInline = require('@babel/plugin-transform-react-inline-elements'); | ||
var babelPresetKytCore = require('babel-preset-kyt-core'); | ||
module.exports = function getPresetReact(context, opts) { | ||
var useProductionTransforms = true; | ||
var productionTransforms = [reactRemovePropTypes]; | ||
opts = opts || {}; | ||
if ('useProductionTransforms' in opts) { | ||
// eslint-disable-next-line prefer-destructuring | ||
useProductionTransforms = opts.useProductionTransforms; | ||
} | ||
if (useProductionTransforms === true) { | ||
productionTransforms.push(reactTransformConstant); | ||
productionTransforms.push(reactTransformInline); | ||
} | ||
return { | ||
presets: [ | ||
babelPresetReact, | ||
// pass options through to core preset | ||
[babelPresetKytCore, opts || {}], | ||
], | ||
plugins: [addReactDisplayName], | ||
env: { | ||
development: { | ||
plugins: [reactTransformJsxSource], | ||
presets: [ | ||
[babelPresetReact, { development: true }], | ||
// pass options through to core preset | ||
[babelPresetKytCore, opts || {}], | ||
], | ||
}, | ||
test: { | ||
presets: [ | ||
babelPresetReact, | ||
// pass options through to core preset | ||
[babelPresetKytCore, opts || {}], | ||
], | ||
}, | ||
production: { | ||
plugins: [reactRemovePropTypes, reactTransformConstant, reactTransformInline], | ||
presets: [ | ||
babelPresetReact, | ||
// pass options through to core preset | ||
[babelPresetKytCore, opts || {}], | ||
], | ||
plugins: productionTransforms, | ||
}, | ||
@@ -23,0 +49,0 @@ }, |
{ | ||
"name": "babel-preset-kyt-react", | ||
"version": "1.0.0-alpha.8a16cb19", | ||
"version": "1.0.0-alpha.8a69a26a", | ||
"description": "An opinionated babel preset for react apps, best used with kyt.", | ||
@@ -12,8 +12,8 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"babel-plugin-transform-react-constant-elements": "6.9.1", | ||
"babel-plugin-transform-react-inline-elements": "6.8.0", | ||
"babel-plugin-transform-react-jsx-source": "6.9.0", | ||
"babel-plugin-transform-react-remove-prop-types": "0.2.10", | ||
"babel-preset-kyt-core": "0.3.0", | ||
"babel-preset-react": "6.16.0" | ||
"@babel/plugin-transform-react-constant-elements": "7.2.0", | ||
"@babel/plugin-transform-react-inline-elements": "7.2.0", | ||
"@babel/preset-react": "7.0.0", | ||
"babel-plugin-add-react-displayname": "0.0.5", | ||
"babel-plugin-transform-react-remove-prop-types": "0.4.21", | ||
"babel-preset-kyt-core": "1.0.0-alpha.8a69a26a" | ||
}, | ||
@@ -20,0 +20,0 @@ "keywords": [ |
@@ -10,4 +10,6 @@ ## babel-preset-kyt-react | ||
To use in your project: | ||
1. `npm install babel-preset-kyt-react --save` | ||
2. In your .babelrc: | ||
``` | ||
@@ -23,3 +25,3 @@ { | ||
*(see [documentation](https://babeljs.io/docs/plugins/#plugin-preset-options) for Babel preset options)* | ||
_(see [documentation](https://babeljs.io/docs/plugins/#plugin-preset-options) for Babel preset options)_ | ||
@@ -26,0 +28,0 @@ - `envOptions` (`Object`)- pass down babel-preset-env options to babel-preset-kyt-core. See more in the `envOptions` [kyt-core documentation](/packages/babel-preset-kyt-core/README.md#options). |
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
4000
6958
46
39
+ Added@babel/plugin-transform-react-constant-elements@7.2.0
+ Added@babel/preset-react@7.0.0
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.3(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.3(transitive)
+ Added@babel/helper-annotate-as-pure@7.25.9(transitive)
+ Added@babel/helper-builder-react-jsx@7.25.9(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-create-regexp-features-plugin@7.26.3(transitive)
+ Added@babel/helper-environment-visitor@7.24.7(transitive)
+ Added@babel/helper-member-expression-to-functions@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-optimise-call-expression@7.25.9(transitive)
+ Added@babel/helper-plugin-utils@7.25.9(transitive)
+ Added@babel/helper-remap-async-to-generator@7.25.9(transitive)
+ Added@babel/helper-replace-supers@7.25.9(transitive)
+ Added@babel/helper-skip-transparent-expression-wrappers@7.25.9(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helper-wrap-function@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.3(transitive)
+ Added@babel/plugin-proposal-async-generator-functions@7.20.7(transitive)
+ Added@babel/plugin-proposal-json-strings@7.18.6(transitive)
+ Added@babel/plugin-proposal-object-rest-spread@7.20.7(transitive)
+ Added@babel/plugin-proposal-optional-catch-binding@7.18.6(transitive)
+ Added@babel/plugin-proposal-unicode-property-regex@7.18.6(transitive)
+ Added@babel/plugin-syntax-async-generators@7.8.4(transitive)
+ Added@babel/plugin-syntax-dynamic-import@7.2.0(transitive)
+ Added@babel/plugin-syntax-json-strings@7.8.3(transitive)
+ Added@babel/plugin-syntax-jsx@7.25.9(transitive)
+ Added@babel/plugin-syntax-object-rest-spread@7.8.3(transitive)
+ Added@babel/plugin-syntax-optional-catch-binding@7.8.3(transitive)
+ Added@babel/plugin-transform-arrow-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-async-to-generator@7.25.9(transitive)
+ Added@babel/plugin-transform-block-scoped-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-block-scoping@7.25.9(transitive)
+ Added@babel/plugin-transform-classes@7.25.9(transitive)
+ Added@babel/plugin-transform-computed-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-destructuring@7.25.9(transitive)
+ Added@babel/plugin-transform-dotall-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-duplicate-keys@7.25.9(transitive)
+ Added@babel/plugin-transform-exponentiation-operator@7.26.3(transitive)
+ Added@babel/plugin-transform-for-of@7.25.9(transitive)
+ Added@babel/plugin-transform-function-name@7.25.9(transitive)
+ Added@babel/plugin-transform-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-amd@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-commonjs@7.26.3(transitive)
+ Added@babel/plugin-transform-modules-systemjs@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-umd@7.25.9(transitive)
+ Added@babel/plugin-transform-new-target@7.25.9(transitive)
+ Added@babel/plugin-transform-object-super@7.25.9(transitive)
+ Added@babel/plugin-transform-parameters@7.25.9(transitive)
+ Added@babel/plugin-transform-react-constant-elements@7.2.0(transitive)
+ Added@babel/plugin-transform-react-display-name@7.25.9(transitive)
+ Added@babel/plugin-transform-react-inline-elements@7.2.0(transitive)
+ Added@babel/plugin-transform-react-jsx@7.25.9(transitive)
+ Added@babel/plugin-transform-react-jsx-self@7.25.9(transitive)
+ Added@babel/plugin-transform-react-jsx-source@7.25.9(transitive)
+ Added@babel/plugin-transform-regenerator@7.25.9(transitive)
+ Added@babel/plugin-transform-runtime@7.2.0(transitive)
+ Added@babel/plugin-transform-shorthand-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-spread@7.25.9(transitive)
+ Added@babel/plugin-transform-sticky-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-template-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-typeof-symbol@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-regex@7.25.9(transitive)
+ Added@babel/preset-env@7.2.3(transitive)
+ Added@babel/preset-react@7.0.0(transitive)
+ Added@babel/runtime@7.26.0(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.4(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedbabel-plugin-add-react-displayname@0.0.5(transitive)
+ Addedbabel-plugin-dynamic-import-node@2.2.0(transitive)
+ Addedbabel-plugin-transform-react-remove-prop-types@0.4.21(transitive)
+ Addedbabel-preset-kyt-core@1.0.0-alpha.8a69a26a(transitive)
+ Addedbrowserslist@4.24.3(transitive)
+ Addedcall-bind@1.0.8(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcaniuse-lite@1.0.30001689(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedelectron-to-chromium@1.5.74(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedget-intrinsic@1.2.6(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.16.0(transitive)
+ Addedjs-levenshtein@1.1.6(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjsesc@3.0.23.1.0(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedlodash.merge@4.6.1(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedmath-intrinsics@1.0.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-releases@2.0.19(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedregenerate-unicode-properties@10.2.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedregenerator-transform@0.15.2(transitive)
+ Addedregexpu-core@6.2.0(transitive)
+ Addedregjsgen@0.8.0(transitive)
+ Addedregjsparser@0.12.0(transitive)
+ Addedresolve@1.22.9(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedunicode-canonical-property-names-ecmascript@2.0.1(transitive)
+ Addedunicode-match-property-ecmascript@2.0.0(transitive)
+ Addedunicode-match-property-value-ecmascript@2.2.0(transitive)
+ Addedunicode-property-aliases-ecmascript@2.1.0(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedbabel-plugin-transform-react-constant-elements@6.9.1
- Removedbabel-preset-react@6.16.0
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedbabel-code-frame@6.26.0(transitive)
- Removedbabel-helper-builder-binary-assignment-operator-visitor@6.24.1(transitive)
- Removedbabel-helper-builder-react-jsx@6.26.0(transitive)
- Removedbabel-helper-call-delegate@6.24.1(transitive)
- Removedbabel-helper-define-map@6.26.0(transitive)
- Removedbabel-helper-explode-assignable-expression@6.24.1(transitive)
- Removedbabel-helper-function-name@6.24.1(transitive)
- Removedbabel-helper-get-function-arity@6.24.1(transitive)
- Removedbabel-helper-hoist-variables@6.24.1(transitive)
- Removedbabel-helper-optimise-call-expression@6.24.1(transitive)
- Removedbabel-helper-regex@6.26.0(transitive)
- Removedbabel-helper-remap-async-to-generator@6.24.1(transitive)
- Removedbabel-helper-replace-supers@6.24.1(transitive)
- Removedbabel-messages@6.23.0(transitive)
- Removedbabel-plugin-check-es2015-constants@6.22.0(transitive)
- Removedbabel-plugin-syntax-async-functions@6.13.0(transitive)
- Removedbabel-plugin-syntax-dynamic-import@6.18.0(transitive)
- Removedbabel-plugin-syntax-exponentiation-operator@6.13.0(transitive)
- Removedbabel-plugin-syntax-flow@6.18.0(transitive)
- Removedbabel-plugin-syntax-jsx@6.18.0(transitive)
- Removedbabel-plugin-syntax-trailing-function-commas@6.22.0(transitive)
- Removedbabel-plugin-transform-async-to-generator@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-arrow-functions@6.22.0(transitive)
- Removedbabel-plugin-transform-es2015-block-scoped-functions@6.22.0(transitive)
- Removedbabel-plugin-transform-es2015-block-scoping@6.26.0(transitive)
- Removedbabel-plugin-transform-es2015-classes@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-computed-properties@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-destructuring@6.23.0(transitive)
- Removedbabel-plugin-transform-es2015-duplicate-keys@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-for-of@6.23.0(transitive)
- Removedbabel-plugin-transform-es2015-function-name@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-literals@6.22.0(transitive)
- Removedbabel-plugin-transform-es2015-modules-amd@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-modules-commonjs@6.26.0(transitive)
- Removedbabel-plugin-transform-es2015-modules-systemjs@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-modules-umd@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-object-super@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-parameters@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-shorthand-properties@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-spread@6.22.0(transitive)
- Removedbabel-plugin-transform-es2015-sticky-regex@6.24.1(transitive)
- Removedbabel-plugin-transform-es2015-template-literals@6.22.0(transitive)
- Removedbabel-plugin-transform-es2015-typeof-symbol@6.23.0(transitive)
- Removedbabel-plugin-transform-es2015-unicode-regex@6.24.1(transitive)
- Removedbabel-plugin-transform-exponentiation-operator@6.24.1(transitive)
- Removedbabel-plugin-transform-flow-strip-types@6.22.0(transitive)
- Removedbabel-plugin-transform-react-constant-elements@6.9.1(transitive)
- Removedbabel-plugin-transform-react-display-name@6.25.0(transitive)
- Removedbabel-plugin-transform-react-inline-elements@6.8.0(transitive)
- Removedbabel-plugin-transform-react-jsx@6.24.1(transitive)
- Removedbabel-plugin-transform-react-jsx-self@6.22.0(transitive)
- Removedbabel-plugin-transform-react-jsx-source@6.9.0(transitive)
- Removedbabel-plugin-transform-react-remove-prop-types@0.2.10(transitive)
- Removedbabel-plugin-transform-regenerator@6.26.0(transitive)
- Removedbabel-plugin-transform-runtime@6.23.0(transitive)
- Removedbabel-plugin-transform-strict-mode@6.24.1(transitive)
- Removedbabel-preset-env@1.6.0(transitive)
- Removedbabel-preset-kyt-core@0.3.0(transitive)
- Removedbabel-preset-react@6.16.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbabel-template@6.26.0(transitive)
- Removedbabel-traverse@6.26.0(transitive)
- Removedbabel-types@6.26.0(transitive)
- Removedbabylon@6.18.0(transitive)
- Removedbrowserslist@2.11.3(transitive)
- Removedcaniuse-lite@1.0.30001688(transitive)
- Removedchalk@1.1.3(transitive)
- Removedcore-js@2.6.12(transitive)
- Removeddebug@2.6.9(transitive)
- Removedelectron-to-chromium@1.5.73(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesutils@2.0.3(transitive)
- Removedglobals@9.18.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedjs-tokens@3.0.2(transitive)
- Removedjsesc@0.5.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedms@2.0.0(transitive)
- Removedprivate@0.1.8(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedregenerator-transform@0.10.1(transitive)
- Removedregexpu-core@2.0.0(transitive)
- Removedregjsgen@0.2.0(transitive)
- Removedregjsparser@0.1.5(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedto-fast-properties@1.0.3(transitive)
Updatedbabel-plugin-transform-react-remove-prop-types@0.4.21