Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(language-tools): deprecate osi and global #10

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
6 changes: 3 additions & 3 deletions packages/esbabel/src/keywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const keywordControl = new Map<string, string>([
['para', 'for'],
['retornar', 'return'],
['sino', 'else'],
['osi', 'else if'],
// ['osi', 'else if'],
['si', 'if'],
['constructor', 'constructor'],
['eliminar', 'delete'],
Expand All @@ -40,7 +40,6 @@ export const constantLanguage = new Map<string, string>([
['Infinito', 'Infinity'],
['NuN', 'NaN'],
['ambienteGlobal', 'globalThis'],
['esNuN', 'isNaN'],
])

export const variableLanguage = new Map<string, string>([
Expand All @@ -52,7 +51,7 @@ export const storageType = new Map<string, string>([
['asincrono', 'async'],
['clase', 'class'],
['const', 'const'],
['global', 'var'],
// ['global', 'var'],
['var', 'var'],
['mut', 'let'],
['porDefecto', 'default'],
Expand Down Expand Up @@ -225,6 +224,7 @@ export const mathMethods = new Map<string, string>([
])

export const numberMethods = new Map<string, string>([
['esNuN', 'isNaN'],
['esFinito', 'isFinite'],
['esEntero', 'isInteger'],
['esEnteroSeguro', 'isSafeInteger'],
Expand Down
6 changes: 3 additions & 3 deletions packages/esbabel/test/knownIssues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ describe('known issues', () => {
expect(compile(js, true)).toEqual(esjs)
})

it('compiles var/global to var', () => {
it('does not compile var/global to var', () => {
const esjs = `
var x = 1
global y = 2
`
var y = 2
`;
enzonotario marked this conversation as resolved.
Show resolved Hide resolved

const js = `
var x = 1
Expand Down
2 changes: 1 addition & 1 deletion packages/language-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@es-js/language-tools",
"version": "0.1.0",
"version": "0.1.1",
"description": "",
"main": "src/generate-esjs-syntax.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@es-js/runtime",
"version": "0.0.1-beta.0",
"version": "0.0.1-beta.1",
"description": "Ejecuta EsJS y EsHtml facilmente con una etiqueta!",
"license": "MIT",
"type": "module",
Expand All @@ -21,4 +21,4 @@
"CreadoresProgram",
"eshtml"
]
}
}
Loading