Skip to content

Commit 5f3fe54

Browse files
committed
Update namespace
This commit reverts making the plot "namespace" something of a hybrid, where it is both non-conventional (i.e., a function, not an object) and conventional (i.e., has sub-namespace members). This led to confusion when generating a tree bundle where we need a more strict delineation to determine how to interpret. As it was, when generating a tree bundle, the hybrid nature of the namespace led to attempting to overwrite a read-only property, thus causing the bundle to error and, effectively, be unusable.
1 parent da601eb commit 5f3fe54

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

lib/node_modules/@stdlib/plot/lib/index.js

-24
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,9 @@
3434

3535
// MODULES //
3636

37-
var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
3837
var plot = require( '@stdlib/plot/ctor' );
3938

4039

41-
// MAIN //
42-
43-
/*
44-
* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
45-
*/
46-
47-
/**
48-
* Top-level namespace.
49-
*
50-
* @namespace ns
51-
*/
52-
var ns = plot;
53-
54-
/**
55-
* @name sparklines
56-
* @memberof ns
57-
* @readonly
58-
* @type {Namespace}
59-
* @see {@link module:@stdlib/plot/sparklines}
60-
*/
61-
setReadOnly( ns, 'sparklines', require( '@stdlib/plot/sparklines' ) );
62-
63-
6440
// EXPORTS //
6541

6642
module.exports = plot;

lib/node_modules/@stdlib/plot/test/test.js

-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2524
var Plot = require( '@stdlib/plot/ctor' );
2625
var plot = require( './../lib' );
2726

@@ -38,8 +37,3 @@ tape( 'the main export is a plot constructor', function test( t ) {
3837
t.strictEqual( plot, Plot, 'is alias' );
3938
t.end();
4039
});
41-
42-
tape( 'attached to the main export is a namespace containing sparkline functionality', function test( t ) {
43-
t.strictEqual( hasOwnProp( plot, 'sparklines' ), true, 'has property' );
44-
t.end();
45-
});

0 commit comments

Comments
 (0)