Skip to content

Commit

Permalink
build: update all non-major dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed Apr 8, 2024
1 parent 39624a3 commit 2a3c47a
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 32 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ yarn_install(

http_archive(
name = "aspect_bazel_lib",
sha256 = "ac6392cbe5e1cc7701bbd81caf94016bae6f248780e12af4485d4a7127b4cb2b",
strip_prefix = "bazel-lib-2.6.1",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.6.1/bazel-lib-v2.6.1.tar.gz",
sha256 = "357dad9d212327c35d9244190ef010aad315e73ffa1bed1a29e20c372f9ca346",
strip_prefix = "bazel-lib-2.7.0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.0/bazel-lib-v2.7.0.tar.gz",
)

load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains")
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"license-webpack-plugin": "4.0.2",
"loader-utils": "3.2.1",
"lodash.template": "^4.5.0",
"magic-string": "0.30.8",
"magic-string": "0.30.9",
"mini-css-extract-plugin": "2.8.1",
"mrmime": "2.0.0",
"ng-packagr": "18.0.0-next.1",
Expand All @@ -187,7 +187,7 @@
"rollup": "~4.14.0",
"rollup-plugin-sourcemaps": "^0.6.0",
"rxjs": "7.8.1",
"sass": "1.72.0",
"sass": "1.74.1",
"sass-loader": "14.1.1",
"sauce-connect-proxy": "https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz",
"semver": "7.6.0",
Expand All @@ -204,7 +204,7 @@
"tslib": "2.6.2",
"typescript": "5.4.4",
"undici": "6.11.1",
"verdaccio": "5.30.2",
"verdaccio": "5.30.3",
"verdaccio-auth-memory": "^10.0.0",
"vite": "5.2.8",
"watchpack": "2.4.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"less-loader": "12.2.0",
"license-webpack-plugin": "4.0.2",
"loader-utils": "3.2.1",
"magic-string": "0.30.8",
"magic-string": "0.30.9",
"mini-css-extract-plugin": "2.8.1",
"mrmime": "2.0.0",
"open": "8.4.2",
Expand All @@ -53,7 +53,7 @@
"postcss-loader": "8.1.1",
"resolve-url-loader": "5.0.0",
"rxjs": "7.8.1",
"sass": "1.72.0",
"sass": "1.74.1",
"sass-loader": "14.1.1",
"semver": "7.6.0",
"source-map-loader": "5.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { MessageChannel, Worker } from 'node:worker_threads';
import {
CanonicalizeContext,
CompileResult,
Deprecation,
Exception,
FileImporter,
Importer,
Expand Down Expand Up @@ -53,19 +54,39 @@ type Importers =
| FileImporter<'async'>
| NodePackageImporter;

export interface SerializableVersion {
major: number;
minor: number;
patch: number;
}

export interface SerializableDeprecation extends Omit<Deprecation, 'obsoleteIn' | 'deprecatedIn'> {
/** The version this deprecation first became active in. */
deprecatedIn: SerializableVersion | null;
/** The version this deprecation became obsolete in. */
obsoleteIn: SerializableVersion | null;
}

export type SerializableWarningMessage = (
| {
deprecation: true;
deprecationType: SerializableDeprecation;
}
| { deprecation: false }
) & {
message: string;
span?: Omit<SourceSpan, 'url'> & { url?: string };
stack?: string;
};

/**
* A response from the Sass render Worker containing the result of the operation.
*/
interface RenderResponseMessage {
id: number;
error?: Exception;
result?: Omit<CompileResult, 'loadedUrls'> & { loadedUrls: string[] };
warnings?: {
message: string;
deprecation: boolean;
stack?: string;
span?: Omit<SourceSpan, 'url'> & { url?: string };
}[];
warnings?: SerializableWarningMessage[];
}

/**
Expand Down
55 changes: 43 additions & 12 deletions packages/angular_devkit/build_angular/src/tools/sass/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { dirname } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import { MessagePort, parentPort, receiveMessageOnPort, workerData } from 'node:worker_threads';
import {
Deprecation,
Exception,
FileImporter,
SourceSpan,
Expand All @@ -24,6 +25,7 @@ import {
RelativeUrlRebasingImporter,
sassBindWorkaround,
} from './rebasing-importer';
import type { SerializableDeprecation, SerializableWarningMessage } from './sass-service';

/**
* A request to render a Sass stylesheet using the supplied options.
Expand Down Expand Up @@ -73,14 +75,7 @@ parentPort.on('message', (message: RenderRequestMessage) => {

const { id, hasImporter, hasLogger, source, options, rebase } = message;
const entryDirectory = dirname(options.url);
let warnings:
| {
message: string;
deprecation: boolean;
stack?: string;
span?: Omit<SourceSpan, 'url'> & { url?: string };
}[]
| undefined;
let warnings: SerializableWarningMessage[] | undefined;
try {
const directoryCache = new Map<string, DirectoryEntry>();
const rebaseSourceMaps = options.sourceMap ? new Map<string, RawSourceMap>() : undefined;
Expand Down Expand Up @@ -153,13 +148,17 @@ parentPort.on('message', (message: RenderRequestMessage) => {
importer: relativeImporter,
logger: hasLogger
? {
warn(message, { deprecation, span, stack }) {
warn(message, warnOptions) {
warnings ??= [];
warnings.push({
...warnOptions,
message,
deprecation,
stack,
span: span && convertSourceSpan(span),
span: warnOptions.span && convertSourceSpan(warnOptions.span),
...convertDeprecation(
warnOptions.deprecation,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(warnOptions as any).deprecationType,
),
});
},
}
Expand Down Expand Up @@ -240,3 +239,35 @@ function convertSourceSpan(span: SourceSpan): Omit<SourceSpan, 'url'> & { url?:
url: span.url ? fileURLToPath(span.url) : undefined,
};
}

function convertDeprecation(
deprecation: boolean,
deprecationType: Deprecation | undefined,
): { deprecation: false } | { deprecation: true; deprecationType: SerializableDeprecation } {
if (!deprecation || !deprecationType) {
return { deprecation: false };
}

const { obsoleteIn, deprecatedIn, ...rest } = deprecationType;

return {
deprecation: true,
deprecationType: {
...rest,
obsoleteIn: obsoleteIn
? {
major: obsoleteIn.major,
minor: obsoleteIn.minor,
patch: obsoleteIn.patch,
}
: null,
deprecatedIn: deprecatedIn
? {
major: deprecatedIn.major,
minor: deprecatedIn.minor,
patch: deprecatedIn.patch,
}
: null,
},
};
}
2 changes: 1 addition & 1 deletion packages/angular_devkit/schematics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"jsonc-parser": "3.2.1",
"magic-string": "0.30.8",
"magic-string": "0.30.9",
"ora": "5.4.1",
"rxjs": "7.8.1"
}
Expand Down
26 changes: 21 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9915,6 +9915,13 @@ magic-string@0.30.8, magic-string@^0.30.0, magic-string@^0.30.3:
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

magic-string@0.30.9:
version "0.30.9"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.9.tgz#8927ae21bfdd856310e07a1bc8dd5e73cb6c251d"
integrity sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

make-dir@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
Expand Down Expand Up @@ -12343,7 +12350,16 @@ sass@1.71.1:
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"

sass@1.72.0, sass@^1.69.5:
sass@1.74.1:
version "1.74.1"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.74.1.tgz#686fc227d3707dd25cb2925e1db8e4562be29319"
integrity sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"

sass@^1.69.5:
version "1.72.0"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.72.0.tgz#5b9978943fcfb32b25a6a5acb102fc9dabbbf41c"
integrity sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA==
Expand Down Expand Up @@ -13876,10 +13892,10 @@ verdaccio-htpasswd@12.0.0-next-7.13:
http-errors "2.0.0"
unix-crypt-td-js "1.1.4"

verdaccio@5.30.2:
version "5.30.2"
resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-5.30.2.tgz#14f574e5613708fee3a52cbb2338132f56650aec"
integrity sha512-Mm1+Mtxo7Pu4WU/VUB9eP0PgNQpRoNxlvtzwT/uAWIx94idZoR3xRDxmqH4B++E3mCB1IO31in7Wr/z6U/tmCQ==
verdaccio@5.30.3:
version "5.30.3"
resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-5.30.3.tgz#d36ca91f3ad741dbeba57e28426c7fd23d663f95"
integrity sha512-s/ZhSRBusW2o+ZkERyzEIbVL3zo8QLpTQPVoB/pn/Yv6+ngflP+anK4xCYiXXQJhqEdBz3cwApa8UgOEaNSS4Q==
dependencies:
"@cypress/request" "3.0.1"
"@verdaccio/config" "7.0.0-next-7.13"
Expand Down

0 comments on commit 2a3c47a

Please sign in to comment.