New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@atlaspack/transformer-js

Package Overview
Dependencies
Maintainers
0
Versions
311
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaspack/transformer-js - npm Package Compare versions

Comparing version

to
2.12.1-canary.3434

19

lib/JSTransformer.js

@@ -64,2 +64,9 @@ "use strict";

var _package = _interopRequireDefault(require("../package.json"));
function _featureFlags() {
const data = require("@atlaspack/feature-flags");
_featureFlags = function () {
return data;
};
return data;
}
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }

@@ -328,3 +335,4 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }

has_node_replacements,
is_constant_module
is_constant_module,
conditions
} = await (_rust().transformAsync || _rust().transform)({

@@ -468,2 +476,9 @@ filename: asset.filePath,

});
if ((0, _featureFlags().getFeatureFlag)('conditionalBundlingApi')) {
asset.meta.conditions = conditions.map(c => ({
key: c.key,
ifTruePlaceholder: c.if_true_placeholder,
ifFalsePlaceholder: c.if_false_placeholder
}));
}
if (is_constant_module) {

@@ -685,3 +700,3 @@ asset.meta.isConstantModule = true;

loc: convertLoc(dep.loc),
priority: dep.kind === 'DynamicImport' ? 'lazy' : 'sync',
priority: dep.kind === 'DynamicImport' ? 'lazy' : dep.kind === 'ConditionalImport' ? 'conditional' : 'sync',
isOptional: dep.is_optional,

@@ -688,0 +703,0 @@ meta,

19

package.json
{
"name": "@atlaspack/transformer-js",
"version": "2.12.1-canary.3432+415929ab6",
"version": "2.12.1-canary.3434+c61bf3cde",
"license": "(MIT OR Apache-2.0)",

@@ -18,3 +18,3 @@ "publishConfig": {

"engines": {
"parcel": "2.12.1-canary.3432+415929ab6",
"parcel": "2.12.1-canary.3434+c61bf3cde",
"node": ">= 16.0.0"

@@ -27,7 +27,8 @@ },

"dependencies": {
"@atlaspack/diagnostic": "2.12.1-canary.3432+415929ab6",
"@atlaspack/plugin": "2.12.1-canary.3432+415929ab6",
"@atlaspack/rust": "2.12.1-canary.3432+415929ab6",
"@atlaspack/utils": "2.12.1-canary.3432+415929ab6",
"@atlaspack/workers": "2.12.1-canary.3432+415929ab6",
"@atlaspack/diagnostic": "2.12.1-canary.3434+c61bf3cde",
"@atlaspack/feature-flags": "2.12.1-canary.3434+c61bf3cde",
"@atlaspack/plugin": "2.12.1-canary.3434+c61bf3cde",
"@atlaspack/rust": "2.12.1-canary.3434+c61bf3cde",
"@atlaspack/utils": "2.12.1-canary.3434+c61bf3cde",
"@atlaspack/workers": "2.12.1-canary.3434+c61bf3cde",
"@parcel/source-map": "^2.1.1",

@@ -41,5 +42,5 @@ "@swc/helpers": "^0.5.0",

"peerDependencies": {
"@atlaspack/core": "2.12.1-canary.3432+415929ab6"
"@atlaspack/core": "2.12.1-canary.3434+c61bf3cde"
},
"gitHead": "415929ab63f5314913c27d3dfdb965f2e76bedf2"
"gitHead": "c61bf3cde53d1cdb5ae13541c644a6e3ef5521e1"
}

@@ -8,2 +8,3 @@ // @flow

FileCreateInvalidation,
ConditionMeta,
} from '@atlaspack/types';

@@ -24,2 +25,3 @@ import type {SchemaEntity} from '@atlaspack/utils';

import pkg from '../package.json';
import {getFeatureFlag} from '@atlaspack/feature-flags';

@@ -424,2 +426,3 @@ const JSX_EXTENSIONS = {

is_constant_module,
conditions,
} = await (transformAsync || transform)({

@@ -583,2 +586,10 @@ filename: asset.filePath,

if (getFeatureFlag('conditionalBundlingApi')) {
asset.meta.conditions = conditions.map((c): ConditionMeta => ({
key: c.key,
ifTruePlaceholder: c.if_true_placeholder,
ifFalsePlaceholder: c.if_false_placeholder,
}));
}
if (is_constant_module) {

@@ -858,3 +869,8 @@ asset.meta.isConstantModule = true;

loc: convertLoc(dep.loc),
priority: dep.kind === 'DynamicImport' ? 'lazy' : 'sync',
priority:
dep.kind === 'DynamicImport'
? 'lazy'
: dep.kind === 'ConditionalImport'
? 'conditional'
: 'sync',
isOptional: dep.is_optional,

@@ -861,0 +877,0 @@ meta,