Skip to content

Commit

Permalink
- Merge com principal;
Browse files Browse the repository at this point in the history
- Ajustes para fazer o Jest trabalhar com módulos linkados.
  • Loading branch information
leonelsanchesdasilva committed Jul 6, 2024
1 parent 0205881 commit 5514e43
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { TipoDadosElementar } from '@designliquido/delegua/tipo-dados-elementar'

import { Matriz, Limpa } from '../construtos';
import tiposDeSimbolos from '../tipos-de-simbolos/lexico-regular';
import { Simbolo } from '@designliquido/delegua';
import { Simbolo } from '@designliquido/delegua/lexador';

/**
* O avaliador sintático (_Parser_) é responsável por transformar os símbolos do Lexador em estruturas de alto nível.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { EscopoExecucao } from "@designliquido/delegua/interfaces/escopo-execucao";
import { PilhaEscoposExecucaoInterface } from "@designliquido/delegua/interfaces/pilha-escopos-execucao-interface";
import { Simbolo, SimboloInterface, VariavelInterface } from "@designliquido/delegua";
import { SimboloInterface, VariavelInterface } from "@designliquido/delegua/interfaces";
import { Simbolo } from "@designliquido/delegua/lexador";
import { ErroEmTempoDeExecucao } from "@designliquido/delegua/excecoes";
import { DeleguaClasse, DeleguaFuncao } from "@designliquido/delegua/estruturas";
import { EspacoVariaveis } from "@designliquido/delegua/espaco-variaveis";
Expand Down
8 changes: 7 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export default async (): Promise<Config.InitialOptions> => {
modulePathIgnorePatterns: ['<rootDir>/dist/'],
preset: 'ts-jest',
testEnvironment: 'node',
coverageReporters: ['json-summary', 'lcov', 'text', 'text-summary']
coverageReporters: ['json-summary', 'lcov', 'text', 'text-summary'],
moduleNameMapper: {
// Se for utilizar módulos linkados, comentar a linha abaixo:
// '@designliquido/delegua/(.*)': '<rootDir>/node_modules/@designliquido/delegua/$1'
// E descomentar a linha abaixo:
'@designliquido/delegua/(.*)': '<rootDir>/node_modules/@designliquido/delegua/fontes/$1'
},
};
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"deixar-codigo-bonito": "prettier --config .prettierrc --write fontes/**/*.ts"
},
"dependencies": {
"@designliquido/delegua": "^0.35.2",
"@designliquido/delegua": "^0.35.3",
"lodash": "^4.17.21",
"node-fetch": "2",
"xml2js": "^0.6.2"
Expand Down
2 changes: 1 addition & 1 deletion testes/avaliador-sintatico.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErroAvaliadorSintatico } from "@designliquido/delegua/avaliador-sintatico";
import { FuncaoDeclaracao } from "@designliquido/delegua";
import { FuncaoDeclaracao } from "@designliquido/delegua/declaracoes";

import { AvaliadorSintaticoPortugolStudio } from "../fontes";
import { LexadorPortugolStudio } from "../fontes/lexador/lexador-portugol-studio";
Expand Down
39 changes: 32 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"

"@designliquido/delegua@^0.35.2":
version "0.35.2"
resolved "https://registry.yarnpkg.com/@designliquido/delegua/-/delegua-0.35.2.tgz#a16d31991ef909e20d53aa455cf4a0e37a7520a5"
integrity sha512-uKNF7W/UL4RBRadyTb7P16tvHrKSKL7rC7TBmYM2aYAtijv08hMouzfQidrNBVEvtQtoNTBXBB49bp6Id8XMYQ==
"@designliquido/delegua@^0.35.3":
version "0.35.3"
resolved "https://registry.yarnpkg.com/@designliquido/delegua/-/delegua-0.35.3.tgz#ee0c569b4b34fc13dbc5c3c874f48521e125062a"
integrity sha512-1OHpyZUb0h/1YCg3RFoebbwSQDUKznr7DgS72JAk3Y4O5r2cLebvqEFRkMxbTaElE11H8w7exNvxn3AZbikhuA==
dependencies:
antlr4ts "^0.5.0-alpha.4"
browser-process-hrtime "^1.0.0"
Expand Down Expand Up @@ -2301,7 +2301,16 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -2331,7 +2340,14 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -2557,7 +2573,16 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand Down

0 comments on commit 5514e43

Please sign in to comment.