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
fix: export all properties under the root instead of default
By exporting under the root, javascript importing modules will continue
to use it as expected without first having to index `.default.`
  • Loading branch information
stephen-slm committed Jan 25, 2022
commit 8405162e2bb66ed2467ddc85cf65aded20044faa
23 changes: 22 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
import wrapper from './wrapper';

const soljson = require('./soljson.js');
const wrapped = wrapper(soljson);

export default wrapper(soljson);
const {
version,
semver,
license,
lowlevel,
features,
compile,
loadRemoteVersion,
setupMethods
} = wrapped;

export {
version,
semver,
license,
lowlevel,
features,
compile,
loadRemoteVersion,
setupMethods
};
2 changes: 1 addition & 1 deletion solc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as commander from 'commander';
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import solc from './index';
import * as solc from './index';
import smtchecker from './smtchecker';
import smtsolver from './smtsolver';

Expand Down
2 changes: 1 addition & 1 deletion test/compiler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as assert from 'assert';
import * as tape from 'tape';
import * as semver from 'semver';
import solc from '../';
import * as solc from '../';
import linker from '../linker';
import { execSync } from 'child_process';
import wrapper from '../wrapper';
Expand Down
2 changes: 1 addition & 1 deletion test/smtcallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as tape from 'tape';
import * as fs from 'fs';
import * as path from 'path';
import * as semver from 'semver';
import solc from '../';
import * as solc from '../';
import smtchecker from '../smtchecker';
import smtsolver from '../smtsolver';

Expand Down
2 changes: 1 addition & 1 deletion test/smtchecker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as tape from 'tape';
import * as semver from 'semver';
import solc from '../';
import * as solc from '../';
import smtchecker from '../smtchecker';
import smtsolver from '../smtsolver';

Expand Down
2 changes: 1 addition & 1 deletion verifyVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as semver from 'semver';

import { version as packageVersion } from './package.json';
import solc from './';
import * as solc from './';

const solcVersion = (solc as any).version();

Expand Down