@parcel/types-internal 2.13.3 → 2.13.4-canary.3386

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -100,7 +100,7 @@ export interface Target {
100
100
  }
101
101
 
102
102
  /** In which environment the output should run (influces e.g. bundle loaders) */
103
- export type EnvironmentContext = "browser" | "web-worker" | "service-worker" | "worklet" | "node" | "electron-main" | "electron-renderer";
103
+ export type EnvironmentContext = "browser" | "web-worker" | "service-worker" | "worklet" | "node" | "electron-main" | "electron-renderer" | "react-client" | "react-server";
104
104
 
105
105
  /** The JS module format for the bundle output */
106
106
  export type OutputFormat = "esmodule" | "commonjs" | "global";
@@ -199,6 +199,9 @@ export interface Environment {
199
199
  /** Whether <code>context</code> specifies a node context. */
200
200
  isNode(): boolean;
201
201
 
202
+ /** Whether <code>context</code> specifies a server context. */
203
+ isServer(): boolean;
204
+
202
205
  /** Whether <code>context</code> specifies an electron context. */
203
206
  isElectron(): boolean;
204
207
 
@@ -1621,6 +1624,9 @@ export interface BundleGraph<TBundle extends Bundle> {
1621
1624
 
1622
1625
  /** Returns the common root directory for the entry assets of a target. */
1623
1626
  getEntryRoot(target: Target): FilePath;
1627
+
1628
+ /** Returns a list of entry bundles. */
1629
+ getEntryBundles(): Array<TBundle>;
1624
1630
  }
1625
1631
 
1626
1632
  /**
@@ -1737,6 +1743,7 @@ export type RuntimeAsset = {
1737
1743
  readonly dependency?: Dependency;
1738
1744
  readonly isEntry?: boolean;
1739
1745
  readonly env?: EnvironmentOptions;
1746
+ readonly shouldReplaceResolution?: boolean;
1740
1747
  };
1741
1748
 
1742
1749
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/types-internal",
3
- "version": "2.13.3",
3
+ "version": "2.13.4-canary.3386+3a064724a",
4
4
  "license": "MIT",
5
5
  "main": "src/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -16,10 +16,10 @@
16
16
  "check-ts": "tsc --noEmit lib/index.d.ts"
17
17
  },
18
18
  "dependencies": {
19
- "@parcel/diagnostic": "2.13.3",
20
- "@parcel/feature-flags": "2.13.3",
19
+ "@parcel/diagnostic": "2.0.0-canary.1763+3a064724a",
20
+ "@parcel/feature-flags": "2.13.4-canary.3386+3a064724a",
21
21
  "@parcel/source-map": "^2.1.1",
22
22
  "utility-types": "^3.10.0"
23
23
  },
24
- "gitHead": "d19b1f6bdb05eb5a3085f44daae15c0fe2709ab9"
24
+ "gitHead": "3a064724a9589142ace59eb8920630f3ecdb1925"
25
25
  }
package/src/index.js CHANGED
@@ -167,7 +167,9 @@ export type EnvironmentContext =
167
167
  | 'worklet'
168
168
  | 'node'
169
169
  | 'electron-main'
170
- | 'electron-renderer';
170
+ | 'electron-renderer'
171
+ | 'react-client'
172
+ | 'react-server';
171
173
 
172
174
  /** The JS module format for the bundle output */
173
175
  export type OutputFormat = 'esmodule' | 'commonjs' | 'global';
@@ -282,6 +284,8 @@ export interface Environment {
282
284
  isBrowser(): boolean;
283
285
  /** Whether <code>context</code> specifies a node context. */
284
286
  isNode(): boolean;
287
+ /** Whether <code>context</code> specifies a server context. */
288
+ isServer(): boolean;
285
289
  /** Whether <code>context</code> specifies an electron context. */
286
290
  isElectron(): boolean;
287
291
  /** Whether <code>context</code> specifies a worker context. */
@@ -1618,6 +1622,8 @@ export interface BundleGraph<TBundle: Bundle> {
1618
1622
  getUsedSymbols(Asset | Dependency): ?$ReadOnlySet<Symbol>;
1619
1623
  /** Returns the common root directory for the entry assets of a target. */
1620
1624
  getEntryRoot(target: Target): FilePath;
1625
+ /** Returns a list of entry bundles. */
1626
+ getEntryBundles(): Array<TBundle>;
1621
1627
  }
1622
1628
 
1623
1629
  /**
@@ -1721,6 +1727,7 @@ export type RuntimeAsset = {|
1721
1727
  +dependency?: Dependency,
1722
1728
  +isEntry?: boolean,
1723
1729
  +env?: EnvironmentOptions,
1730
+ +shouldReplaceResolution?: boolean,
1724
1731
  |};
1725
1732
 
1726
1733
  /**