@atlaspack/utils 2.18.0 → 2.18.2

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/lib/{alternatives.d.ts → types/alternatives.d.ts} +1 -1
  3. package/lib/{blob.d.ts → types/blob.d.ts} +1 -1
  4. package/lib/{config.d.ts → types/config.d.ts} +2 -2
  5. package/lib/{generateBuildMetrics.d.ts → types/generateBuildMetrics.d.ts} +2 -2
  6. package/lib/{generateCertificate.d.ts → types/generateCertificate.d.ts} +1 -1
  7. package/lib/{getCertificate.d.ts → types/getCertificate.d.ts} +1 -2
  8. package/lib/{getRootDir.d.ts → types/getRootDir.d.ts} +1 -1
  9. package/lib/{glob.d.ts → types/glob.d.ts} +2 -2
  10. package/lib/{hash.d.ts → types/hash.d.ts} +1 -1
  11. package/lib/{http-server.d.ts → types/http-server.d.ts} +2 -2
  12. package/lib/{isDirectoryInside.d.ts → types/isDirectoryInside.d.ts} +1 -1
  13. package/lib/{path.d.ts → types/path.d.ts} +1 -1
  14. package/lib/{prettyDiagnostic.d.ts → types/prettyDiagnostic.d.ts} +1 -1
  15. package/lib/{progress-message.d.ts → types/progress-message.d.ts} +1 -1
  16. package/lib/{relativeBundlePath.d.ts → types/relativeBundlePath.d.ts} +1 -1
  17. package/lib/{replaceBundleReferences.d.ts → types/replaceBundleReferences.d.ts} +1 -1
  18. package/lib/{sourcemap.d.ts → types/sourcemap.d.ts} +1 -2
  19. package/lib/{stream.d.ts → types/stream.d.ts} +1 -1
  20. package/package.json +10 -8
  21. package/src/alternatives.ts +1 -1
  22. package/src/blob.ts +1 -1
  23. package/src/config.ts +2 -2
  24. package/src/generateBuildMetrics.ts +2 -2
  25. package/src/generateCertificate.ts +1 -1
  26. package/src/getCertificate.ts +1 -2
  27. package/src/getRootDir.ts +1 -1
  28. package/src/glob.ts +2 -2
  29. package/src/hash.ts +1 -1
  30. package/src/http-server.ts +2 -2
  31. package/src/isDirectoryInside.ts +1 -1
  32. package/src/path.ts +1 -1
  33. package/src/prettyDiagnostic.ts +1 -1
  34. package/src/progress-message.ts +1 -1
  35. package/src/relativeBundlePath.ts +1 -1
  36. package/src/replaceBundleReferences.ts +1 -1
  37. package/src/sourcemap.ts +1 -2
  38. package/src/stream.ts +1 -1
  39. /package/lib/{DefaultMap.d.ts → types/DefaultMap.d.ts} +0 -0
  40. /package/lib/{Deferred.d.ts → types/Deferred.d.ts} +0 -0
  41. /package/lib/{PromiseQueue.d.ts → types/PromiseQueue.d.ts} +0 -0
  42. /package/lib/{TapStream.d.ts → types/TapStream.d.ts} +0 -0
  43. /package/lib/{ansi-html.d.ts → types/ansi-html.d.ts} +0 -0
  44. /package/lib/{bundle-url.d.ts → types/bundle-url.d.ts} +0 -0
  45. /package/lib/{collection.d.ts → types/collection.d.ts} +0 -0
  46. /package/lib/{countLines.d.ts → types/countLines.d.ts} +0 -0
  47. /package/lib/{debounce.d.ts → types/debounce.d.ts} +0 -0
  48. /package/lib/{debug-tools.d.ts → types/debug-tools.d.ts} +0 -0
  49. /package/lib/{dependency-location.d.ts → types/dependency-location.d.ts} +0 -0
  50. /package/lib/{escape-html.d.ts → types/escape-html.d.ts} +0 -0
  51. /package/lib/{getExisting.d.ts → types/getExisting.d.ts} +0 -0
  52. /package/lib/{getModuleParts.d.ts → types/getModuleParts.d.ts} +0 -0
  53. /package/lib/{index.d.ts → types/index.d.ts} +0 -0
  54. /package/lib/{is-url.d.ts → types/is-url.d.ts} +0 -0
  55. /package/lib/{objectHash.d.ts → types/objectHash.d.ts} +0 -0
  56. /package/lib/{openInBrowser.d.ts → types/openInBrowser.d.ts} +0 -0
  57. /package/lib/{parseCSSImport.d.ts → types/parseCSSImport.d.ts} +0 -0
  58. /package/lib/{prettifyTime.d.ts → types/prettifyTime.d.ts} +0 -0
  59. /package/lib/{relativeUrl.d.ts → types/relativeUrl.d.ts} +0 -0
  60. /package/lib/{schema.d.ts → types/schema.d.ts} +0 -0
  61. /package/lib/{shared-buffer.d.ts → types/shared-buffer.d.ts} +0 -0
  62. /package/lib/{throttle.d.ts → types/throttle.d.ts} +0 -0
  63. /package/lib/{urlJoin.d.ts → types/urlJoin.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaspack/utils
2
2
 
3
+ ## 2.18.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
8
+ - @atlaspack/feature-flags@2.23.0
9
+ - @atlaspack/types-internal@2.19.1
10
+ - @atlaspack/codeframe@2.13.7
11
+ - @atlaspack/logger@2.14.17
12
+
13
+ ## 2.18.1
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`ad26146`](https://github.com/atlassian-labs/atlaspack/commit/ad26146f13b4c1cc65d4a0f9c67060b90ef14ff3), [`f1b48e7`](https://github.com/atlassian-labs/atlaspack/commit/f1b48e7a04e005cef0f36a3e692087a9ecdb6f7a), [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45), [`73dd7ba`](https://github.com/atlassian-labs/atlaspack/commit/73dd7baab69456ef2f6e4a0cc7dbb04f407eb148)]:
18
+ - @atlaspack/rust@3.6.0
19
+ - @atlaspack/types-internal@2.19.0
20
+ - @atlaspack/feature-flags@2.22.0
21
+ - @atlaspack/logger@2.14.16
22
+ - @atlaspack/codeframe@2.13.6
23
+
3
24
  ## 2.18.0
4
25
 
5
26
  ### Minor Changes
@@ -1,3 +1,3 @@
1
- import type { FileSystem } from '@atlaspack/types';
1
+ import type { FileSystem } from '@atlaspack/types-internal';
2
2
  export declare function findAlternativeNodeModules(fs: FileSystem, moduleName: string, dir: string): Promise<Array<string>>;
3
3
  export declare function findAlternativeFiles(fs: FileSystem, fileSpecifier: string, dir: string, projectRoot: string, leadingDotSlash?: boolean, includeDirectories?: boolean, includeExtension?: boolean): Promise<Array<string>>;
@@ -1,4 +1,4 @@
1
- import type { Blob } from '@atlaspack/types';
1
+ import type { Blob } from '@atlaspack/types-internal';
2
2
  import { Buffer } from 'buffer';
3
3
  export declare function blobToBuffer(blob: Blob): Promise<Buffer>;
4
4
  export declare function blobToString(blob: Blob): Promise<string>;
@@ -1,5 +1,5 @@
1
- import type { ConfigResult, File, FilePath } from '@atlaspack/types';
2
- import type { FileSystem } from '@atlaspack/fs';
1
+ import type { ConfigResult, File, FilePath } from '@atlaspack/types-internal';
2
+ import type { FileSystem } from '@atlaspack/types-internal';
3
3
  export type ConfigOutput = {
4
4
  config: ConfigResult;
5
5
  files: Array<File>;
@@ -1,5 +1,5 @@
1
- import type { FilePath, PackagedBundle } from '@atlaspack/types';
2
- import type { FileSystem } from '@atlaspack/fs';
1
+ import type { FilePath, PackagedBundle } from '@atlaspack/types-internal';
2
+ import type { FileSystem } from '@atlaspack/types-internal';
3
3
  export type AssetStats = {
4
4
  filePath: string;
5
5
  size: number;
@@ -1,4 +1,4 @@
1
- import type { FileSystem } from '@atlaspack/fs';
1
+ import type { FileSystem } from '@atlaspack/types-internal';
2
2
  export default function generateCertificate(fs: FileSystem, cacheDir: string, host?: string | null): Promise<{
3
3
  cert: Buffer;
4
4
  key: Buffer;
@@ -1,5 +1,4 @@
1
- import type { HTTPSOptions } from '@atlaspack/types';
2
- import type { FileSystem } from '@atlaspack/fs';
1
+ import type { HTTPSOptions, FileSystem } from '@atlaspack/types-internal';
3
2
  export default function getCertificate(fs: FileSystem, options: HTTPSOptions): Promise<{
4
3
  cert: Buffer;
5
4
  key: Buffer;
@@ -1,2 +1,2 @@
1
- import type { FilePath } from '@atlaspack/types';
1
+ import type { FilePath } from '@atlaspack/types-internal';
2
2
  export default function getRootDir(files: Array<FilePath>): FilePath;
@@ -1,5 +1,5 @@
1
- import type { FilePath, Glob } from '@atlaspack/types';
2
- import type { FileSystem } from '@atlaspack/fs';
1
+ import type { FilePath, Glob } from '@atlaspack/types-internal';
2
+ import type { FileSystem } from '@atlaspack/types-internal';
3
3
  import { FastGlobOptions } from 'fast-glob';
4
4
  import { type Options } from 'micromatch';
5
5
  export declare function isGlob(p: FilePath): any;
@@ -1,5 +1,5 @@
1
1
  import type { Readable } from 'stream';
2
- import type { FileSystem } from '@atlaspack/fs';
2
+ import type { FileSystem } from '@atlaspack/types-internal';
3
3
  export declare function hashStream(stream: Readable): Promise<string>;
4
4
  export declare function hashObject(obj: {
5
5
  readonly [key: string]: unknown;
@@ -1,7 +1,7 @@
1
1
  import type { Server as HTTPOnlyServer, IncomingMessage as HTTPRequest, ServerResponse as HTTPResponse } from 'http';
2
2
  import type { Server as HTTPSServer } from 'https';
3
- import type { FilePath, HTTPSOptions } from '@atlaspack/types';
4
- import type { FileSystem } from '@atlaspack/fs';
3
+ import type { FilePath, HTTPSOptions } from '@atlaspack/types-internal';
4
+ import type { FileSystem } from '@atlaspack/types-internal';
5
5
  type CreateHTTPServerOpts = {
6
6
  listener?: (arg1: HTTPRequest, arg2: HTTPResponse) => void;
7
7
  host?: string;
@@ -1,2 +1,2 @@
1
- import type { FilePath } from '@atlaspack/types';
1
+ import type { FilePath } from '@atlaspack/types-internal';
2
2
  export default function isDirectoryInside(child: FilePath, parent: FilePath): boolean;
@@ -1,4 +1,4 @@
1
- import type { FilePath } from '@atlaspack/types';
1
+ import type { FilePath } from '@atlaspack/types-internal';
2
2
  export declare function isAbsolute(filepath: string): boolean;
3
3
  export declare function normalizeSeparators(filePath: FilePath): FilePath;
4
4
  export type PathOptions = {
@@ -1,5 +1,5 @@
1
1
  import type { Diagnostic } from '@atlaspack/diagnostic';
2
- import type { PluginOptions } from '@atlaspack/types';
2
+ import type { PluginOptions } from '@atlaspack/types-internal';
3
3
  export type FormattedCodeFrame = {
4
4
  location: string;
5
5
  code: string;
@@ -1,3 +1,3 @@
1
- import type { BuildProgressEvent } from '@atlaspack/types';
1
+ import type { BuildProgressEvent } from '@atlaspack/types-internal';
2
2
  export declare function getProgressMessage(event: BuildProgressEvent): string | null | undefined;
3
3
  export declare function getPackageProgressMessage(completeBundles: number, totalBundles: number): string;
@@ -1,4 +1,4 @@
1
- import type { FilePath, NamedBundle } from '@atlaspack/types';
1
+ import type { FilePath, NamedBundle } from '@atlaspack/types-internal';
2
2
  export declare function relativeBundlePath(from: NamedBundle, to: NamedBundle, opts?: {
3
3
  leadingDotSlash: boolean;
4
4
  }): FilePath;
@@ -1,5 +1,5 @@
1
1
  import type SourceMap from '@parcel/source-map';
2
- import type { Async, Blob, Bundle, BundleGraph, Dependency, NamedBundle } from '@atlaspack/types';
2
+ import type { Async, Blob, Bundle, BundleGraph, Dependency, NamedBundle } from '@atlaspack/types-internal';
3
3
  export declare function replaceURLReferences({ bundle, bundleGraph, contents, map, getReplacement, relative, }: {
4
4
  bundle: NamedBundle;
5
5
  bundleGraph: BundleGraph<NamedBundle>;
@@ -1,5 +1,4 @@
1
- import type { SourceLocation } from '@atlaspack/types';
2
- import type { FileSystem } from '@atlaspack/fs';
1
+ import type { SourceLocation, FileSystem } from '@atlaspack/types-internal';
3
2
  import SourceMap from '@parcel/source-map';
4
3
  export declare const SOURCEMAP_RE: RegExp;
5
4
  export declare const SOURCEMAP_EXTENSIONS: Set<string>;
@@ -1,5 +1,5 @@
1
1
  import { Readable } from 'stream';
2
- import type { Blob } from '@atlaspack/types';
2
+ import type { Blob } from '@atlaspack/types-internal';
3
3
  export declare function measureStreamLength(stream: Readable): Promise<number>;
4
4
  export declare function readableFromStringOrBuffer(str: string | Buffer): Readable;
5
5
  export declare function bufferStream(stream: Readable): Promise<Buffer>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/utils",
3
- "version": "2.18.0",
3
+ "version": "2.18.2",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "publishConfig": {
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "main": "./lib/index.js",
14
14
  "source": "./src/index.ts",
15
- "types": "./lib/index.d.ts",
15
+ "types": "./lib/types/index.d.ts",
16
16
  "engines": {
17
17
  "node": ">= 16.0.0"
18
18
  },
@@ -31,12 +31,13 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@atlaspack/codeframe": "2.13.5",
34
+ "@atlaspack/codeframe": "2.13.7",
35
35
  "@atlaspack/diagnostic": "2.14.2",
36
- "@atlaspack/feature-flags": "2.21.0",
37
- "@atlaspack/logger": "2.14.15",
36
+ "@atlaspack/feature-flags": "2.23.0",
37
+ "@atlaspack/logger": "2.14.17",
38
38
  "@atlaspack/markdown-ansi": "2.14.2",
39
- "@atlaspack/rust": "3.5.0",
39
+ "@atlaspack/types-internal": "2.19.1",
40
+ "@atlaspack/rust": "3.6.0",
40
41
  "@parcel/source-map": "^2.1.1",
41
42
  "@types/micromatch": "^4.0.9",
42
43
  "@types/node-forge": "^1.3.13",
@@ -71,6 +72,7 @@
71
72
  },
72
73
  "type": "commonjs",
73
74
  "scripts": {
74
- "check-ts": "tsc --emitDeclarationOnly --rootDir src"
75
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
76
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
75
77
  }
76
- }
78
+ }
@@ -1,5 +1,5 @@
1
1
  import path from 'path';
2
- import type {FileSystem} from '@atlaspack/types';
2
+ import type {FileSystem} from '@atlaspack/types-internal';
3
3
  import {fuzzySearch} from './schema';
4
4
  import {relativePath} from './path';
5
5
  import {resolveConfig} from './config';
package/src/blob.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type {Blob} from '@atlaspack/types';
1
+ import type {Blob} from '@atlaspack/types-internal';
2
2
 
3
3
  import {Buffer} from 'buffer';
4
4
  import {bufferStream} from './';
package/src/config.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type {ConfigResult, File, FilePath} from '@atlaspack/types';
2
- import type {FileSystem} from '@atlaspack/fs';
1
+ import type {ConfigResult, File, FilePath} from '@atlaspack/types-internal';
2
+ import type {FileSystem} from '@atlaspack/types-internal';
3
3
  import ThrowableDiagnostic from '@atlaspack/diagnostic';
4
4
  import path from 'path';
5
5
  // @ts-expect-error TS7016
@@ -1,5 +1,5 @@
1
- import type {FilePath, PackagedBundle} from '@atlaspack/types';
2
- import type {FileSystem} from '@atlaspack/fs';
1
+ import type {FilePath, PackagedBundle} from '@atlaspack/types-internal';
2
+ import type {FileSystem} from '@atlaspack/types-internal';
3
3
  import SourceMap from '@parcel/source-map';
4
4
  import nullthrows from 'nullthrows';
5
5
  import path from 'path';
@@ -1,4 +1,4 @@
1
- import type {FileSystem} from '@atlaspack/fs';
1
+ import type {FileSystem} from '@atlaspack/types-internal';
2
2
  import forge from 'node-forge';
3
3
  import path from 'path';
4
4
  import logger from '@atlaspack/logger';
@@ -1,5 +1,4 @@
1
- import type {HTTPSOptions} from '@atlaspack/types';
2
- import type {FileSystem} from '@atlaspack/fs';
1
+ import type {HTTPSOptions, FileSystem} from '@atlaspack/types-internal';
3
2
 
4
3
  export default async function getCertificate(
5
4
  fs: FileSystem,
package/src/getRootDir.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type {FilePath} from '@atlaspack/types';
1
+ import type {FilePath} from '@atlaspack/types-internal';
2
2
  import {isGlob} from './glob';
3
3
  import path from 'path';
4
4
 
package/src/glob.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type {FilePath, Glob} from '@atlaspack/types';
2
- import type {FileSystem} from '@atlaspack/fs';
1
+ import type {FilePath, Glob} from '@atlaspack/types-internal';
2
+ import type {FileSystem} from '@atlaspack/types-internal';
3
3
 
4
4
  // @ts-expect-error TS7016
5
5
  import _isGlob from 'is-glob';
package/src/hash.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type {Readable} from 'stream';
2
- import type {FileSystem} from '@atlaspack/fs';
2
+ import type {FileSystem} from '@atlaspack/types-internal';
3
3
 
4
4
  import {objectSortedEntriesDeep} from './collection';
5
5
  import {hashString, Hash} from '@atlaspack/rust';
@@ -5,8 +5,8 @@ import type {
5
5
  } from 'http';
6
6
  import type {Server as HTTPSServer} from 'https';
7
7
  import type {Socket} from 'net';
8
- import type {FilePath, HTTPSOptions} from '@atlaspack/types';
9
- import type {FileSystem} from '@atlaspack/fs';
8
+ import type {FilePath, HTTPSOptions} from '@atlaspack/types-internal';
9
+ import type {FileSystem} from '@atlaspack/types-internal';
10
10
 
11
11
  import http from 'http';
12
12
  import https from 'https';
@@ -1,4 +1,4 @@
1
- import type {FilePath} from '@atlaspack/types';
1
+ import type {FilePath} from '@atlaspack/types-internal';
2
2
  import path from 'path';
3
3
 
4
4
  export default function isDirectoryInside(
package/src/path.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type {FilePath} from '@atlaspack/types';
1
+ import type {FilePath} from '@atlaspack/types-internal';
2
2
  import path from 'path';
3
3
 
4
4
  const ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:){0,1}[\\/]+/;
@@ -1,5 +1,5 @@
1
1
  import type {Diagnostic} from '@atlaspack/diagnostic';
2
- import type {PluginOptions} from '@atlaspack/types';
2
+ import type {PluginOptions} from '@atlaspack/types-internal';
3
3
 
4
4
  import formatCodeFrame from '@atlaspack/codeframe';
5
5
  import _mdAnsi from '@atlaspack/markdown-ansi';
@@ -1,4 +1,4 @@
1
- import type {BuildProgressEvent} from '@atlaspack/types';
1
+ import type {BuildProgressEvent} from '@atlaspack/types-internal';
2
2
 
3
3
  import path from 'path';
4
4
 
@@ -1,4 +1,4 @@
1
- import type {FilePath, NamedBundle} from '@atlaspack/types';
1
+ import type {FilePath, NamedBundle} from '@atlaspack/types-internal';
2
2
 
3
3
  import path from 'path';
4
4
  import {relativePath} from './path';
@@ -6,7 +6,7 @@ import type {
6
6
  BundleGraph,
7
7
  Dependency,
8
8
  NamedBundle,
9
- } from '@atlaspack/types';
9
+ } from '@atlaspack/types-internal';
10
10
  import {performStringReplacements} from '@atlaspack/rust';
11
11
  import {getFeatureFlag} from '@atlaspack/feature-flags';
12
12
 
package/src/sourcemap.ts CHANGED
@@ -1,5 +1,4 @@
1
- import type {SourceLocation} from '@atlaspack/types';
2
- import type {FileSystem} from '@atlaspack/fs';
1
+ import type {SourceLocation, FileSystem} from '@atlaspack/types-internal';
3
2
  import SourceMap from '@parcel/source-map';
4
3
  import path from 'path';
5
4
  import {normalizeSeparators, isAbsolute} from './path';
package/src/stream.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import {Readable, PassThrough} from 'stream';
2
- import type {Blob} from '@atlaspack/types';
2
+ import type {Blob} from '@atlaspack/types-internal';
3
3
 
4
4
  export function measureStreamLength(stream: Readable): Promise<number> {
5
5
  return new Promise(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes