@rollup/plugin-swc
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -10,4 +10,5 @@ 'use strict'; | ||
function swc(input = {}) { | ||
var _a; | ||
const filter = pluginutils.createFilter(input.include, input.exclude); | ||
const swcOptions = smob.merge({}, input.swc || {}, { | ||
const defaults = { | ||
jsc: { | ||
@@ -25,3 +26,7 @@ target: 'es2020', | ||
} | ||
}); | ||
}; | ||
if (input.swc && input.swc.env) { | ||
(_a = defaults.jsc) === null || _a === void 0 ? true : delete _a.target; | ||
} | ||
const swcOptions = smob.merge({}, input.swc || {}, defaults); | ||
return { | ||
@@ -28,0 +33,0 @@ name: 'swc', |
@@ -6,4 +6,5 @@ import { createFilter } from '@rollup/pluginutils'; | ||
function swc(input = {}) { | ||
var _a; | ||
const filter = createFilter(input.include, input.exclude); | ||
const swcOptions = merge({}, input.swc || {}, { | ||
const defaults = { | ||
jsc: { | ||
@@ -21,3 +22,7 @@ target: 'es2020', | ||
} | ||
}); | ||
}; | ||
if (input.swc && input.swc.env) { | ||
(_a = defaults.jsc) === null || _a === void 0 ? true : delete _a.target; | ||
} | ||
const swcOptions = merge({}, input.swc || {}, defaults); | ||
return { | ||
@@ -24,0 +29,0 @@ name: 'swc', |
{ | ||
"name": "@rollup/plugin-swc", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"publishConfig": { | ||
@@ -26,16 +26,2 @@ "access": "public" | ||
}, | ||
"scripts": { | ||
"build": "rollup -c", | ||
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov", | ||
"ci:lint": "pnpm build && pnpm lint", | ||
"ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", | ||
"ci:test": "pnpm test -- --verbose && pnpm test:ts", | ||
"prebuild": "del-cli dist", | ||
"prepare": "if [ ! -d 'dist' ]; then pnpm build; fi", | ||
"prerelease": "pnpm build", | ||
"pretest": "pnpm build", | ||
"release": "pnpm --workspace-root plugin:release --pkg $npm_package_name", | ||
"test": "ava", | ||
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit" | ||
}, | ||
"files": [ | ||
@@ -74,3 +60,16 @@ "dist", | ||
}, | ||
"types": "./types/index.d.ts" | ||
} | ||
"types": "./types/index.d.ts", | ||
"scripts": { | ||
"build": "rollup -c", | ||
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov", | ||
"ci:lint": "pnpm build && pnpm lint", | ||
"ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", | ||
"ci:test": "pnpm test -- --verbose && pnpm test:ts", | ||
"prebuild": "del-cli dist", | ||
"prerelease": "pnpm build", | ||
"pretest": "pnpm build", | ||
"release": "pnpm --workspace-root package:release $(pwd)", | ||
"test": "ava", | ||
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit" | ||
} | ||
} |
@@ -12,3 +12,3 @@ import type { Plugin } from 'rollup'; | ||
const swcOptions: SWCOptions = merge({}, input.swc || {}, { | ||
const defaults: SWCOptions = { | ||
jsc: { | ||
@@ -26,4 +26,10 @@ target: 'es2020', | ||
} | ||
}); | ||
}; | ||
if (input.swc && input.swc.env) { | ||
delete defaults.jsc?.target; | ||
} | ||
const swcOptions: SWCOptions = merge({}, input.swc || {}, defaults); | ||
return { | ||
@@ -30,0 +36,0 @@ name: 'swc', |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9677
10
137
0