sass-embedded 1.72.0 → 1.75.0

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.
@@ -1,3 +1,4 @@
1
+ import {DeprecationOrId, Version} from './deprecations';
1
2
  import {FileImporter, Importer, NodePackageImporter} from './importer';
2
3
  import {Logger} from './logger';
3
4
  import {Value} from './value';
@@ -122,6 +123,20 @@ export interface Options<sync extends 'sync' | 'async'> {
122
123
  */
123
124
  charset?: boolean;
124
125
 
126
+ /**
127
+ * A set of deprecations to treat as fatal.
128
+ *
129
+ * If a deprecation warning of any provided type is encountered during
130
+ * compilation, the compiler will error instead.
131
+ *
132
+ * If a `Version` is provided, then all deprecations that were active in that
133
+ * compiler version will be treated as fatal.
134
+ *
135
+ * @category Messages
136
+ * @compatiblity dart: "1.74.0", node: false
137
+ */
138
+ fatalDeprecations?: (DeprecationOrId | Version)[];
139
+
125
140
  /**
126
141
  * Additional built-in Sass functions that are available in all stylesheets.
127
142
  * This option takes an object whose keys are Sass function signatures like
@@ -198,6 +213,17 @@ export interface Options<sync extends 'sync' | 'async'> {
198
213
  */
199
214
  functions?: Record<string, CustomFunction<sync>>;
200
215
 
216
+ /**
217
+ * A set of future deprecations to opt into early.
218
+ *
219
+ * Future deprecations passed here will be treated as active by the compiler,
220
+ * emitting warnings as necessary.
221
+ *
222
+ * @category Messages
223
+ * @compatiblity dart: "1.74.0", node: false
224
+ */
225
+ futureDeprecations?: DeprecationOrId[];
226
+
201
227
  /**
202
228
  * Custom importers that control how Sass resolves loads from rules like
203
229
  * [`@use`](https://sass-lang.com/documentation/at-rules/use) and
@@ -266,16 +292,30 @@ export interface Options<sync extends 'sync' | 'async'> {
266
292
  * so that they can get fixed as soon as possible!
267
293
  *
268
294
  * **Heads up!** If {@link compileString} or {@link compileStringAsync} is
269
- * called without {@link StringOptionsWithoutImporter.url}, <em>all</em>
270
- * stylesheets it loads will be considered dependencies. Since it doesn’t have
271
- * a path of its own, everything it loads is coming from a load path rather
272
- * than a relative import.
295
+ * called without {@link StringOptions.url}, <em>all</em> stylesheets it loads
296
+ * will be considered dependencies. Since it doesn’t have a path of its own,
297
+ * everything it loads is coming from a load path rather than a relative
298
+ * import.
273
299
  *
274
300
  * @defaultValue `false`
275
301
  * @category Messages
276
302
  */
277
303
  quietDeps?: boolean;
278
304
 
305
+ /**
306
+ * A set of active deprecations to ignore.
307
+ *
308
+ * If a deprecation warning of any provided type is encountered during
309
+ * compilation, the compiler will ignore it instead.
310
+ *
311
+ * **Heads up!** The deprecated functionality you're depending on will
312
+ * eventually break.
313
+ *
314
+ * @category Messages
315
+ * @compatiblity dart: "1.74.0", node: false
316
+ */
317
+ silenceDeprecations?: DeprecationOrId[];
318
+
279
319
  /**
280
320
  * Whether or not Sass should generate a source map. If it does, the source
281
321
  * map will be available as {@link CompileResult.sourceMap}.
@@ -348,9 +388,10 @@ export interface Options<sync extends 'sync' | 'async'> {
348
388
  * Options that can be passed to {@link compileString} or {@link
349
389
  * compileStringAsync}.
350
390
  *
351
- * If the {@link StringOptionsWithImporter.importer} field isn't passed, the
352
- * entrypoint file can load files relative to itself if a `file://` URL is
353
- * passed to the {@link url} field.
391
+ * If the {@link StringOptions.importer} field isn't passed, the entrypoint file
392
+ * can load files relative to itself if a `file://` URL is passed to the {@link
393
+ * url} field. If it is passed, the entrypoint file uses it to load files
394
+ * relative to itself.
354
395
  *
355
396
  * @typeParam sync - This lets the TypeScript checker verify that asynchronous
356
397
  * {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't
@@ -358,7 +399,7 @@ export interface Options<sync extends 'sync' | 'async'> {
358
399
  *
359
400
  * @category Options
360
401
  */
361
- export interface StringOptionsWithoutImporter<sync extends 'sync' | 'async'>
402
+ export interface StringOptions<sync extends 'sync' | 'async'>
362
403
  extends Options<sync> {
363
404
  /**
364
405
  * The {@link Syntax} to use to parse the entrypoint stylesheet.
@@ -369,6 +410,19 @@ export interface StringOptionsWithoutImporter<sync extends 'sync' | 'async'>
369
410
  */
370
411
  syntax?: Syntax;
371
412
 
413
+ /**
414
+ * The importer to use to handle loads that are relative to the entrypoint
415
+ * stylesheet.
416
+ *
417
+ * A relative load's URL is first resolved relative to {@link url}, then
418
+ * passed to {@link importer}. (It's passed as-is if {@link url} isn't
419
+ * passed.) If the importer doesn't recognize it, it's then passed to {@link
420
+ * importers} and {@link loadPaths}.
421
+ *
422
+ * @category Input
423
+ */
424
+ importer?: Importer<sync> | FileImporter<sync>;
425
+
372
426
  /**
373
427
  * The canonical URL of the entrypoint stylesheet.
374
428
  *
@@ -378,62 +432,24 @@ export interface StringOptionsWithoutImporter<sync extends 'sync' | 'async'>
378
432
  * loadPaths}.
379
433
  *
380
434
  * @category Input
435
+ * @compatibility feature: "Undefined URL with importer", dart: "1.75.0", node: false
436
+ *
437
+ * Earlier versions of Dart Sass required {@link url} to be defined when
438
+ * passing {@link StringOptions.importer}.
381
439
  */
382
440
  url?: URL;
383
441
  }
384
442
 
385
443
  /**
386
- * Options that can be passed to {@link compileString} or {@link
387
- * compileStringAsync}.
388
- *
389
- * If the {@link StringOptionsWithImporter.importer} field is passed, the
390
- * entrypoint file uses it to load files relative to itself and the {@link url}
391
- * field is mandatory.
392
- *
393
- * @typeParam sync - This lets the TypeScript checker verify that asynchronous
394
- * {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't
395
- * passed to {@link compile} or {@link compileString}.
396
- *
397
444
  * @category Options
445
+ * @deprecated Use {@link StringOptions} instead.
398
446
  */
399
- export interface StringOptionsWithImporter<sync extends 'sync' | 'async'>
400
- extends StringOptionsWithoutImporter<sync> {
401
- /**
402
- * The importer to use to handle loads that are relative to the entrypoint
403
- * stylesheet.
404
- *
405
- * A relative load's URL is first resolved relative to {@link url}, then
406
- * passed to {@link importer}. If the importer doesn't recognize it, it's then
407
- * passed to {@link importers} and {@link loadPaths}.
408
- *
409
- * @category Input
410
- */
411
- importer: Importer<sync> | FileImporter<sync>;
412
-
413
- /**
414
- * The canonical URL of the entrypoint stylesheet. If this is passed along
415
- * with {@link importer}, it's used to resolve relative loads in the
416
- * entrypoint stylesheet.
417
- *
418
- * @category Input
419
- */
420
- url: URL;
421
- }
447
+ type StringOptionsWithoutImporter<sync extends 'sync' | 'async'> =
448
+ StringOptions<sync>;
422
449
 
423
450
  /**
424
- * Options that can be passed to {@link compileString} or {@link
425
- * compileStringAsync}.
426
- *
427
- * This is a {@link StringOptionsWithImporter} if it has a {@link
428
- * StringOptionsWithImporter.importer} field, and a {@link
429
- * StringOptionsWithoutImporter} otherwise.
430
- *
431
- * @typeParam sync - This lets the TypeScript checker verify that asynchronous
432
- * {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't
433
- * passed to {@link compile} or {@link compileString}.
434
- *
435
451
  * @category Options
452
+ * @deprecated Use {@link StringOptions} instead.
436
453
  */
437
- export type StringOptions<sync extends 'sync' | 'async'> =
438
- | StringOptionsWithImporter<sync>
439
- | StringOptionsWithoutImporter<sync>;
454
+ type StringOptionsWithImporter<sync extends 'sync' | 'async'> =
455
+ StringOptions<sync>;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "sass-embedded",
3
- "version": "1.72.0",
4
- "protocol-version": "2.5.0",
5
- "compiler-version": "1.72.0",
3
+ "version": "1.75.0",
4
+ "protocol-version": "2.6.0",
5
+ "compiler-version": "1.75.0",
6
6
  "description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",
7
7
  "repository": "sass/embedded-host-node",
8
8
  "author": "Google Inc.",
@@ -35,22 +35,23 @@
35
35
  "test": "jest"
36
36
  },
37
37
  "optionalDependencies": {
38
- "sass-embedded-android-arm": "1.72.0",
39
- "sass-embedded-android-arm64": "1.72.0",
40
- "sass-embedded-android-ia32": "1.72.0",
41
- "sass-embedded-android-x64": "1.72.0",
42
- "sass-embedded-darwin-arm64": "1.72.0",
43
- "sass-embedded-darwin-x64": "1.72.0",
44
- "sass-embedded-linux-arm": "1.72.0",
45
- "sass-embedded-linux-arm64": "1.72.0",
46
- "sass-embedded-linux-ia32": "1.72.0",
47
- "sass-embedded-linux-x64": "1.72.0",
48
- "sass-embedded-linux-musl-arm": "1.72.0",
49
- "sass-embedded-linux-musl-arm64": "1.72.0",
50
- "sass-embedded-linux-musl-ia32": "1.72.0",
51
- "sass-embedded-linux-musl-x64": "1.72.0",
52
- "sass-embedded-win32-ia32": "1.72.0",
53
- "sass-embedded-win32-x64": "1.72.0"
38
+ "sass-embedded-android-arm": "1.75.0",
39
+ "sass-embedded-android-arm64": "1.75.0",
40
+ "sass-embedded-android-ia32": "1.75.0",
41
+ "sass-embedded-android-x64": "1.75.0",
42
+ "sass-embedded-darwin-arm64": "1.75.0",
43
+ "sass-embedded-darwin-x64": "1.75.0",
44
+ "sass-embedded-linux-arm": "1.75.0",
45
+ "sass-embedded-linux-arm64": "1.75.0",
46
+ "sass-embedded-linux-ia32": "1.75.0",
47
+ "sass-embedded-linux-x64": "1.75.0",
48
+ "sass-embedded-linux-musl-arm": "1.75.0",
49
+ "sass-embedded-linux-musl-arm64": "1.75.0",
50
+ "sass-embedded-linux-musl-ia32": "1.75.0",
51
+ "sass-embedded-linux-musl-x64": "1.75.0",
52
+ "sass-embedded-win32-arm64": "1.75.0",
53
+ "sass-embedded-win32-ia32": "1.75.0",
54
+ "sass-embedded-win32-x64": "1.75.0"
54
55
  },
55
56
  "dependencies": {
56
57
  "@bufbuild/protobuf": "^1.0.0",