repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/typescript-types/src/TSModuleGraph.js | packages/transformers/typescript-types/src/TSModuleGraph.js | // @flow
import type {TSModule, Export} from './TSModule';
import nullthrows from 'nullthrows';
import invariant from 'assert';
import ts from 'typescript';
export class TSModuleGraph {
modules: Map<string, TSModule>;
mainModuleName: string;
mainModule: ?TSModule;
syntheticImportCount: number;
constructor(... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/typescript-types/src/wrappers.js | packages/transformers/typescript-types/src/wrappers.js | // @flow
/* eslint-disable no-unused-vars */
import type {
ExportDeclaration,
Expression,
Identifier,
ImportClause,
ImportDeclaration,
ImportSpecifier,
Modifier,
NamedImportBindings,
} from 'typescript';
import ts from 'typescript';
import invariant from 'assert';
type AssertClause = any;
type NamedEx... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/typescript-types/src/utils.js | packages/transformers/typescript-types/src/utils.js | // @flow
import ts from 'typescript';
export function getExportedName(node: any): ?string {
if (!node.modifiers) {
return null;
}
if (!node.modifiers.some(m => m.kind === ts.SyntaxKind.ExportKeyword)) {
return null;
}
if (node.modifiers.some(m => m.kind === ts.SyntaxKind.DefaultKeyword)) {
retu... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/svg-jsx/src/SvgJsxTransformer.js | packages/transformers/svg-jsx/src/SvgJsxTransformer.js | // @flow
import {Transformer} from '@parcel/plugin';
import path from 'path';
import {convertSVGOConfig, relativePath} from '@parcel/utils';
import ThrowableDiagnostic, {
md,
generateJSONCodeHighlights,
} from '@parcel/diagnostic';
import {svgReact, hashString} from '@parcel/rust';
export default (new Transforme... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/svg/src/SVGTransformer.js | packages/transformers/svg/src/SVGTransformer.js | // @flow
import {Transformer} from '@parcel/plugin';
import ThrowableDiagnostic from '@parcel/diagnostic';
import {
transformSvg,
envToRust,
dependencyFromRust,
assetFromRust,
} from '@parcel/rust';
export default (new Transformer({
async transform({asset}) {
asset.bundleBehavior = 'isolated';
let ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/jsonld/src/JSONLDTransformer.js | packages/transformers/jsonld/src/JSONLDTransformer.js | // @flow
import {Transformer} from '@parcel/plugin';
import json5 from 'json5';
// A list of all attributes in a schema that may produce a dependency
// Based on https://schema.org/ImageObject
// Section "Instances of ImageObject may appear as values for the following properties"
const SCHEMA_ATTRS = [
'logo',
'p... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/types.js | packages/transformers/babel/src/types.js | // @flow
export type BabelConfig = {|
plugins?: Array<any>,
presets?: Array<any>,
|};
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/BabelTransformer.js | packages/transformers/babel/src/BabelTransformer.js | // @flow strict-local
import {babelErrorEnhancer} from './babelErrorUtils';
import {Transformer} from '@parcel/plugin';
import {relativeUrl} from '@parcel/utils';
import SourceMap from '@parcel/source-map';
import semver from 'semver';
import babel7 from './babel7';
import {load} from './config';
export default (new ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/remapAstLocations.js | packages/transformers/babel/src/remapAstLocations.js | // @flow strict-local
import type {File as BabelNodeFile} from '@babel/types';
import type SourceMap from '@parcel/source-map';
import type {Node} from '@babel/types';
import typeof * as BabelTypes from '@babel/types';
export function remapAstLocations(
t: BabelTypes,
ast: BabelNodeFile,
map: SourceMap,
) {
/... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/babelErrorUtils.js | packages/transformers/babel/src/babelErrorUtils.js | // @flow
import type {BaseAsset} from '@parcel/types';
export type BabelError = Error & {
loc?: {
line: number,
column: number,
...
},
source?: string,
filePath?: string,
...
};
export async function babelErrorEnhancer(
error: BabelError,
asset: BaseAsset,
): Promise<BabelError> {
if (erro... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/constants.js | packages/transformers/babel/src/constants.js | // @flow strict-local
export const BABEL_CORE_RANGE = '^7.12.0';
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/jsx.js | packages/transformers/babel/src/jsx.js | // @flow strict-local
import type {Config, PluginOptions} from '@parcel/types';
import path from 'path';
const JSX_EXTENSIONS = new Set(['.jsx', '.tsx']);
const JSX_LIBRARIES = ['react', 'preact', 'nervejs', 'hyperapp'];
/**
* Returns whether an asset is likely JSX. Attempts to detect react or react-like libraries... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/babel7.js | packages/transformers/babel/src/babel7.js | // @flow
import type {
MutableAsset,
AST,
PluginOptions,
PluginTracer,
PluginLogger,
} from '@parcel/types';
import typeof * as BabelCore from '@babel/core';
import invariant from 'assert';
import path from 'path';
import {md} from '@parcel/diagnostic';
import {relativeUrl} from '@parcel/utils';
import {rem... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/config.js | packages/transformers/babel/src/config.js | // @flow
import type {Config, PluginOptions, PluginLogger} from '@parcel/types';
import typeof * as BabelCore from '@babel/core';
import type {Diagnostic} from '@parcel/diagnostic';
import type {BabelConfig} from './types';
import json5 from 'json5';
import path from 'path';
import {hashObject, relativePath, resolveC... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/flow.js | packages/transformers/babel/src/flow.js | // @flow
import type {Config, PluginOptions, PackageJSON} from '@parcel/types';
import type {BabelConfig} from './types';
import typeof * as BabelCore from '@babel/core';
import {BABEL_CORE_RANGE} from './constants';
import path from 'path';
/**
* Generates a babel config for stripping away Flow types.
*/
export d... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/transformers/babel/src/utils.js | packages/transformers/babel/src/utils.js | // @flow
import type {Environment} from '@parcel/types';
import type {Targets as BabelTargets} from '@babel/preset-env';
import invariant from 'assert';
import semver from 'semver';
// Copied from @babel/helper-compilation-targets/lib/options.js
const TargetNames = {
node: 'node',
chrome: 'chrome',
opera: 'ope... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/bundlers/default/src/DefaultBundler.js | packages/bundlers/default/src/DefaultBundler.js | // @flow strict-local
import type {
Asset,
Bundle as LegacyBundle,
BundleBehavior,
BundleGroup,
Dependency,
Environment,
Config,
MutableBundleGraph,
PluginOptions,
Target,
BuildMode,
PluginLogger,
} from '@parcel/types';
import type {NodeId} from '@parcel/graph';
import type {SchemaEntity} from ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | true |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/bundlers/library/src/LibraryBundler.js | packages/bundlers/library/src/LibraryBundler.js | // @flow strict-local
import {Bundler} from '@parcel/plugin';
import nullthrows from 'nullthrows';
// This bundler plugin is designed specifically for library builds. It outputs a bundle for
// each input asset, which ensures that the library can be effectively tree shaken and code
// split by an application bundler.
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/bundle-analyzer/index.js | packages/reporters/bundle-analyzer/index.js | // @flow strict-local
export * from './src/BundleAnalyzerReporter';
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/bundle-analyzer/src/BundleAnalyzerReporter.js | packages/reporters/bundle-analyzer/src/BundleAnalyzerReporter.js | // @flow strict-local
import type {FilePath, PackagedBundle, PluginOptions} from '@parcel/types';
import invariant from 'assert';
import {Reporter} from '@parcel/plugin';
import {DefaultMap, generateBuildMetrics} from '@parcel/utils';
import path from 'path';
import nullthrows from 'nullthrows';
export default (new ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/bundle-analyzer/client/index.js | packages/reporters/bundle-analyzer/client/index.js | /* eslint-env browser */
/* global CarrotSearchFoamTree */
let bundleData = JSON.parse(document.getElementById('bundle-data').innerText);
let visualization = document.createElement('div');
visualization.style.height = '100vh';
visualization.style.width = '100vw';
document.body.appendChild(visualization);
let tooltip... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/bundle-analyzer/client/vendor/foamtree/carrotsearch.foamtree.js | packages/reporters/bundle-analyzer/client/vendor/foamtree/carrotsearch.foamtree.js | /**
* Carrot Search FoamTree HTML5 (demo variant)
* v3.4.9, bugfix/3.4.x/b84d33dd, build FOAMTREE-SOFTWARE4-DIST-70, Sep 10, 2019
*
* Carrot Search confidential.
* Copyright 2002-2019, Carrot Search s.c, All Rights Reserved.
*/
(function() {var v=function(){var a=window.navigator.userAgent,m;try{window.localStor... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | true |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/sourcemap-visualiser/src/SourceMapVisualiser.js | packages/reporters/sourcemap-visualiser/src/SourceMapVisualiser.js | // @flow
import path from 'path';
import nullthrows from 'nullthrows';
import {Reporter} from '@parcel/plugin';
import {relativePath} from '@parcel/utils';
export default (new Reporter({
async report({event, options, logger}) {
if (event.type === 'buildSuccess') {
let bundles = [];
for (let bundle of... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/tracer/src/TracerReporter.js | packages/reporters/tracer/src/TracerReporter.js | // @flow
import invariant from 'assert';
import nullthrows from 'nullthrows';
import path from 'path';
import {Reporter} from '@parcel/plugin';
import {Tracer} from 'chrome-trace-event';
// We need to maintain some state here to ensure we write to the same output, there should only be one
// instance of this reporter ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/json/src/JSONReporter.js | packages/reporters/json/src/JSONReporter.js | // @flow strict-local
import type {BuildProgressEvent, LogEvent} from '@parcel/types';
import type {BuildMetrics} from '@parcel/utils';
import {Reporter} from '@parcel/plugin';
import {generateBuildMetrics} from '@parcel/utils';
/* eslint-disable no-console */
const writeToStdout = makeWriter(console.log);
const writ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/bundle-buddy/src/BundleBuddyReporter.js | packages/reporters/bundle-buddy/src/BundleBuddyReporter.js | // @flow strict-local
import type {PackagedBundle} from '@parcel/types';
import {Reporter} from '@parcel/plugin';
import path from 'path';
export default (new Reporter({
async report({event, options, logger}) {
if (event.type !== 'buildSuccess') {
return;
}
let bundlesByTarget: Map<string, Array<P... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/lsp-reporter/src/LspReporter.js | packages/reporters/lsp-reporter/src/LspReporter.js | // @flow strict-local
import type {Diagnostic as ParcelDiagnostic} from '@parcel/diagnostic';
import type {BundleGraph, FilePath, PackagedBundle} from '@parcel/types';
import type {Program, Query} from 'ps-node';
import type {Diagnostic, DocumentUri} from 'vscode-languageserver';
import type {MessageConnection} from '... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/lsp-reporter/src/ipc.js | packages/reporters/lsp-reporter/src/ipc.js | // @flow
import * as net from 'net';
import type {
MessageReader,
MessageWriter,
MessageConnection,
} from 'vscode-jsonrpc/node';
import {
createMessageConnection,
SocketMessageReader,
SocketMessageWriter,
} from 'vscode-jsonrpc/node';
function createClientPipeTransport(
pipeName: string,
onConnected: ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/lsp-reporter/src/utils.js | packages/reporters/lsp-reporter/src/utils.js | // @flow
import type {DiagnosticLogEvent, FilePath} from '@parcel/types';
import type {ODiagnosticSeverity} from 'vscode-languageserver';
import path from 'path';
export type ParcelSeverity = DiagnosticLogEvent['level'];
export function parcelSeverityToLspSeverity(
parcelSeverity: ParcelSeverity,
): ODiagnosticSev... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/dev-server-sw/src/HMRServer.js | packages/reporters/dev-server-sw/src/HMRServer.js | // @flow
import type {
BuildSuccessEvent,
Dependency,
PluginOptions,
BundleGraph,
PackagedBundle,
Asset,
} from '@parcel/types';
import type {Diagnostic} from '@parcel/diagnostic';
import type {AnsiDiagnosticResult} from '@parcel/utils';
import invariant from 'assert';
import {ansiHtml, prettyDiagnostic, ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/dev-server-sw/src/ServerReporter.js | packages/reporters/dev-server-sw/src/ServerReporter.js | // @flow
import {Reporter} from '@parcel/plugin';
import HMRServer, {getHotAssetContents} from './HMRServer';
let hmrServer;
let hmrAssetSourceCleanup: (() => void) | void;
export default (new Reporter({
async report({event, options}) {
let {hmrOptions} = options;
switch (event.type) {
case 'watchStar... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/src/emoji.js | packages/reporters/cli/src/emoji.js | // @flow strict-local
// From https://github.com/sindresorhus/is-unicode-supported/blob/8f123916d5c25a87c4f966dcc248b7ca5df2b4ca/index.js
// This package is ESM-only so it has to be vendored
function isUnicodeSupported() {
if (process.platform !== 'win32') {
return process.env.TERM !== 'linux'; // Linux console ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/src/CLIReporter.js | packages/reporters/cli/src/CLIReporter.js | // @flow
import type {ReporterEvent, PluginOptions} from '@parcel/types';
import type {Diagnostic} from '@parcel/diagnostic';
import type {Color} from 'chalk';
import {Reporter} from '@parcel/plugin';
import {
getProgressMessage,
prettifyTime,
prettyDiagnostic,
throttle,
} from '@parcel/utils';
import chalk fr... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/src/render.js | packages/reporters/cli/src/render.js | // @flow
import type {Writable} from 'stream';
import readline from 'readline';
import ora from 'ora';
import stringWidth from 'string-width';
import type {PadAlign} from './utils';
import {pad, countLines} from './utils';
import * as emoji from './emoji';
type ColumnType = {|
align: PadAlign,
|};
export const is... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/src/logLevels.js | packages/reporters/cli/src/logLevels.js | // @flow strict-local
const logLevels = {
none: 0,
error: 1,
warn: 2,
info: 3,
progress: 3,
success: 3,
verbose: 4,
};
export default logLevels;
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/src/phaseReport.js | packages/reporters/cli/src/phaseReport.js | // @flow
import {prettifyTime} from '@parcel/utils';
import chalk from 'chalk';
import {writeOut} from './render';
import invariant from 'assert';
export default function phaseReport(phaseStartTimes: {[string]: number}) {
let phaseTimes = {};
if (phaseStartTimes['transforming'] && phaseStartTimes['bundling']) {
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/src/bundleReport.js | packages/reporters/cli/src/bundleReport.js | // @flow
import type {BundleGraph, FilePath, PackagedBundle} from '@parcel/types';
import type {FileSystem} from '@parcel/fs';
import {generateBuildMetrics, prettifyTime} from '@parcel/utils';
import {filesize} from 'filesize';
import chalk from 'chalk';
import nullthrows from 'nullthrows';
import * as emoji from './... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/src/utils.js | packages/reporters/cli/src/utils.js | // @flow
import path from 'path';
import chalk from 'chalk';
import stringWidth from 'string-width';
import termSize from 'term-size';
import {stripAnsi} from '@parcel/utils';
export type PadAlign = 'left' | 'right';
let terminalSize = termSize();
process.stdout.on('resize', function () {
terminalSize = termSize();
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/cli/test/CLIReporter.test.js | packages/reporters/cli/test/CLIReporter.test.js | // @flow strict-local
import assert from 'assert';
import sinon from 'sinon';
import {PassThrough} from 'stream';
import {_report} from '../src/CLIReporter';
import * as render from '../src/render';
import {_setStdio} from '../src/render';
import {inputFS, outputFS} from '@parcel/test-utils';
import {NodePackageManage... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/bundle-stats/src/BundleStatsReporter.js | packages/reporters/bundle-stats/src/BundleStatsReporter.js | // @flow strict-local
import type {PackagedBundle, PluginOptions} from '@parcel/types';
import {Reporter} from '@parcel/plugin';
import {DefaultMap} from '@parcel/utils';
import assert from 'assert';
import path from 'path';
export type AssetStat = {|
size: number,
name: string,
bundles: Array<string>,
|};
e... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/dev-server/src/Server.js | packages/reporters/dev-server/src/Server.js | // @flow
import type {DevServerOptions, Request, Response} from './types.js.flow';
import type {
BuildSuccessEvent,
BundleGraph,
FilePath,
PluginOptions,
PackagedBundle,
} from '@parcel/types';
import type {Diagnostic} from '@parcel/diagnostic';
import type {FileSystem} from '@parcel/fs';
import type {HTTPSe... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/dev-server/src/HMRServer.js | packages/reporters/dev-server/src/HMRServer.js | // @flow
import type {
Asset,
Dependency,
PluginOptions,
BuildSuccessEvent,
BundledProgressEvent,
} from '@parcel/types';
import type {Diagnostic} from '@parcel/diagnostic';
import type {AnsiDiagnosticResult} from '@parcel/utils';
import type {
ServerError,
HMRServerOptions,
Request,
Response,
} from ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/dev-server/src/serverErrors.js | packages/reporters/dev-server/src/serverErrors.js | // @flow
export type ServerError = Error & {|
code: string,
|};
const serverErrorList = {
EACCES: "You don't have access to bind the server to port {port}.",
EADDRINUSE: 'There is already a process listening on port {port}.',
};
export default function serverErrors(err: ServerError, port: number): string {
le... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/dev-server/src/NodeRunner.js | packages/reporters/dev-server/src/NodeRunner.js | // @flow
import type {PluginLogger, BundleGraph, PackagedBundle} from '@parcel/types';
import {md, errorToDiagnostic} from '@parcel/diagnostic';
import nullthrows from 'nullthrows';
import {Worker} from 'worker_threads';
import path from 'path';
import {type Deferred, makeDeferredWithPromise} from '@parcel/utils';
imp... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/dev-server/src/ServerReporter.js | packages/reporters/dev-server/src/ServerReporter.js | // @flow
import path from 'path';
import {Reporter} from '@parcel/plugin';
import HMRServer from './HMRServer';
import Server from './Server';
import {NodeRunner} from './NodeRunner';
let servers: Map<number, Server> = new Map();
let hmrServers: Map<number, HMRServer> = new Map();
let nodeRunners: Map<string, NodeRun... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/reporters/build-metrics/src/BuildMetricsReporter.js | packages/reporters/build-metrics/src/BuildMetricsReporter.js | // @flow strict-local
import path from 'path';
import {Reporter} from '@parcel/plugin';
import {generateBuildMetrics} from '@parcel/utils';
type TimingValue = {|
timings: {[key: string]: number, ...},
lastPhase: string,
|};
let timingsMap = new Map();
const getValue = (instanceId: string): TimingValue => {
if ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/eslint-example/src/index.js | packages/examples/eslint-example/src/index.js | module.exports = function hello() {
console.log('Say hello world...');
let hey = '';
return 'hello';
};
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/static/static.js | packages/examples/react-server-components/static/static.js | import '../src/bootstrap';
import {Counter} from '../src/Counter';
export default function StaticPage() {
return (
<html>
<body>
<h1>Static</h1>
<Counter />
</body>
</html>
);
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/Counter.js | packages/examples/react-server-components/src/Counter.js | 'use client';
import * as React from 'react';
import Container from './Container.js';
export function Counter() {
const [count, setCount] = React.useState(0);
return (
<Container>
<button onClick={() => setCount(c => c + 1)}>Count: {count}</button>
</Container>
);
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/ShowMore.js | packages/examples/react-server-components/src/ShowMore.js | 'use client';
import * as React from 'react';
import Container from './Container.js';
export default function ShowMore({children}) {
const [show, setShow] = React.useState(false);
if (!show) {
return <button onClick={() => setShow(true)}>Show More</button>;
}
return <Container>{children}</Container>;
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/Button.js | packages/examples/react-server-components/src/Button.js | 'use client';
import './Button.css';
export default function Button({action, children}) {
return (
<button
onClick={async () => {
const result = await action();
console.log(result);
}}
>
{children}
</button>
);
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/Dynamic.js | packages/examples/react-server-components/src/Dynamic.js | import './Dynamic.css';
export default function Dynamic() {
return <h1 className="dynamic">Dynamic!</h1>;
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/FilePage.js | packages/examples/react-server-components/src/FilePage.js | 'use server-entry';
import {readFile, stat} from 'fs/promises';
import {Files} from './Files';
import Container from './Container';
import {Counter} from './Counter';
import './bootstrap';
export default async function FilePage({file}) {
let f = await stat(file);
let contents = f.isFile() ? (
await readFile(f... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/Container.js | packages/examples/react-server-components/src/Container.js | export default function Container({children}) {
return <div>{children}</div>;
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/App.js | packages/examples/react-server-components/src/App.js | 'use server-entry';
import Container from './Container.js';
import {Counter} from './Counter.js';
import Button from './Button.js';
import {Files} from './Files';
import React, {lazy, Suspense} from 'react';
import './App.css';
import {getServerState} from './ServerState';
import {like} from './actions.js';
import './... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/bootstrap.js | packages/examples/react-server-components/src/bootstrap.js | 'use client-entry';
import {hydrate, fetchRSC} from '@parcel/rsc/client';
let updateRoot = hydrate({
async callServer(id, args) {
console.log(id, args);
const {result, root} = await fetchRSC('/', {
method: 'POST',
headers: {
'rsc-action-id': id,
},
body: args,
});
upd... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/Files.js | packages/examples/react-server-components/src/Files.js | import fs from 'fs/promises';
import path from 'path';
export async function Files({dir = process.cwd()}) {
// await new Promise(resolve => setTimeout(resolve, 1000));
let files = await fs.readdir(dir);
let relative = path.relative(process.cwd(), dir);
return (
<ul>
{files.map((file, i) => (
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/server.js | packages/examples/react-server-components/src/server.js | import express from 'express';
import {renderRequest, callAction} from '@parcel/rsc/node';
// Page components. These must have "use server-entry" so they are treated as code splitting entry points.
import App from './App';
import FilePage from './FilePage';
const app = express();
app.use('/client', express.static('d... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/actions.js | packages/examples/react-server-components/src/actions.js | 'use server';
import {setServerState} from './ServerState';
let likeCount = 0;
export async function like(...args) {
console.log('Like', ...args);
setServerState(`Liked ${++likeCount} times!`);
return 'Liked';
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-server-components/src/ServerState.js | packages/examples/react-server-components/src/ServerState.js | let serverState = 'Hello World';
export function setServerState(message) {
serverState = message;
}
export function getServerState() {
return serverState;
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-refresh/src/FunctionNamed.js | packages/examples/react-refresh/src/FunctionNamed.js | import React from 'react';
export function FunctionNamed() {
return <h1>Named Export Function</h1>;
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-refresh/src/index.js | packages/examples/react-refresh/src/index.js | import React from 'react';
import {createRoot} from 'react-dom/client';
import App from './App';
createRoot(document.getElementById('root')).render(
<>
<h1>Toplevel has {Math.random()}</h1>
<App />
</>,
);
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-refresh/src/FunctionDefault.js | packages/examples/react-refresh/src/FunctionDefault.js | import React from 'react';
function FunctionDefault() {
return <h1>Default Export Function</h1>;
}
export default FunctionDefault;
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-refresh/src/App.js | packages/examples/react-refresh/src/App.js | import React, {useState} from 'react';
import ClassDefault from './ClassDefault';
import {ClassNamed} from './ClassNamed';
import FunctionDefault from './FunctionDefault';
import {FunctionNamed} from './FunctionNamed';
const LazyComponent = React.lazy(() => import('./LazyComponent'));
function App() {
return (
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-refresh/src/ClassDefault.js | packages/examples/react-refresh/src/ClassDefault.js | import React from 'react';
class ClassDefault extends React.Component {
render() {
return <h1>Default Export Class</h1>;
}
}
export default ClassDefault;
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-refresh/src/LazyComponent.js | packages/examples/react-refresh/src/LazyComponent.js | import React from 'react';
function LazyComponent() {
return <h1>Lazy Component</h1>;
}
export default LazyComponent;
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-refresh/src/ClassNamed.js | packages/examples/react-refresh/src/ClassNamed.js | import React from 'react';
export class ClassNamed extends React.Component {
render() {
return <h1>Named Export Class</h1>;
}
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/html/src/async2.js | packages/examples/html/src/async2.js | console.log(require('react'));
console.log('async2');
require('lodash');
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/html/src/index.js | packages/examples/html/src/index.js | import('./async');
import('./async2');
class Test {}
new Test();
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/html/src/async.js | packages/examples/html/src/async.js | console.log(require('react'));
require('lodash');
import './child.css';
console.log('async');
class Foo {}
new Foo();
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/kitchen-sink/src/async2.js | packages/examples/kitchen-sink/src/async2.js | console.log(require('react'));
require('lodash');
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/kitchen-sink/src/prefetched.js | packages/examples/kitchen-sink/src/prefetched.js | import './prefetched.css';
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/kitchen-sink/src/index.js | packages/examples/kitchen-sink/src/index.js | import styles from './styles.css';
import parcel from 'url:./parcel.webp';
import {message} from './message';
import('./async');
import('./async2');
new Worker(new URL('worker.js', import.meta.url));
console.log(message);
// const message = require('./message');
// const fs = require('fs');
// console.log(message)... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/kitchen-sink/src/async.js | packages/examples/kitchen-sink/src/async.js | require('./paragraphs.css');
console.log(require('react'));
require('lodash');
class Foo {}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/kitchen-sink/src/worker.js | packages/examples/kitchen-sink/src/worker.js | const textUrl = require('url:./test.txt');
console.log('logged from worker.js', textUrl);
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/kitchen-sink/src/message.js | packages/examples/kitchen-sink/src/message.js | export let message = 'hi!';
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/kitchen-sink/src/preloaded.js | packages/examples/kitchen-sink/src/preloaded.js | import './preloaded.css';
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/internalize-example/index.js | packages/examples/internalize-example/index.js | import v from './index-sync';
import './index-other';
console.log(1, v);
import('./async.js');
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/internalize-example/async.js | packages/examples/internalize-example/async.js | import v from './index-sync';
// internalized, different bundle
import('./index-sync').then(v => console.log('async', v.default));
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/internalize-example/index-sync.js | packages/examples/internalize-example/index-sync.js | export default 123;
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/internalize-example/index-other.js | packages/examples/internalize-example/index-other.js | // internalized, same bundle
import('./index-sync').then(v => console.log('other', v));
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/simple/src/index.js | packages/examples/simple/src/index.js | import foo from './foo';
import './bar';
console.log(foo(122222222));
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/simple/src/bar.js | packages/examples/simple/src/bar.js | export const bar = 123;
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/simple/src/foo.js | packages/examples/simple/src/foo.js | export default function () {
return 'hello!';
}
export function foo() {
return 123;
}
export {bar} from './bar.js';
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/examples/react-hmr/src/index.js | packages/examples/react-hmr/src/index.js | import * as React from 'react';
import ReactDOM from 'react-dom/client';
console.log({hmrOptions: module.hot});
if (module.hot) {
module.hot.dispose(function () {
console.log('HOT DISPOSE');
});
module.hot.accept(function () {
console.log('HOT ACCEPT');
});
}
ReactDOM.createRoot(document.getElementB... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/configs/default/test/config.test.js | packages/configs/default/test/config.test.js | // @flow
import assert from 'assert';
import packageJson from '../package.json';
import json5 from 'json5';
import fs from 'fs';
describe('@parcel/config-default', () => {
let packageJsonDependencyNames: Set<string>;
let configPackageReferences: Set<string>;
before(() => {
packageJsonDependencyNames = new... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/profiler/build-ts.js | packages/core/profiler/build-ts.js | const fs = require('fs');
let contents = fs.readFileSync(__dirname + '/lib/Tracer.d.ts', 'utf8');
// Some fixups of typescript output
contents = contents.replace(/^\s*#private;\s*$/gm, '');
fs.writeFileSync(__dirname + '/lib/Tracer.d.ts', contents);
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/profiler/src/SamplingProfiler.js | packages/core/profiler/src/SamplingProfiler.js | // @flow
import type {Session} from 'inspector';
import invariant from 'assert';
import ThrowableDiagnostic from '@parcel/diagnostic';
// https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-Profile
export type Profile = {|
nodes: Array<ProfileNode>,
startTime: number,
endTime: number,
samples?... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/profiler/src/types.js | packages/core/profiler/src/types.js | // @flow
export type {TraceMeasurement} from '@parcel/types-internal';
export type TraceMeasurementData = {|
+categories: string[],
+args?: {[key: string]: mixed},
|};
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/profiler/src/index.js | packages/core/profiler/src/index.js | // @flow
export {default as SamplingProfiler} from './SamplingProfiler';
export {default as Trace} from './Trace';
export {tracer, PluginTracer} from './Tracer';
export type {TraceMeasurement, TraceMeasurementData} from './types';
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/profiler/src/Tracer.js | packages/core/profiler/src/Tracer.js | // @flow strict-local
import type {
TraceEvent,
IDisposable,
PluginTracer as IPluginTracer,
} from '@parcel/types';
import type {
TraceMeasurement as ITraceMeasurement,
TraceMeasurementData,
} from './types';
// @ts-ignore
import {ValueEmitter} from '@parcel/events';
import {performance} from 'perf_hooks';
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/profiler/src/Trace.js | packages/core/profiler/src/Trace.js | // @flow
import type {Profile} from './SamplingProfiler';
import type {Writable} from 'stream';
import {Tracer} from 'chrome-trace-event';
export default class Trace {
tracer: Tracer;
tid: number;
eventId: number;
constructor() {
this.tracer = new Tracer();
this.tid = 0;
this.eventId = 0;
}
g... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/profiler/test/Tracer.test.js | packages/core/profiler/test/Tracer.test.js | import {tracer, PluginTracer} from '../src/Tracer';
import sinon from 'sinon';
import assert from 'assert';
describe('Tracer', () => {
let onTrace;
let traceDisposable;
beforeEach(() => {
onTrace = sinon.spy();
traceDisposable = tracer.onTrace(onTrace);
tracer.enable();
});
afterEach(() => {
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/plugin/src/PluginAPI.js | packages/core/plugin/src/PluginAPI.js | // @flow strict-local
import type {
Transformer as TransformerOpts,
Resolver as ResolverOpts,
Bundler as BundlerOpts,
Namer as NamerOpts,
Runtime as RuntimeOpts,
Packager as PackagerOpts,
Optimizer as OptimizerOpts,
Compressor as CompressorOpts,
Reporter as ReporterOpts,
Validator as ValidatorOpts,... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/workers/src/core-worker.browser.js | packages/core/workers/src/core-worker.browser.js | // @flow
// eslint-disable-next-line monorepo/no-internal-import
module.exports = require('@parcel/core/src/worker.js');
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/workers/src/cpuCount.js | packages/core/workers/src/cpuCount.js | // @flow
import os from 'os';
import {execSync} from 'child_process';
const exec = (command: string): string => {
try {
let stdout = execSync(command, {
encoding: 'utf8',
// This prevents the command from outputting to the console
stdio: [null, null, null],
});
return stdout.trim();
}... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/workers/src/types.js | packages/core/workers/src/types.js | // @flow
import type {Diagnostic} from '@parcel/diagnostic';
import type {FilePath} from '@parcel/types-internal';
export type LocationCallRequest = {|
args: $ReadOnlyArray<mixed>,
location: string,
method?: string,
|};
export type HandleCallRequest = {|
args: $ReadOnlyArray<mixed>,
handle: number,
|};
exp... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/workers/src/index.js | packages/core/workers/src/index.js | // @flow
import type {TraceEvent, LogEvent} from '@parcel/types-internal';
import invariant from 'assert';
import WorkerFarm from './WorkerFarm';
import Logger from '@parcel/logger';
import bus from './bus';
import {tracer} from '@parcel/profiler';
if (!WorkerFarm.isWorker()) {
// Forward all logger events originati... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/workers/src/bus.js | packages/core/workers/src/bus.js | // @flow
import EventEmitter from 'events';
import {child} from './childState';
class Bus extends EventEmitter {
emit(event: string, ...args: Array<any>): boolean {
if (child) {
child.workerApi.callMaster(
{
// $FlowFixMe
location: process.browser ? '@parcel/workers/src/bus.js' ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/core/workers/src/childState.js | packages/core/workers/src/childState.js | // @flow
import type {Child} from './child';
// This file is imported by both the WorkerFarm and child implementation.
// When a worker is inited, it sets the state in this file.
// This way, WorkerFarm can access the state without directly importing the child code.
export let child: ?Child = null;
export function set... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.