Skip to content

Commit

Permalink
Fixes #1909, added test suite for new LIGO plugin, based on LIGO v1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Weichert committed Oct 6, 2023
1 parent 8c4bcef commit 1ad307c
Show file tree
Hide file tree
Showing 43 changed files with 934 additions and 117 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.40.22",
"version": "0.40.23",
"packages": [
"taqueria-protocol",
"taqueria-lib*",
Expand Down
98 changes: 49 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@taqueria/root",
"version": "0.40.22",
"version": "0.40.23",
"description": "An easy to use opinionated tool for building, testing, and deploying Tezos software",
"main": "index.ts",
"directories": {
Expand Down
4 changes: 2 additions & 2 deletions taqueria-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@taqueria/analytics",
"version": "0.40.22",
"version": "0.40.23",
"description": "A TypeScript SDK submitting events for Taqueria activity",
"main": "./index.js",
"source": "./index.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"homepage": "https://github.com/pinnacle-labs/taqueria#readme",
"dependencies": {
"@taqueria/protocol": "^0.40.22",
"@taqueria/protocol": "^0.40.23",
"node-machine-id-xz": "^1.0.2"
},
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions taqueria-lib-ligo/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ export const formatLigoError = (err: Error): Error => {
) {
result =
`By convention, Taqueria expects you to import your contract with Contract as the module name.\nFor instance, if you have a contract in a file called "increment.mligo", in your parameter/storage list file you must include #import "Increment.mligo" "Contract" for compilation to be successful.`;
} else {
const regex = /contracts\/(.+): No such file or directory/;
const match = regex.exec(result);
if (match) {
const filename = match[1];
result =
`The file ${filename} was not found. Please ensure that the file exists and that it is in the contracts directory.`;
}
}

err.message = result
Expand Down
3 changes: 2 additions & 1 deletion taqueria-lib-ligo/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export const inject = (commonObj: Common) => {
[],
);
} catch (err) {
const formattedErr = err instanceof Error ? formatLigoError(err) : err;
emitExternalError(err, sourceFile);
return [];
}
Expand Down Expand Up @@ -455,7 +456,7 @@ export const compile = async (commonObj: Common, parsedArgs: Opts): Promise<void
{
source: sourceFile,
artifact:
`No contract modules found in "${sourceFile}\nIf your contract is defined within a namespace, please ensure that it is exported from the contract file."`,
`No contract modules found in "${sourceFile}".\nIf your contract is defined within a namespace, please ensure that it is exported from the contract file."`,
},
]);
}
Expand Down
4 changes: 2 additions & 2 deletions taqueria-lib-ligo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@taqueria/lib-ligo",
"version": "0.40.22",
"version": "0.40.23",
"description": "A taqueria library which provides common functionality for the LIGO and LIGO Legacy Plugins",
"targets": {
"default": {
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"homepage": "https://github.com/pinnacle-labs/taqueria#readme",
"dependencies": {
"@taqueria/node-sdk": "^0.40.22",
"@taqueria/node-sdk": "^0.40.23",
"fast-glob": "^3.3.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions taqueria-plugin-archetype/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@taqueria/plugin-archetype",
"version": "0.40.22",
"version": "0.40.23",
"description": "A taqueria plugin for compiling Archetype smart contracts",
"targets": {
"default": {
Expand Down Expand Up @@ -40,7 +40,7 @@
},
"homepage": "https://github.com/pinnacle-labs/taqueria#readme",
"dependencies": {
"@taqueria/node-sdk": "^0.40.22",
"@taqueria/node-sdk": "^0.40.23",
"fast-glob": "^3.3.1",
"ts-pattern": "^5.0.5"
},
Expand Down
Loading

0 comments on commit 1ad307c

Please sign in to comment.