Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
var replace = require( '@stdlib/string/replace' );
var namespace = require( '@stdlib/namespace' );
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var copy = require( '@stdlib/utils/copy' );
var compareValues = require( '@stdlib/_tools/doctest/compare-values' );


Expand Down Expand Up @@ -92,7 +93,7 @@
var b;
var i;

// FIXME: clean-up this logic

Check warning on line 96 in lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: clean-up this logic'

if ( context.meta.filepath ) {
expected = [];
Expand All @@ -105,7 +106,7 @@
};
pkgName = pkg2alias( pkg ) || 'ALIAS';

// TODO: use @stdlib/utils/deep-set once refactored!

Check warning on line 109 in lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: use @stdlib/utils/deep-set once...'
pkgName = pkgName.split( '.' );
N = pkgName.length;
o = scope;
Expand All @@ -120,7 +121,7 @@
o[ key ] = require( pkg ); // eslint-disable-line stdlib/no-dynamic-require
}
}
// TODO: process external aliases *BEFORE* creating the context (and also, what is going on here, given that the return value is ignored?)

Check warning on line 124 in lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: process external aliases *BEFORE*...'
vm.createContext( scope );

examples = section.examples;
Expand All @@ -135,9 +136,12 @@
expected.push( current.output );
match = code.match( RE_ASSIGNMENT );
if ( match && match[ 1 ] ) {
actual.push( scope[ match[ 1 ] ] );
// Snapshot the value, as accumulator-style examples may return
// a shared, mutable reference (e.g., a stateful output array)

Check warning on line 140 in lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Comments should begin with an uppercase character
// that later statements overwrite in place:

Check warning on line 141 in lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Comments should begin with an uppercase character
actual.push( copy( scope[ match[ 1 ] ] ) );
} else {
actual.push( out );
actual.push( copy( out ) );
}
}
} catch ( err ) {
Expand Down Expand Up @@ -175,7 +179,7 @@
alias = alias.split( '.' );
len = alias.length;

// TODO: use @stdlib/utils/deep-set once refactored!

Check warning on line 182 in lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: use @stdlib/utils/deep-set once...'
o = scope;
for ( i = 0; i < len; i++ ) {
key = alias[ i ];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"clean": "make clean",
"check-deps": "make check-deps",
"check-licenses": "make check-licenses",
"postinstall": "tools/scripts/apply_patches"
"postinstall": "if test -f tools/scripts/apply_patches; then tools/scripts/apply_patches; fi"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Planeshifter What is the plan now that the most recent npm version disables running postinstall scripts by default? I suppose we could run the script during make init.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, given it's a postinstall script in the project for which one would run npm install, I don't think it will be skipped. The npm change targets scripts from dependencies (packages in node_modules), not the top-level project's own scripts. And we really only need this script for local development.

},
"homepage": "https://github.com/stdlib-js/stdlib",
"repository": {
Expand Down