@unpackjs/core 2.4.2 → 2.4.3

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,961 +1 @@
1
- /// <reference types="node" />
2
- import * as Sass from 'sass';
3
- import * as Webpack from 'webpack';
4
-
5
- type ImporterReturnType =
6
- | { file: string }
7
- | { file?: string | undefined; contents: string }
8
- | Error
9
- | null
10
- | types.Null
11
- | types.Error;
12
-
13
- /**
14
- * The context value is a value that is shared for the duration of a single render.
15
- * The context object is the implicit `this` for importers and sass functions
16
- * that are implemented in javascript.
17
- *
18
- * A render can be detected as asynchronous if the `callback` property is set on the context object.
19
- */
20
- interface Context {
21
- options: Options;
22
- callback: SassRenderCallback | undefined;
23
- [data: string]: any;
24
- }
25
-
26
- interface AsyncContext extends Context {
27
- callback: SassRenderCallback;
28
- }
29
-
30
- interface SyncContext extends Context {
31
- callback: undefined;
32
- }
33
-
34
- type AsyncImporter = (
35
- this: AsyncContext,
36
- url: string,
37
- prev: string,
38
- done: (data: ImporterReturnType) => void,
39
- ) => void;
40
- type SyncImporter = (this: SyncContext, url: string, prev: string) => ImporterReturnType;
41
- type Importer = AsyncImporter | SyncImporter;
42
-
43
- // These function types enumerate up to 6 js arguments. More than that will be incorrectly marked by the compiler as an error.
44
-
45
- // ** Sync Sass functions receiving fixed # of arguments ***
46
- type SyncSassFn = (this: SyncContext, ...$args: types.Value[]) => types.ReturnValue;
47
-
48
- // ** Sync Sass functions receiving variable # of arguments ***
49
- type SyncSassVarArgFn1 = (this: SyncContext, $arg1: types.Value[]) => types.ReturnValue;
50
- type SyncSassVarArgFn2 = (this: SyncContext, $arg1: types.Value, $arg2: types.Value[]) => types.ReturnValue;
51
- type SyncSassVarArgFn3 = (
52
- this: SyncContext,
53
- $arg1: types.Value,
54
- $arg2: types.Value,
55
- $arg3: types.Value[],
56
- ) => types.ReturnValue;
57
- type SyncSassVarArgFn4 = (
58
- this: SyncContext,
59
- $arg1: types.Value,
60
- $arg2: types.Value,
61
- $arg3: types.Value,
62
- $arg4: types.Value[],
63
- ) => types.ReturnValue;
64
- type SyncSassVarArgFn5 = (
65
- this: SyncContext,
66
- $arg1: types.Value,
67
- $arg2: types.Value,
68
- $arg3: types.Value,
69
- $arg4: types.Value,
70
- $arg5: types.Value[],
71
- ) => types.ReturnValue;
72
- type SyncSassVarArgFn6 = (
73
- this: SyncContext,
74
- $arg1: types.Value,
75
- $arg2: types.Value,
76
- $arg3: types.Value,
77
- $arg4: types.Value,
78
- $arg5: types.Value,
79
- $arg6: types.Value[],
80
- ) => types.ReturnValue;
81
-
82
- type SassFunctionCallback = ($result: types.ReturnValue) => void;
83
-
84
- // ** Async Sass functions receiving fixed # of arguments ***
85
- type AsyncSassFn0 = (this: AsyncContext, cb: SassFunctionCallback) => void;
86
- type AsyncSassFn1 = (this: AsyncContext, $arg1: types.Value, cb: SassFunctionCallback) => void;
87
- type AsyncSassFn2 = (
88
- this: AsyncContext,
89
- $arg1: types.Value,
90
- $arg2: types.Value,
91
- cb: SassFunctionCallback,
92
- ) => void;
93
- type AsyncSassFn3 = (
94
- this: AsyncContext,
95
- $arg1: types.Value,
96
- $arg2: types.Value,
97
- $arg3: types.Value,
98
- cb: SassFunctionCallback,
99
- ) => void;
100
- type AsyncSassFn4 = (
101
- this: AsyncContext,
102
- $arg1: types.Value,
103
- $arg2: types.Value,
104
- $arg3: types.Value,
105
- $arg4: types.Value,
106
- cb: SassFunctionCallback,
107
- ) => void;
108
- type AsyncSassFn5 = (
109
- this: AsyncContext,
110
- $arg1: types.Value,
111
- $arg2: types.Value,
112
- $arg3: types.Value,
113
- $arg4: types.Value,
114
- $arg5: types.Value,
115
- cb: SassFunctionCallback,
116
- ) => void;
117
- type AsyncSassFn6 = (
118
- this: AsyncContext,
119
- $arg1: types.Value,
120
- $arg2: types.Value,
121
- $arg3: types.Value,
122
- $arg4: types.Value,
123
- $arg5: types.Value,
124
- $arg6: types.Value,
125
- cb: SassFunctionCallback,
126
- ) => void;
127
-
128
- // *** Async Sass Functions receiving variable # of arguments ***
129
- type AsyncSassVarArgFn1 = (this: AsyncContext, $arg1: types.Value[], cb: SassFunctionCallback) => void;
130
- type AsyncSassVarArgFn2 = (
131
- this: AsyncContext,
132
- $arg1: types.Value,
133
- $arg2: types.Value[],
134
- cb: SassFunctionCallback,
135
- ) => void;
136
- type AsyncSassVarArgFn3 = (
137
- this: AsyncContext,
138
- $arg1: types.Value,
139
- $arg2: types.Value,
140
- $arg3: types.Value[],
141
- cb: SassFunctionCallback,
142
- ) => void;
143
- type AsyncSassVarArgFn4 = (
144
- this: AsyncContext,
145
- $arg1: types.Value,
146
- $arg2: types.Value,
147
- $arg3: types.Value,
148
- $arg4: types.Value[],
149
- cb: SassFunctionCallback,
150
- ) => void;
151
- type AsyncSassVarArgFn5 = (
152
- this: AsyncContext,
153
- $arg1: types.Value,
154
- $arg2: types.Value,
155
- $arg3: types.Value,
156
- $arg4: types.Value,
157
- $arg5: types.Value[],
158
- cb: SassFunctionCallback,
159
- ) => void;
160
- type AsyncSassVarArgFn6 = (
161
- this: AsyncContext,
162
- $arg1: types.Value,
163
- $arg2: types.Value,
164
- $arg3: types.Value,
165
- $arg4: types.Value,
166
- $arg5: types.Value,
167
- $arg6: types.Value[],
168
- cb: SassFunctionCallback,
169
- ) => void;
170
-
171
- type SyncSassFunction =
172
- | SyncSassFn
173
- | SyncSassVarArgFn1
174
- | SyncSassVarArgFn2
175
- | SyncSassVarArgFn3
176
- | SyncSassVarArgFn4
177
- | SyncSassVarArgFn5
178
- | SyncSassVarArgFn6;
179
-
180
- type AsyncSassFunction =
181
- | AsyncSassFn0
182
- | AsyncSassFn1
183
- | AsyncSassFn2
184
- | AsyncSassFn3
185
- | AsyncSassFn4
186
- | AsyncSassFn5
187
- | AsyncSassFn6
188
- | AsyncSassVarArgFn1
189
- | AsyncSassVarArgFn2
190
- | AsyncSassVarArgFn3
191
- | AsyncSassVarArgFn4
192
- | AsyncSassVarArgFn5
193
- | AsyncSassVarArgFn6;
194
-
195
- type SassFunction = SyncSassFunction | AsyncSassFunction;
196
-
197
- type FunctionDeclarations<FunctionType extends SassFunction = SassFunction> = Record<string, FunctionType>;
198
-
199
- interface Options {
200
- file?: string | undefined;
201
- data?: string | undefined;
202
- importer?: Importer | Importer[] | undefined;
203
- functions?: FunctionDeclarations | undefined;
204
- includePaths?: string[] | undefined;
205
- indentedSyntax?: boolean | undefined;
206
- indentType?: string | undefined;
207
- indentWidth?: number | undefined;
208
- linefeed?: string | undefined;
209
- omitSourceMapUrl?: boolean | undefined;
210
- outFile?: string | undefined;
211
- outputStyle?: "compact" | "compressed" | "expanded" | "nested" | undefined;
212
- precision?: number | undefined;
213
- sourceComments?: boolean | undefined;
214
- sourceMap?: boolean | string | undefined;
215
- sourceMapContents?: boolean | undefined;
216
- sourceMapEmbed?: boolean | undefined;
217
- sourceMapRoot?: string | undefined;
218
- [key: string]: any;
219
- }
220
-
221
- /**
222
- * The error object returned to javascript by sass's render methods.
223
- *
224
- * This is not the same thing as types.Error.
225
- */
226
- interface SassError extends Error {
227
- message: string;
228
- line: number;
229
- column: number;
230
- status: number;
231
- file: string;
232
- }
233
-
234
- /**
235
- * The result of successfully compiling a Sass file.
236
- */
237
- interface Result {
238
- css: Buffer;
239
- map: Buffer;
240
- stats: {
241
- entry: string;
242
- start: number;
243
- end: number;
244
- duration: number;
245
- includedFiles: string[];
246
- };
247
- }
248
- type SassRenderCallback = (err: SassError, result: Result) => any;
249
-
250
- // Note, most node-sass constructors can be invoked as a function or with a new
251
- // operator. The exception: the types Null and Boolean for which new is
252
- // forbidden.
253
- //
254
- // Because of this, the new-able object notation is used here, a class does not
255
- // work for these types.
256
- declare namespace types {
257
- /* tslint:disable:ban-types */
258
- /**
259
- * Values that are received from Sass as an argument to a javascript function.
260
- */
261
- export type Value = Null | Number | String | Color | Boolean | List | Map;
262
-
263
- /**
264
- * Values that are legal to return to Sass from a javascript function.
265
- */
266
- export type ReturnValue = Value | Error;
267
-
268
- // *** Sass Null ***
269
-
270
- export interface Null {
271
- /**
272
- * This property doesn't exist, but its presence forces the typescript
273
- * compiler to properly type check this type. Without it, it seems to
274
- * allow things that aren't types.Null to match it in case statements and
275
- * assignments.
276
- */
277
- readonly ___NULL___: unique symbol;
278
- }
279
-
280
- interface NullConstructor {
281
- (): Null;
282
- NULL: Null;
283
- }
284
- export const Null: NullConstructor;
285
-
286
- // *** Sass Number ***
287
-
288
- export interface Number {
289
- getValue(): number;
290
- setValue(n: number): void;
291
- getUnit(): string;
292
- setUnit(u: string): void;
293
- }
294
- interface NumberConstructor {
295
- /**
296
- * Constructs a new Sass number. Does not require use of the `new` keyword.
297
- */
298
- new(value: number, unit?: string): Number;
299
- /**
300
- * Constructs a new Sass number. Can also be used with the `new` keyword.
301
- */
302
- (value: number, unit?: string): Number;
303
- }
304
-
305
- export const Number: NumberConstructor;
306
-
307
- // *** Sass String ***
308
-
309
- export interface String {
310
- getValue(): string;
311
- setValue(s: string): void;
312
- }
313
-
314
- interface StringConstructor {
315
- /**
316
- * Constructs a new Sass string. Does not require use of the `new` keyword.
317
- */
318
- new(value: string): String;
319
- /**
320
- * Constructs a new Sass string. Can also be used with the `new` keyword.
321
- */
322
- (value: string): String;
323
- }
324
-
325
- export const String: StringConstructor;
326
-
327
- // *** Sass Color ***
328
-
329
- export interface Color {
330
- /**
331
- * Get the red component of the color.
332
- * @returns integer between 0 and 255 inclusive;
333
- */
334
- getR(): number;
335
- /**
336
- * Set the red component of the color.
337
- * @returns integer between 0 and 255 inclusive;
338
- */
339
- setR(r: number): void;
340
- /**
341
- * Get the green component of the color.
342
- * @returns integer between 0 and 255 inclusive;
343
- */
344
- getG(): number;
345
- /**
346
- * Set the green component of the color.
347
- * @param g integer between 0 and 255 inclusive;
348
- */
349
- setG(g: number): void;
350
- /**
351
- * Get the blue component of the color.
352
- * @returns integer between 0 and 255 inclusive;
353
- */
354
- getB(): number;
355
- /**
356
- * Set the blue component of the color.
357
- * @param b integer between 0 and 255 inclusive;
358
- */
359
- setB(b: number): void;
360
- /**
361
- * Get the alpha transparency component of the color.
362
- * @returns number between 0 and 1 inclusive;
363
- */
364
- getA(): number;
365
- /**
366
- * Set the alpha component of the color.
367
- * @param a number between 0 and 1 inclusive;
368
- */
369
- setA(a: number): void;
370
- }
371
-
372
- interface ColorConstructor {
373
- /**
374
- * Constructs a new Sass color given the RGBA component values. Do not invoke with the `new` keyword.
375
- *
376
- * @param r integer 0-255 inclusive
377
- * @param g integer 0-255 inclusive
378
- * @param b integer 0-255 inclusive
379
- * @param [a] float 0 - 1 inclusive
380
- * @returns a SassColor instance.
381
- */
382
- new(r: number, g: number, b: number, a?: number): Color;
383
-
384
- /**
385
- * Constructs a new Sass color given a 4 byte number. Do not invoke with the `new` keyword.
386
- *
387
- * If a single number is passed it is assumed to be a number that contains
388
- * all the components which are extracted using bitmasks and bitshifting.
389
- *
390
- * @param hexN A number that is usually written in hexadecimal form. E.g. 0xff0088cc.
391
- * @returns a Sass Color instance.
392
- * @example
393
- * // Comparison with byte array manipulation
394
- * let a = new ArrayBuffer(4);
395
- * let hexN = 0xCCFF0088; // 0xAARRGGBB
396
- * let a32 = new Uint32Array(a); // Uint32Array [ 0 ]
397
- * a32[0] = hexN;
398
- * let a8 = new Uint8Array(a); // Uint8Array [ 136, 0, 255, 204 ]
399
- * let componentBytes = [a8[2], a8[1], a8[0], a8[3] / 255] // [ 136, 0, 255, 0.8 ]
400
- * let c = sass.types.Color(hexN);
401
- * let components = [c.getR(), c.getG(), c.getR(), c.getA()] // [ 136, 0, 255, 0.8 ]
402
- * assert.deepEqual(componentBytes, components); // does not raise.
403
- */
404
- new(hexN: number): Color;
405
-
406
- /**
407
- * Constructs a new Sass color given the RGBA component values. Do not invoke with the `new` keyword.
408
- *
409
- * @param r integer 0-255 inclusive
410
- * @param g integer 0-255 inclusive
411
- * @param b integer 0-255 inclusive
412
- * @param [a] float 0 - 1 inclusive
413
- * @returns a SassColor instance.
414
- */
415
- (r: number, g: number, b: number, a?: number): Color;
416
-
417
- /**
418
- * Constructs a new Sass color given a 4 byte number. Do not invoke with the `new` keyword.
419
- *
420
- * If a single number is passed it is assumed to be a number that contains
421
- * all the components which are extracted using bitmasks and bitshifting.
422
- *
423
- * @param hexN A number that is usually written in hexadecimal form. E.g. 0xff0088cc.
424
- * @returns a Sass Color instance.
425
- * @example
426
- * // Comparison with byte array manipulation
427
- * let a = new ArrayBuffer(4);
428
- * let hexN = 0xCCFF0088; // 0xAARRGGBB
429
- * let a32 = new Uint32Array(a); // Uint32Array [ 0 ]
430
- * a32[0] = hexN;
431
- * let a8 = new Uint8Array(a); // Uint8Array [ 136, 0, 255, 204 ]
432
- * let componentBytes = [a8[2], a8[1], a8[0], a8[3] / 255] // [ 136, 0, 255, 0.8 ]
433
- * let c = sass.types.Color(hexN);
434
- * let components = [c.getR(), c.getG(), c.getR(), c.getA()] // [ 136, 0, 255, 0.8 ]
435
- * assert.deepEqual(componentBytes, components); // does not raise.
436
- */
437
- (hexN: number): Color;
438
- }
439
-
440
- export const Color: ColorConstructor;
441
-
442
- // *** Sass Boolean ***
443
-
444
- export interface Boolean {
445
- getValue(): boolean;
446
- }
447
-
448
- interface BooleanConstructor {
449
- (bool: boolean): Boolean;
450
- TRUE: Boolean;
451
- FALSE: Boolean;
452
- }
453
-
454
- export const Boolean: BooleanConstructor;
455
-
456
- // *** Sass List ***
457
-
458
- export interface Enumerable {
459
- getValue(index: number): Value;
460
- setValue(index: number, value: Value): void;
461
- getLength(): number;
462
- }
463
-
464
- export interface List extends Enumerable {
465
- getSeparator(): boolean;
466
- setSeparator(isComma: boolean): void;
467
- }
468
- interface ListConstructor {
469
- new(length: number, commaSeparator?: boolean): List;
470
- (length: number, commaSeparator?: boolean): List;
471
- }
472
- export const List: ListConstructor;
473
-
474
- // *** Sass Map ***
475
-
476
- export interface Map extends Enumerable {
477
- getKey(index: number): Value;
478
- setKey(index: number, key: Value): void;
479
- }
480
- interface MapConstructor {
481
- new(length: number): Map;
482
- (length: number): Map;
483
- }
484
- export const Map: MapConstructor;
485
-
486
- // *** Sass Error ***
487
-
488
- export interface Error {
489
- /**
490
- * This property doesn't exist, but its presence forces the typescript
491
- * compiler to properly type check this type. Without it, it seems to
492
- * allow things that aren't types.Error to match it in case statements and
493
- * assignments.
494
- */
495
- readonly ___SASS_ERROR___: unique symbol;
496
- // why isn't there a getMessage() method?
497
- }
498
-
499
- interface ErrorConstructor {
500
- /**
501
- * An error return value for async functions.
502
- * For synchronous functions, this can be returned or a standard error object can be thrown.
503
- */
504
- new(message: string): Error;
505
- /**
506
- * An error return value for async functions.
507
- * For synchronous functions, this can be returned or a standard error object can be thrown.
508
- */
509
- (message: string): Error;
510
- }
511
- export const Error: ErrorConstructor;
512
-
513
- /* eslint-enable @typescript-eslint/ban-types */
514
- /* tslint:enable:ban-types */
515
- }
516
-
517
- interface LoaderOptions {
518
- /**
519
- * The special `implementation` option determines which implementation of Sass
520
- * to use.
521
- *
522
- * By default the loader resolve the implementation based on your dependencies.
523
- * Just add required implementation to `package.json` (`node-sass` or `sass`
524
- * package) and install dependencies.
525
- *
526
- * Example where the `sass-loader` loader uses the `sass` (`dart-sass`)
527
- * implementation:
528
- *
529
- * **package.json**
530
- *
531
- * ```json
532
- * {
533
- * "devDependencies": {
534
- * "sass-loader": "^7.2.0",
535
- * "sass": "^1.22.10"
536
- * }
537
- * }
538
- * ```
539
- *
540
- * Example where the `sass-loader` loader uses the `node-sass` implementation:
541
- *
542
- * **package.json**
543
- *
544
- * ```json
545
- * {
546
- * "devDependencies": {
547
- * "sass-loader": "^7.2.0",
548
- * "node-sass": "^4.0.0"
549
- * }
550
- * }
551
- * ```
552
- *
553
- * Beware the situation when `node-sass` and `sass` were installed! By default
554
- * the `sass-loader` prefers `node-sass`. In order to avoid this situation you
555
- * can use the `implementation` option.
556
- *
557
- * The `implementation` options either accepts `node-sass` or `sass` (`Dart Sass`)
558
- * as a module.
559
- *
560
- * For example, to use Dart Sass, you'd pass:
561
- *
562
- * ```js
563
- * module.exports = {
564
- * module: {
565
- * rules: [
566
- * {
567
- * test: /\.s[ac]ss$/i,
568
- * use: [
569
- * 'style-loader',
570
- * 'css-loader',
571
- * {
572
- * loader: 'sass-loader',
573
- * options: {
574
- * // Prefer `dart-sass`
575
- * implementation: require('sass'),
576
- * },
577
- * },
578
- * ],
579
- * },
580
- * ],
581
- * },
582
- * };
583
- * ```
584
- *
585
- * Note that when using `sass` (`Dart Sass`), **synchronous compilation is twice
586
- * as fast as asynchronous compilation** by default, due to the overhead of
587
- * asynchronous callbacks. To avoid this overhead, you can use the [fibers](https://www.npmjs.com/package/fibers)
588
- * package to call asynchronous importers from the synchronous code path.
589
- *
590
- * We automatically inject the [`fibers`](https://github.com/laverdet/node-fibers)
591
- * package (setup `sassOptions.fiber`) if is possible (i.e. you need install the
592
- * [`fibers`](https://github.com/laverdet/node-fibers) package).
593
- *
594
- * **package.json**
595
- *
596
- * ```json
597
- * {
598
- * "devDependencies": {
599
- * "sass-loader": "^7.2.0",
600
- * "sass": "^1.22.10",
601
- * "fibers": "^4.0.1"
602
- * }
603
- * }
604
- * ```
605
- *
606
- * You can disable automatically injecting the [`fibers`](https://github.com/laverdet/node-fibers)
607
- * package by passing a `false` value for the `sassOptions.fiber` option.
608
- *
609
- * **webpack.config.js**
610
- *
611
- * ```js
612
- * module.exports = {
613
- * module: {
614
- * rules: [
615
- * {
616
- * test: /\.s[ac]ss$/i,
617
- * use: [
618
- * 'style-loader',
619
- * 'css-loader',
620
- * {
621
- * loader: 'sass-loader',
622
- * options: {
623
- * implementation: require('sass'),
624
- * sassOptions: {
625
- * fiber: false,
626
- * },
627
- * },
628
- * },
629
- * ],
630
- * },
631
- * ],
632
- * },
633
- * };
634
- * ```
635
- *
636
- * You can also pass the `fiber` value using this code:
637
- *
638
- * **webpack.config.js**
639
- *
640
- * ```js
641
- * module.exports = {
642
- * module: {
643
- * rules: [
644
- * {
645
- * test: /\.s[ac]ss$/i,
646
- * use: [
647
- * 'style-loader',
648
- * 'css-loader',
649
- * {
650
- * loader: 'sass-loader',
651
- * options: {
652
- * implementation: require('sass'),
653
- * sassOptions: {
654
- * fiber: require('fibers'),
655
- * },
656
- * },
657
- * },
658
- * ],
659
- * },
660
- * ],
661
- * },
662
- * };
663
- * ```
664
- */
665
- implementation?: any;
666
-
667
- /**
668
- * Options for [Node Sass](https://github.com/sass/node-sass) or [Dart Sass](http://sass-lang.com/dart-sass)
669
- * implementation.
670
- *
671
- * > ℹ️ The `indentedSyntax` option has `true` value for the `sass` extension.
672
- *
673
- * > ℹ️ Options such as `file` and `outFile` are unavailable.
674
- *
675
- * > ℹ️ We recommend not to use the `sourceMapContents`, `sourceMapEmbed`,
676
- * `sourceMapRoot` options because `sass-loader` automatically sets these
677
- * options.
678
- *
679
- * There is a slight difference between the `node-sass` and `sass` (`Dart Sass`)
680
- * options. Please consult documentation before using them:
681
- *
682
- * - [Node Sass documentation](https://github.com/sass/node-sass/#options) for
683
- * all available `node-sass` options.
684
- * - [Dart Sass documentation](https://github.com/sass/dart-sass#javascript-api)
685
- * for all available `sass` options.
686
- *
687
- * #### `Object`
688
- *
689
- * Use and object for the Sass implementation setup.
690
- *
691
- * **webpack.config.js**
692
- *
693
- * ```js
694
- * module.exports = {
695
- * module: {
696
- * rules: [
697
- * {
698
- * test: /\.s[ac]ss$/i,
699
- * use: [
700
- * 'style-loader',
701
- * 'css-loader',
702
- * {
703
- * loader: 'sass-loader',
704
- * options: {
705
- * sassOptions: {
706
- * indentWidth: 4,
707
- * includePaths: ['absolute/path/a', 'absolute/path/b'],
708
- * },
709
- * },
710
- * },
711
- * ],
712
- * },
713
- * ],
714
- * },
715
- * };
716
- * ```
717
- *
718
- * #### `Function`
719
- *
720
- * Allows to setup the Sass implementation by setting different options based on
721
- * the loader context.
722
- *
723
- * ```js
724
- * module.exports = {
725
- * module: {
726
- * rules: [
727
- * {
728
- * test: /\.s[ac]ss$/i,
729
- * use: [
730
- * 'style-loader',
731
- * 'css-loader',
732
- * {
733
- * loader: 'sass-loader',
734
- * options: {
735
- * sassOptions: (loaderContext) => {
736
- * // More information about available properties https://webpack.js.org/api/loaders/
737
- * const { resourcePath, rootContext } = loaderContext;
738
- * const relativePath = path.relative(rootContext, resourcePath);
739
- *
740
- * if (relativePath === 'styles/foo.scss') {
741
- * return {
742
- * includePaths: ['absolute/path/c', 'absolute/path/d'],
743
- * };
744
- * }
745
- *
746
- * return {
747
- * includePaths: ['absolute/path/a', 'absolute/path/b'],
748
- * };
749
- * },
750
- * },
751
- * },
752
- * ],
753
- * },
754
- * ],
755
- * },
756
- * };
757
- * ```
758
- */
759
- sassOptions?: LoaderOptions.SassOptions | LoaderOptions.Callback<LoaderOptions.SassOptions> | undefined;
760
-
761
- /**
762
- * Prepends `Sass`/`SCSS` code before the actual entry file. In this case, the
763
- * `sass-loader` will not override the `data` option but just append the entry's
764
- * content.
765
- *
766
- * This is especially useful when some of your Sass variables depend on the
767
- * environment:
768
- *
769
- * > ℹ Since you're injecting code, this will break the source mappings in your
770
- * entry file. Often there's a simpler solution than this, like multiple Sass
771
- * entry files.
772
- *
773
- * #### `String`
774
- *
775
- * ```js
776
- * module.exports = {
777
- * module: {
778
- * rules: [
779
- * {
780
- * test: /\.s[ac]ss$/i,
781
- * use: [
782
- * 'style-loader',
783
- * 'css-loader',
784
- * {
785
- * loader: 'sass-loader',
786
- * options: {
787
- * prependData: '$env: ' + process.env.NODE_ENV + ';',
788
- * },
789
- * },
790
- * ],
791
- * },
792
- * ],
793
- * },
794
- * };
795
- * ```
796
- *
797
- * #### `Function`
798
- *
799
- * ```js
800
- * module.exports = {
801
- * module: {
802
- * rules: [
803
- * {
804
- * test: /\.s[ac]ss$/i,
805
- * use: [
806
- * 'style-loader',
807
- * 'css-loader',
808
- * {
809
- * loader: 'sass-loader',
810
- * options: {
811
- * prependData: (loaderContext) => {
812
- * // More information about available properties https://webpack.js.org/api/loaders/
813
- * const { resourcePath, rootContext } = loaderContext;
814
- * const relativePath = path.relative(rootContext, resourcePath);
815
- *
816
- * if (relativePath === 'styles/foo.scss') {
817
- * return '$value: 100px;';
818
- * }
819
- *
820
- * return '$value: 200px;';
821
- * },
822
- * },
823
- * },
824
- * ],
825
- * },
826
- * ],
827
- * },
828
- * };
829
- * ```
830
- *
831
- * @default
832
- * undefined
833
- */
834
- additionalData?: string | LoaderOptions.Callback<string> | undefined;
835
-
836
- /**
837
- * Enables/Disables generation of source maps.
838
- *
839
- * By default generation of source maps depends on the [`devtool`](https://webpack.js.org/configuration/devtool/)
840
- * option. All values enable source map generation except `eval` and `false`
841
- * value.
842
- *
843
- * **webpack.config.js**
844
- *
845
- * ```js
846
- * module.exports = {
847
- * module: {
848
- * rules: [
849
- * {
850
- * test: /\.s[ac]ss$/i,
851
- * use: [
852
- * 'style-loader',
853
- * {
854
- * loader: 'css-loader',
855
- * options: {
856
- * sourceMap: true,
857
- * },
858
- * },
859
- * {
860
- * loader: 'sass-loader',
861
- * options: {
862
- * sourceMap: true,
863
- * },
864
- * },
865
- * ],
866
- * },
867
- * ],
868
- * },
869
- * };
870
- * ```
871
- *
872
- * > ℹ In some rare cases `node-sass` can output invalid source maps (it is a
873
- * `node-sass` bug). In order to avoid this, you can try to update `node-sass`
874
- * to latest version or you can try to set within `sassOptions` the
875
- * `outputStyle` option to `compressed`.
876
- *
877
- * @default
878
- * Depends on the `compiler.devtool` value.
879
- */
880
- sourceMap?: boolean | undefined;
881
-
882
- /**
883
- * Enables/Disables the default Webpack importer.
884
- *
885
- * This can improve performance in some cases. Use it with caution because
886
- * aliases and `@import` at-rules starting with `~` will not work. You can pass
887
- * own `importer` to solve this (see [`importer docs`](https://github.com/sass/node-sass#importer--v200---experimental)).
888
- *
889
- * **webpack.config.js**
890
- *
891
- * ```js
892
- * module.exports = {
893
- * module: {
894
- * rules: [
895
- * {
896
- * test: /\.s[ac]ss$/i,
897
- * use: [
898
- * 'style-loader',
899
- * 'css-loader',
900
- * {
901
- * loader: 'sass-loader',
902
- * options: {
903
- * webpackImporter: false,
904
- * },
905
- * },
906
- * ],
907
- * },
908
- * ],
909
- * },
910
- * };
911
- * ```
912
- *
913
- * @default
914
- * true
915
- */
916
- webpackImporter?: boolean | undefined;
917
- /**
918
- * Treats the @warn rule as a webpack warning.
919
- *
920
- * Note: It will be true by default in the next major release.
921
- *
922
- * **webpack.config.js**
923
- *
924
- * ```js
925
- * module.exports = {
926
- * module: {
927
- * rules: [
928
- * {
929
- * test: /\.s[ac]ss$/i,
930
- * use: [
931
- * 'style-loader',
932
- * 'css-loader',
933
- * {
934
- * loader: 'sass-loader',
935
- * options: {
936
- * warnRuleAsWarning: false,
937
- * },
938
- * },
939
- * ],
940
- * },
941
- * ],
942
- * },
943
- * };
944
- * ```
945
- */
946
- warnRuleAsWarning?: boolean | undefined;
947
- }
948
-
949
- declare namespace LoaderOptions {
950
- type Callback<T> = (content: string | Buffer, loaderContext: Webpack.loader.LoaderContext) => T;
951
-
952
- type SassOptions = Options | Sass.LegacyOptions<"sync">;
953
- }
954
-
955
- declare function loader(content: string): void;
956
-
957
- declare namespace loader {
958
- type Options = LoaderOptions;
959
- }
960
-
961
- export { loader as default };
1
+ export = any;
@@ -4795,19 +4795,19 @@
4795
4795
  }
4796
4796
  });
4797
4797
  },
4798
- 72: (module, __unused_webpack_exports, __nccwpck_require__) => {
4798
+ 991: (module, __unused_webpack_exports, __nccwpck_require__) => {
4799
4799
  "use strict";
4800
- const loader = __nccwpck_require__(30);
4800
+ const loader = __nccwpck_require__(257);
4801
4801
  module.exports = loader.default;
4802
4802
  },
4803
- 30: (__unused_webpack_module, exports, __nccwpck_require__) => {
4803
+ 257: (__unused_webpack_module, exports, __nccwpck_require__) => {
4804
4804
  "use strict";
4805
4805
  Object.defineProperty(exports, "__esModule", { value: true });
4806
4806
  exports["default"] = void 0;
4807
4807
  var _url = _interopRequireDefault(__nccwpck_require__(16));
4808
4808
  var _path = _interopRequireDefault(__nccwpck_require__(928));
4809
- var _options = _interopRequireDefault(__nccwpck_require__(595));
4810
- var _utils = __nccwpck_require__(927);
4809
+ var _options = _interopRequireDefault(__nccwpck_require__(756));
4810
+ var _utils = __nccwpck_require__(924);
4811
4811
  function _interopRequireDefault(e) {
4812
4812
  return e && e.__esModule ? e : { default: e };
4813
4813
  }
@@ -4917,7 +4917,7 @@
4917
4917
  }
4918
4918
  var _default = (exports["default"] = loader);
4919
4919
  },
4920
- 927: (__unused_webpack_module, exports, __nccwpck_require__) => {
4920
+ 924: (__unused_webpack_module, exports, __nccwpck_require__) => {
4921
4921
  "use strict";
4922
4922
  Object.defineProperty(exports, "__esModule", { value: true });
4923
4923
  exports.errorFactory = errorFactory;
@@ -5582,7 +5582,7 @@
5582
5582
  "use strict";
5583
5583
  module.exports = require("url");
5584
5584
  },
5585
- 595: (module) => {
5585
+ 756: (module) => {
5586
5586
  "use strict";
5587
5587
  module.exports = JSON.parse(
5588
5588
  '{"title":"Sass Loader options","type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used.","link":"https://github.com/webpack-contrib/sass-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"api":{"description":"Switch between old and modern API for `sass` (`Dart Sass`) and `Sass Embedded` implementations.","link":"https://github.com/webpack-contrib/sass-loader#sassoptions","enum":["legacy","modern","modern-compiler"]},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation.","link":"https://github.com/webpack-contrib/sass-loader#sassoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Sass`/`SCSS` code before the actual entry file.","link":"https://github.com/webpack-contrib/sass-loader#additionaldata","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/sass-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/sass-loader#webpackimporter","type":"boolean"},"warnRuleAsWarning":{"description":"Treats the \'@warn\' rule as a webpack warning.","link":"https://github.com/webpack-contrib/sass-loader#warnruleaswarning","type":"boolean"}},"additionalProperties":false}',
@@ -5612,6 +5612,6 @@
5612
5612
  }
5613
5613
  if (typeof __nccwpck_require__ !== "undefined")
5614
5614
  __nccwpck_require__.ab = __dirname + "/";
5615
- var __webpack_exports__ = __nccwpck_require__(72);
5615
+ var __webpack_exports__ = __nccwpck_require__(991);
5616
5616
  module.exports = __webpack_exports__;
5617
5617
  })();
@@ -3,7 +3,7 @@
3
3
  // MIT-style license that can be found in the LICENSE file or at
4
4
  // https://opensource.org/licenses/MIT.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NULL = exports.FALSE = exports.TRUE = exports.Logger = exports.info = exports.renderSync = exports.render = exports.Version = exports.deprecations = exports.Compiler = exports.initCompiler = exports.AsyncCompiler = exports.initAsyncCompiler = exports.NodePackageImporter = exports.compileStringAsync = exports.compileAsync = exports.compileString = exports.compile = exports.Exception = exports.types = exports.SassCalculation = exports.CalculationInterpolation = exports.CalculationOperation = exports.sassNull = exports.Value = exports.SassString = exports.SassNumber = exports.SassMixin = exports.SassMap = exports.SassFunction = exports.SassColor = exports.sassTrue = exports.sassFalse = exports.SassArgumentList = exports.SassList = void 0;
6
+ exports.NULL = exports.FALSE = exports.TRUE = exports.Logger = exports.info = exports.renderSync = exports.render = exports.Version = exports.deprecations = exports.Compiler = exports.initCompiler = exports.AsyncCompiler = exports.initAsyncCompiler = exports.NodePackageImporter = exports.compileStringAsync = exports.compileAsync = exports.compileString = exports.compile = exports.Exception = exports.types = exports.SassCalculation = exports.CalculationInterpolation = exports.CalculationOperation = exports.sassNull = exports.Value = exports.SassString = exports.SassNumber = exports.SassMixin = exports.SassMap = exports.SassFunction = exports.SassColor = exports.sassTrue = exports.sassFalse = exports.SassBoolean = exports.SassArgumentList = exports.SassList = void 0;
7
7
  const pkg = require("../package.json");
8
8
  const boolean_1 = require("./src/value/boolean");
9
9
  const null_1 = require("./src/value/null");
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "SassList", { enumerable: true, get: function ()
12
12
  var argument_list_1 = require("./src/value/argument-list");
13
13
  Object.defineProperty(exports, "SassArgumentList", { enumerable: true, get: function () { return argument_list_1.SassArgumentList; } });
14
14
  var boolean_2 = require("./src/value/boolean");
15
+ Object.defineProperty(exports, "SassBoolean", { enumerable: true, get: function () { return boolean_2.SassBoolean; } });
15
16
  Object.defineProperty(exports, "sassFalse", { enumerable: true, get: function () { return boolean_2.sassFalse; } });
16
17
  Object.defineProperty(exports, "sassTrue", { enumerable: true, get: function () { return boolean_2.sassTrue; } });
17
18
  var color_1 = require("./src/value/color");
@@ -51,7 +52,8 @@ Object.defineProperty(exports, "initCompiler", { enumerable: true, get: function
51
52
  Object.defineProperty(exports, "Compiler", { enumerable: true, get: function () { return sync_1.Compiler; } });
52
53
  var deprecations_1 = require("./src/deprecations");
53
54
  Object.defineProperty(exports, "deprecations", { enumerable: true, get: function () { return deprecations_1.deprecations; } });
54
- Object.defineProperty(exports, "Version", { enumerable: true, get: function () { return deprecations_1.Version; } });
55
+ var version_1 = require("./src/version");
56
+ Object.defineProperty(exports, "Version", { enumerable: true, get: function () { return version_1.Version; } });
55
57
  var legacy_1 = require("./src/legacy");
56
58
  Object.defineProperty(exports, "render", { enumerable: true, get: function () { return legacy_1.render; } });
57
59
  Object.defineProperty(exports, "renderSync", { enumerable: true, get: function () { return legacy_1.renderSync; } });
package/dist/index.cjs CHANGED
@@ -666,7 +666,7 @@ for(var __webpack_i__ in (()=>{
666
666
  apply(compiler) {
667
667
  let meta = JSON.stringify({
668
668
  name: jsMinify_PLUGIN_NAME,
669
- version: "2.4.2",
669
+ version: "2.4.3",
670
670
  options: this.minifyOptions
671
671
  });
672
672
  compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
@@ -1881,7 +1881,7 @@ for(var __webpack_i__ in (()=>{
1881
1881
  (null == (_req_headers_accept = req.headers.accept) ? void 0 : _req_headers_accept.includes('html')) && (req.url = '/index.html'), next();
1882
1882
  }), isRspack && middlewares.unshift(core_namespaceObject.experiments.lazyCompilationMiddleware(compiler)), middlewares);
1883
1883
  let server = new (external_webpack_dev_server_default())(devServerOptions, compiler);
1884
- await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.2`)} ${colors.dim(`ready in ${colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`), function(port) {
1884
+ await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.3`)} ${colors.dim(`ready in ${colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`), function(port) {
1885
1885
  let addressUrls = getAddressUrls({
1886
1886
  port
1887
1887
  });
@@ -1935,7 +1935,7 @@ for(var __webpack_i__ in (()=>{
1935
1935
  ]
1936
1936
  }, _context = {
1937
1937
  callerName,
1938
- version: "2.4.2"
1938
+ version: "2.4.3"
1939
1939
  }, { plugins, bundlerConfig, ...rest } = mergeConfig(defaultConfig, config);
1940
1940
  for (let plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
1941
1941
  ..._context,
@@ -1950,7 +1950,7 @@ for(var __webpack_i__ in (()=>{
1950
1950
  };
1951
1951
  return {
1952
1952
  build: async ({ watch } = {})=>{
1953
- setNodeEnv(watch ? 'development' : 'production'), console.log(colors.rainbow(`${callerName} v2.4.2`), colors.green(`building for ${watch ? 'development' : 'production'}...`)), unpackBuild(await resolveConfig());
1953
+ setNodeEnv(watch ? 'development' : 'production'), console.log(colors.rainbow(`${callerName} v2.4.3`), colors.green(`building for ${watch ? 'development' : 'production'}...`)), unpackBuild(await resolveConfig());
1954
1954
  },
1955
1955
  dev: async ()=>{
1956
1956
  global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0), unpackDev(await resolveConfig());
package/dist/index.js CHANGED
@@ -592,7 +592,7 @@ class JsMinifyPlugin {
592
592
  apply(compiler) {
593
593
  let meta = JSON.stringify({
594
594
  name: jsMinify_PLUGIN_NAME,
595
- version: "2.4.2",
595
+ version: "2.4.3",
596
596
  options: this.minifyOptions
597
597
  });
598
598
  compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
@@ -1795,7 +1795,7 @@ async function unpackDev(originalUnpackConfig) {
1795
1795
  (null == (_req_headers_accept = req.headers.accept) ? void 0 : _req_headers_accept.includes('html')) && (req.url = '/index.html'), next();
1796
1796
  }), isRspack && middlewares.unshift(experiments.lazyCompilationMiddleware(compiler)), middlewares);
1797
1797
  let server = new webpack_dev_server(devServerOptions, compiler);
1798
- await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.2`)} ${colors.dim(`ready in ${colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`), getAddressUrls({
1798
+ await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.3`)} ${colors.dim(`ready in ${colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`), getAddressUrls({
1799
1799
  port: port
1800
1800
  }).forEach((addr)=>{
1801
1801
  let url;
@@ -1846,7 +1846,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
1846
1846
  ]
1847
1847
  }, _context = {
1848
1848
  callerName,
1849
- version: "2.4.2"
1849
+ version: "2.4.3"
1850
1850
  }, { plugins, bundlerConfig, ...rest } = mergeConfig(defaultConfig, config);
1851
1851
  for (let plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
1852
1852
  ..._context,
@@ -1861,7 +1861,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
1861
1861
  };
1862
1862
  return {
1863
1863
  build: async ({ watch } = {})=>{
1864
- setNodeEnv(watch ? 'development' : 'production'), console.log(colors.rainbow(`${callerName} v2.4.2`), colors.green(`building for ${watch ? 'development' : 'production'}...`)), unpackBuild(await resolveConfig());
1864
+ setNodeEnv(watch ? 'development' : 'production'), console.log(colors.rainbow(`${callerName} v2.4.3`), colors.green(`building for ${watch ? 'development' : 'production'}...`)), unpackBuild(await resolveConfig());
1865
1865
  },
1866
1866
  dev: async ()=>{
1867
1867
  global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0), unpackDev(await resolveConfig());
@@ -1,6 +1,6 @@
1
1
  import type { Configuration, LoaderContext } from '@rspack/core';
2
- import type SassLoader from '../../compiled/sass-loader';
3
2
  import type { AcceptedPlugin, ProcessOptions } from 'postcss';
3
+ import type { Options as SassOptions } from 'sass-embedded';
4
4
  import type { ChunkSplit } from './chunkSplit';
5
5
  import type { LightningcssMinifyPluginOptions, LightningcssTransformOptions } from './lightningcss';
6
6
  import type { OxcMinifyPluginOptions } from './oxc';
@@ -75,7 +75,7 @@ export type UnpackConfig = {
75
75
  postcss?: PostCSSOptions | ((loaderContext: LoaderContext) => PostCSSOptions);
76
76
  lightningcss?: LightningcssTransformOptions;
77
77
  less?: Less.Options;
78
- sass?: SassLoader.Options['sassOptions'];
78
+ sass?: SassOptions<'async'>;
79
79
  };
80
80
  resolve?: {
81
81
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAA;AACnG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,MAAM,MAAM,oBAA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,CAAC,EAAE;QACZ;;WAEG;QACH,GAAG,CAAC,EAAE,OAAO,CAAA;KACd,CAAA;IACD;;OAEG;IACH,GAAG,CAAC,EACA,OAAO,GACP;QACE;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;QACvB;;WAEG;QACH,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACL;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC9B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unpackjs/core",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -28,10 +28,10 @@
28
28
  "devDependencies": {
29
29
  "@types/cors": "2.8.19",
30
30
  "@types/express": "5.0.3",
31
- "@types/sass-loader": "8.0.9",
32
31
  "css-loader": "7.1.2",
33
32
  "less-loader": "12.3.0",
34
33
  "postcss-loader": "8.1.1",
34
+ "sass-embedded": "1.89.2",
35
35
  "sass-loader": "16.0.5",
36
36
  "semver": "7.7.2",
37
37
  "style-loader": "4.0.0",