Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/angular/build/src/private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export { transformSupportedBrowsersToTargets } from './tools/esbuild/utils';
export { SassWorkerImplementation } from './tools/sass/sass-service';

export { SourceFileCache } from './tools/esbuild/angular/source-file-cache';
export { Cache } from './tools/esbuild/cache';
export { LmdbCacheStore } from './tools/esbuild/lmdb-cache-store';
export { createJitResourceTransformer } from './tools/angular/transformers/jit-resource-transformer';
export { JavaScriptTransformer } from './tools/esbuild/javascript-transformer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ export function createCompilerPlugin(

// Initialize a worker pool for JavaScript transformations.
// Webcontainers currently do not support this persistent cache store.
let cacheStore: import('../lmdb-cache-store').LmbdCacheStore | undefined;
let cacheStore: import('../lmdb-cache-store').LmdbCacheStore | undefined;
if (pluginOptions.sourceFileCache?.persistentCachePath && !process.versions.webcontainer) {
try {
const { LmbdCacheStore } = await import('../lmdb-cache-store');
cacheStore = new LmbdCacheStore(
const { LmdbCacheStore } = await import('../lmdb-cache-store');
cacheStore = new LmdbCacheStore(
path.join(pluginOptions.sourceFileCache.persistentCachePath, 'angular-compiler.db'),
);
} catch (e) {
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/build/src/tools/esbuild/i18n-inliner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { createHash } from 'node:crypto';
import { extname, join } from 'node:path';
import { WorkerPool } from '../../utils/worker-pool';
import { BuildOutputFile, BuildOutputFileType } from './bundler-context';
import type { LmbdCacheStore } from './lmdb-cache-store';
import type { LmdbCacheStore } from './lmdb-cache-store';
import { createOutputFile } from './utils';

/**
Expand Down Expand Up @@ -39,7 +39,7 @@ export interface I18nInlinerOptions {
export class I18nInliner {
#cacheInitFailed = false;
#workerPool: WorkerPool;
#cache: LmbdCacheStore | undefined;
#cache: LmdbCacheStore | undefined;
readonly #localizeFiles: ReadonlyMap<string, BuildOutputFile>;
readonly #unmodifiedFiles: Array<BuildOutputFile>;

Expand Down Expand Up @@ -274,9 +274,9 @@ export class I18nInliner {

// Initialize a persistent cache for i18n transformations.
try {
const { LmbdCacheStore } = await import('./lmdb-cache-store');
const { LmdbCacheStore } = await import('./lmdb-cache-store');

this.#cache = new LmbdCacheStore(join(persistentCachePath, 'angular-i18n.db'));
this.#cache = new LmdbCacheStore(join(persistentCachePath, 'angular-i18n.db'));
} catch {
this.#cacheInitFailed = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { RootDatabase, open } from 'lmdb';
import { Cache, CacheStore } from './cache';

export class LmbdCacheStore implements CacheStore<unknown> {
export class LmdbCacheStore implements CacheStore<unknown> {
readonly #cacheFileUrl;
#db: RootDatabase | undefined;

Expand Down