Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
mv truffle-solidity-utils @truffle/solidity-utils
Browse files Browse the repository at this point in the history
- Rename to use org-scoped name
- Update package.json name
- Update dependent packages
- Update require/imports
- Remove unused dependency in truffle-core
- Update all textual references to name
  • Loading branch information
gnidan committed Aug 22, 2019
1 parent 51f5d3b commit 3e962a5
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 14 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# truffle-solidity-utils
# @truffle/solidity-utils
Utilities for solidity contracts

# API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var SolidityUtils = {

getCharacterOffsetToLineAndColumnMapping: function(source) {
var mapping = [];

Expand Down Expand Up @@ -31,7 +30,7 @@ var SolidityUtils = {
},

getHumanReadableSourceMap: function(sourceMap) {
var map = sourceMap.split(';');
var map = sourceMap.split(";");

var last = {};

Expand All @@ -43,12 +42,12 @@ var SolidityUtils = {
jump: last.jump
};

current = current.split(':');
current = current.split(":");

if (current[0] && current[0] !== '-1' && current[0].length) {
if (current[0] && current[0] !== "-1" && current[0].length) {
ret.start = parseInt(current[0]);
}
if (current[1] && current[1] !== '-1' && current[1].length) {
if (current[1] && current[1] !== "-1" && current[1].length) {
ret.length = parseInt(current[1]);
}
if (current[2] /*&& current[2] !== '-1'*/ && current[2].length) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "truffle-solidity-utils",
"name": "@truffle/solidity-utils",
"version": "1.2.3",
"description": "Utilities for Solidity contracts",
"main": "index.js",
"scripts": {},
"repository": "https://github.com/trufflesuite/truffle/tree/master/packages/truffle-solidity-utils",
"repository": "https://github.com/trufflesuite/truffle/tree/master/packages/solidity-utils",
"keywords": [
"ethereum",
"truffle",
Expand All @@ -14,9 +14,9 @@
"author": "Tim Coulter <tim.coulter@consensys.net>",
"license": "MIT",
"bugs": {
"url": "https://github.com/trufflesuite/truffle-solidity-utils/issues"
"url": "https://github.com/trufflesuite/truffle/issues"
},
"homepage": "https://github.com/trufflesuite/truffle-solidity-utils#readme",
"homepage": "https://github.com/trufflesuite/truffle/tree/master/packages/solidity-utils#readme",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-compile/test/test_ordering.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe("Compile - solidity ^0.4.0", function() {
assert.deepEqual(abi, expectedOrder);
});

// Ported from `truffle-solidity-utils`
// Ported from `@truffle/solidity-utils`
it("orders the ABI of a contract without functions", async function() {
var sources = {};
// ComplexOrdered.sol includes contract `Empty`
Expand Down
1 change: 0 additions & 1 deletion packages/truffle-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"truffle-provisioner": "^0.1.5",
"truffle-require": "^2.0.18",
"truffle-resolver": "^5.0.15",
"truffle-solidity-utils": "^1.2.3",
"truffle-workflow-compile": "^2.1.2",
"universal-analytics": "^0.4.17",
"web3": "1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-debugger/lib/solidity/selectors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import debugModule from "debug";
const debug = debugModule("debugger:solidity:selectors");

import { createSelectorTree, createLeaf } from "reselect-tree";
import SolidityUtils from "truffle-solidity-utils";
import SolidityUtils from "@truffle/solidity-utils";
import CodeUtils from "truffle-code-utils";

import { findRange } from "lib/ast/map";
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"truffle-decode-utils": "^1.0.16",
"truffle-decoder": "^3.0.9",
"truffle-expect": "^0.0.9",
"truffle-solidity-utils": "^1.2.3",
"@truffle/solidity-utils": "^1.2.3",
"web3": "1.2.1",
"web3-eth-abi": "1.2.1"
},
Expand Down

0 comments on commit 3e962a5

Please sign in to comment.