Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsx-dom-runtime

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-dom-runtime - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

dist/index.cjs.js

24

babel-preset/index.js

@@ -1,26 +0,20 @@

const { realpathSync } = require('fs');
const { resolve } = require('path');
const { declare } = require('@babel/helper-plugin-utils');
const transformReactJSX = require('@babel/plugin-transform-react-jsx');
const createPlugin = require('@babel/plugin-transform-react-jsx/lib/create-plugin').default;
module.exports = declare((api, opts) => {
module.exports = declare((api, { useBuiltIns, useSpread }) => {
api.assertVersion(7);
const devDir = realpathSync(resolve(__dirname, '..', 'dev'));
const isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
const isDev = process.env.NODE_ENV === 'development';
const {
throwIfNamespace = true,
useBuiltIns,
useSpread,
} = opts;
return {
plugins: [
[
transformReactJSX,
createPlugin({
name: 'jsx-dom-runtime',
development: isDev,
}),
{
runtime: 'automatic',
importSource: isDev ? devDir : 'jsx-dom-runtime',
throwIfNamespace,
importSource: 'jsx-dom-runtime',
throwIfNamespace: true,
useBuiltIns,

@@ -27,0 +21,0 @@ useSpread,

{
"name": "jsx-dom-runtime",
"version": "0.5.0",
"version": "0.6.0",
"description": "JSX syntax for DOM Element",
"main": "jsx-runtime/jsxRuntime.cjs.js",
"module": "jsx-runtime/jsxRuntime.module.js",
"main": "dist/index.cjs.js",
"module": "dist/index.module.js",
"esmodule": "dist/index.js",
"source": "dist/index.js",
"sideEffects": false,
"scripts": {
"lint": "eslint src/** tests/**",
"lint": "eslint 'src/**/*.{js,ts}' 'tests/**/*.{js,ts,tsx}'",
"test": "jest",

@@ -23,4 +25,6 @@ "build": "rollup -c",

"@babel/preset-env": "^7.13.9",
"@babel/preset-typescript": "^7.13.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-replace": "^2.4.1",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.2.0",
"@size-limit/preset-small-lib": "^4.10.1",

@@ -33,7 +37,6 @@ "@testing-library/dom": "^7.29.6",

"babel-jest": "^26.6.3",
"eslint": "^7.21.0",
"eslint": "^7.22.0",
"fs-extra": "^9.1.0",
"husky": "^4.3.8",
"jest": "^26.6.3",
"rollup": "^2.41.1",
"rollup": "^2.41.2",
"rollup-plugin-terser": "^7.0.2",

@@ -45,3 +48,4 @@ "size-limit": "^4.10.1",

"src",
"dev",
"dist",
"jsx-dev-runtime",
"jsx-runtime",

@@ -57,7 +61,2 @@ "babel-preset",

],
"husky": {
"hooks": {
"pre-commit": "npm test"
}
},
"size-limit": [

@@ -64,0 +63,0 @@ {

@@ -30,4 +30,6 @@ # jsx-dom-runtime

```js
import { createRef } from 'jsx-dom-runtime';
const App = () => {
const List = { current: null };
const List = createRef();

@@ -34,0 +36,0 @@ const addItem = () => {

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