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
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
restore-keys: lint-eslint-

- run: npm run lint

- name: Build types
run: npm run build:types

- name: Check types are up to date
run: if [ -n "$(git status types --porcelain)" ]; then echo "Types are out of date. Update them by running 'npm run build:types'"; git status types --porcelain; exit 1; else echo "Types are up to date"; fi
test:
strategy:
fail-fast: false
Expand Down
9 changes: 0 additions & 9 deletions lib/CachedSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,10 @@ class CachedSource extends Source {
constructor(source, cachedData) {
super();
/**
* @private
* @type {Source | (() => Source)}
*/
this._source = source;
/**
* @private
* @type {undefined | string}
*/
this._cachedSource = undefined;
Expand All @@ -139,27 +137,22 @@ class CachedSource extends Source {
// branch count roughly in half.
if (cachedData) {
/**
* @private
* @type {boolean | undefined}
*/
this._cachedSourceType = cachedData.source;
/**
* @private
* @type {Buffer | undefined}
*/
this._cachedBuffer = cachedData.buffer;
/**
* @private
* @type {number | undefined}
*/
this._cachedSize = cachedData.size;
/**
* @private
* @type {BufferedMaps}
*/
this._cachedMaps = cachedData.maps;
/**
* @private
* @type {(string | Buffer)[] | undefined}
*/
this._cachedHashUpdate = cachedData.hash;
Expand Down Expand Up @@ -247,7 +240,6 @@ class CachedSource extends Source {
}

/**
* @private
* @param {BufferEntry} cacheEntry cache entry
* @returns {null | RawSourceMap} raw source map
*/
Expand All @@ -262,7 +254,6 @@ class CachedSource extends Source {
}

/**
* @private
* @returns {undefined | string} cached source
*/
_getCachedSource() {
Expand Down
1 change: 0 additions & 1 deletion lib/CompatSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class CompatSource extends Source {
constructor(sourceLike) {
super();
/**
* @private
* @type {SourceLike}
*/
this._sourceLike = sourceLike;
Expand Down
2 changes: 0 additions & 2 deletions lib/ConcatSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class ConcatSource extends Source {
constructor(...args) {
super();
/**
* @private
* @type {Child[]}
*/
this._children = [];
Expand All @@ -55,7 +54,6 @@ class ConcatSource extends Source {
}

/**
* @private
* @type {boolean}
*/
this._isOptimized = args.length === 0;
Expand Down
3 changes: 0 additions & 3 deletions lib/OriginalSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@ class OriginalSource extends Source {
const isBuffer = Buffer.isBuffer(value);

/**
* @private
* @type {undefined | string}
*/
this._value = isBuffer ? undefined : value;
/**
* @private
* @type {undefined | Buffer}
*/
this._valueAsBuffer = isBuffer ? value : undefined;
/**
* @private
* @type {string}
*/
this._name = name;
Expand Down
2 changes: 0 additions & 2 deletions lib/PrefixSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@ class PrefixSource extends Source {
constructor(prefix, source) {
super();
/**
* @private
* @type {string}
*/
this._prefix = prefix;
/**
* @private
* @type {Source}
*/
this._source =
Expand Down
4 changes: 0 additions & 4 deletions lib/RawSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,18 @@ class RawSource extends Source {
const isBuffer = Buffer.isBuffer(value);
if (isBuffer) {
/**
* @private
* @type {boolean}
*/
this._valueIsBuffer = !convertToString;
/**
* @private
* @type {undefined | string | Buffer}
*/
this._value = convertToString ? undefined : value;
/**
* @private
* @type {undefined | Buffer}
*/
this._valueAsBuffer = value;
/**
* @private
* @type {undefined | string}
*/
this._valueAsString = undefined;
Expand Down
3 changes: 0 additions & 3 deletions lib/ReplaceSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,16 @@ class ReplaceSource extends Source {
constructor(source, name) {
super();
/**
* @private
* @type {Source}
*/
this._source = source;
/**
* @private
* @type {string | undefined}
*/
this._name = name;
/** @type {Replacement[]} */
this._replacements = [];
/**
* @private
* @type {boolean}
*/
this._isSorted = true;
Expand Down
1 change: 0 additions & 1 deletion lib/SizeOnlySource.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class SizeOnlySource extends Source {
constructor(size) {
super();
/**
* @private
* @type {number}
*/
this._size = size;
Expand Down
10 changes: 0 additions & 10 deletions lib/SourceMapSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ class SourceMapSource extends Source {
super();
const valueIsBuffer = Buffer.isBuffer(value);
/**
* @private
* @type {undefined | string}
*/
this._valueAsString = valueIsBuffer ? undefined : value;
/**
* @private
* @type {undefined | Buffer}
*/
this._valueAsBuffer = valueIsBuffer ? value : undefined;
Expand All @@ -61,18 +59,15 @@ class SourceMapSource extends Source {
const sourceMapIsBuffer = Buffer.isBuffer(sourceMap);
const sourceMapIsString = typeof sourceMap === "string";
/**
* @private
* @type {undefined | RawSourceMap}
*/
this._sourceMapAsObject =
sourceMapIsBuffer || sourceMapIsString ? undefined : sourceMap;
/**
* @private
* @type {undefined | string}
*/
this._sourceMapAsString = sourceMapIsString ? sourceMap : undefined;
/**
* @private
* @type {undefined | Buffer}
*/
this._sourceMapAsBuffer = sourceMapIsBuffer ? sourceMap : undefined;
Expand All @@ -90,7 +85,6 @@ class SourceMapSource extends Source {
const innerSourceMapIsBuffer = Buffer.isBuffer(innerSourceMap);
const innerSourceMapIsString = typeof innerSourceMap === "string";
/**
* @private
* @type {undefined | RawSourceMap}
*/

Expand All @@ -99,14 +93,12 @@ class SourceMapSource extends Source {
? undefined
: innerSourceMap || undefined;
/**
* @private
* @type {undefined | string}
*/
this._innerSourceMapAsString = innerSourceMapIsString
? innerSourceMap
: undefined;
/**
* @private
* @type {undefined | Buffer}
*/
this._innerSourceMapAsBuffer = innerSourceMapIsBuffer
Expand Down Expand Up @@ -178,7 +170,6 @@ class SourceMapSource extends Source {
}

/**
* @private
* @returns {undefined | Buffer} buffer
*/
_originalSourceBuffer() {
Expand Down Expand Up @@ -232,7 +223,6 @@ class SourceMapSource extends Source {
}

/**
* @private
* @returns {string} result
*/
_innerSourceMapString() {
Expand Down
Loading
Loading