@intlify/message-compiler
Advanced tools
Comparing version 9.0.0-rc.2 to 9.0.0-rc.3
/*! | ||
* @intlify/message-compiler v9.0.0-rc.2 | ||
* @intlify/message-compiler v9.0.0-rc.3 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -32,4 +32,4 @@ * Released under the MIT License. | ||
}; | ||
function createCompileError(code, loc, optinos = {}) { | ||
const { domain, messages, args } = optinos; | ||
function createCompileError(code, loc, options = {}) { | ||
const { domain, messages, args } = options; | ||
const msg = shared.format((messages || errorMessages)[code] || '', ...(args || [])) | ||
@@ -316,3 +316,3 @@ ; | ||
else { | ||
// other charactors | ||
// other characters | ||
return isIdentifierStart(ch); | ||
@@ -629,3 +629,3 @@ } | ||
let validListIdentifier = true; | ||
let validLeteral = true; | ||
let validLiteral = true; | ||
if (isPluralStart(scnr)) { | ||
@@ -659,3 +659,3 @@ if (context.braceNest > 0) { | ||
} | ||
if ((validLeteral = isLiteralStart(scnr, context))) { | ||
if ((validLiteral = isLiteralStart(scnr, context))) { | ||
token = getToken(context, 7 /* Literal */, readLiteral(scnr)); | ||
@@ -665,3 +665,3 @@ skipSpaces(scnr); | ||
} | ||
if (!validNamedIdentifier && !validListIdentifier && !validLeteral) { | ||
if (!validNamedIdentifier && !validListIdentifier && !validLiteral) { | ||
// TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ... | ||
@@ -1076,3 +1076,3 @@ token = getToken(context, 13 /* InvalidPlace */, readInvalidIdentifier(scnr)); | ||
node.body = parseResource(tokenizer); | ||
// assert wheather achieved to EOF | ||
// assert whether achieved to EOF | ||
if (context.currentType !== 14 /* EOF */) { | ||
@@ -1113,3 +1113,3 @@ emitError(tokenizer, 13 /* UNEXPECTED_LEXICAL_ANALYSIS */, context.lastStartLoc, 0, source[context.offset] || ''); | ||
function traverseNode(node, transformer) { | ||
// TODO: if we need pre-hook of transform, should be implemeted to here | ||
// TODO: if we need pre-hook of transform, should be implemented to here | ||
switch (node.type) { | ||
@@ -1137,3 +1137,3 @@ case 1 /* Plural */: | ||
} | ||
// TODO: if we need post-hook of transform, should be implemeted to here | ||
// TODO: if we need post-hook of transform, should be implemented to here | ||
} | ||
@@ -1140,0 +1140,0 @@ // transform AST |
/*! | ||
* @intlify/message-compiler v9.0.0-rc.2 | ||
* @intlify/message-compiler v9.0.0-rc.3 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -32,4 +32,4 @@ * Released under the MIT License. | ||
}; | ||
function createCompileError(code, loc, optinos = {}) { | ||
const { domain, messages, args } = optinos; | ||
function createCompileError(code, loc, options = {}) { | ||
const { domain, messages, args } = options; | ||
const msg = code; | ||
@@ -315,3 +315,3 @@ const error = new SyntaxError(String(msg)); | ||
else { | ||
// other charactors | ||
// other characters | ||
return isIdentifierStart(ch); | ||
@@ -628,3 +628,3 @@ } | ||
let validListIdentifier = true; | ||
let validLeteral = true; | ||
let validLiteral = true; | ||
if (isPluralStart(scnr)) { | ||
@@ -658,3 +658,3 @@ if (context.braceNest > 0) { | ||
} | ||
if ((validLeteral = isLiteralStart(scnr, context))) { | ||
if ((validLiteral = isLiteralStart(scnr, context))) { | ||
token = getToken(context, 7 /* Literal */, readLiteral(scnr)); | ||
@@ -664,3 +664,3 @@ skipSpaces(scnr); | ||
} | ||
if (!validNamedIdentifier && !validListIdentifier && !validLeteral) { | ||
if (!validNamedIdentifier && !validListIdentifier && !validLiteral) { | ||
// TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ... | ||
@@ -1075,3 +1075,3 @@ token = getToken(context, 13 /* InvalidPlace */, readInvalidIdentifier(scnr)); | ||
node.body = parseResource(tokenizer); | ||
// assert wheather achieved to EOF | ||
// assert whether achieved to EOF | ||
if (context.currentType !== 14 /* EOF */) { | ||
@@ -1112,3 +1112,3 @@ emitError(tokenizer, 13 /* UNEXPECTED_LEXICAL_ANALYSIS */, context.lastStartLoc, 0, source[context.offset] || ''); | ||
function traverseNode(node, transformer) { | ||
// TODO: if we need pre-hook of transform, should be implemeted to here | ||
// TODO: if we need pre-hook of transform, should be implemented to here | ||
switch (node.type) { | ||
@@ -1136,3 +1136,3 @@ case 1 /* Plural */: | ||
} | ||
// TODO: if we need post-hook of transform, should be implemeted to here | ||
// TODO: if we need post-hook of transform, should be implemented to here | ||
} | ||
@@ -1139,0 +1139,0 @@ // transform AST |
@@ -55,3 +55,3 @@ import { RawSourceMap } from 'source-map'; | ||
export declare function createCompileError<T extends number>(code: T, loc: SourceLocation | null, optinos?: CreateCompileErrorOptions): CompileError; | ||
export declare function createCompileError<T extends number>(code: T, loc: SourceLocation | null, options?: CreateCompileErrorOptions): CompileError; | ||
@@ -58,0 +58,0 @@ export declare interface CreateCompileErrorOptions { |
/*! | ||
* @intlify/message-compiler v9.0.0-rc.2 | ||
* @intlify/message-compiler v9.0.0-rc.3 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -46,4 +46,4 @@ * Released under the MIT License. | ||
}; | ||
function createCompileError(code, loc, optinos = {}) { | ||
const { domain, messages, args } = optinos; | ||
function createCompileError(code, loc, options = {}) { | ||
const { domain, messages, args } = options; | ||
const msg = format((messages || errorMessages)[code] || '', ...(args || [])) | ||
@@ -330,3 +330,3 @@ ; | ||
else { | ||
// other charactors | ||
// other characters | ||
return isIdentifierStart(ch); | ||
@@ -643,3 +643,3 @@ } | ||
let validListIdentifier = true; | ||
let validLeteral = true; | ||
let validLiteral = true; | ||
if (isPluralStart(scnr)) { | ||
@@ -673,3 +673,3 @@ if (context.braceNest > 0) { | ||
} | ||
if ((validLeteral = isLiteralStart(scnr, context))) { | ||
if ((validLiteral = isLiteralStart(scnr, context))) { | ||
token = getToken(context, 7 /* Literal */, readLiteral(scnr)); | ||
@@ -679,3 +679,3 @@ skipSpaces(scnr); | ||
} | ||
if (!validNamedIdentifier && !validListIdentifier && !validLeteral) { | ||
if (!validNamedIdentifier && !validListIdentifier && !validLiteral) { | ||
// TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ... | ||
@@ -1090,3 +1090,3 @@ token = getToken(context, 13 /* InvalidPlace */, readInvalidIdentifier(scnr)); | ||
node.body = parseResource(tokenizer); | ||
// assert wheather achieved to EOF | ||
// assert whether achieved to EOF | ||
if (context.currentType !== 14 /* EOF */) { | ||
@@ -1127,3 +1127,3 @@ emitError(tokenizer, 13 /* UNEXPECTED_LEXICAL_ANALYSIS */, context.lastStartLoc, 0, source[context.offset] || ''); | ||
function traverseNode(node, transformer) { | ||
// TODO: if we need pre-hook of transform, should be implemeted to here | ||
// TODO: if we need pre-hook of transform, should be implemented to here | ||
switch (node.type) { | ||
@@ -1151,3 +1151,3 @@ case 1 /* Plural */: | ||
} | ||
// TODO: if we need post-hook of transform, should be implemeted to here | ||
// TODO: if we need post-hook of transform, should be implemented to here | ||
} | ||
@@ -1154,0 +1154,0 @@ // transform AST |
/*! | ||
* @intlify/message-compiler v9.0.0-rc.2 | ||
* @intlify/message-compiler v9.0.0-rc.3 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* @intlify/message-compiler v9.0.0-rc.2 | ||
* @intlify/message-compiler v9.0.0-rc.3 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -27,4 +27,4 @@ * Released under the MIT License. | ||
}; | ||
function createCompileError(code, loc, optinos = {}) { | ||
const { domain, messages, args } = optinos; | ||
function createCompileError(code, loc, options = {}) { | ||
const { domain, messages, args } = options; | ||
const msg = (process.env.NODE_ENV !== 'production') | ||
@@ -312,3 +312,3 @@ ? format((messages || errorMessages)[code] || '', ...(args || [])) | ||
else { | ||
// other charactors | ||
// other characters | ||
return isIdentifierStart(ch); | ||
@@ -625,3 +625,3 @@ } | ||
let validListIdentifier = true; | ||
let validLeteral = true; | ||
let validLiteral = true; | ||
if (isPluralStart(scnr)) { | ||
@@ -655,3 +655,3 @@ if (context.braceNest > 0) { | ||
} | ||
if ((validLeteral = isLiteralStart(scnr, context))) { | ||
if ((validLiteral = isLiteralStart(scnr, context))) { | ||
token = getToken(context, 7 /* Literal */, readLiteral(scnr)); | ||
@@ -661,3 +661,3 @@ skipSpaces(scnr); | ||
} | ||
if (!validNamedIdentifier && !validListIdentifier && !validLeteral) { | ||
if (!validNamedIdentifier && !validListIdentifier && !validLiteral) { | ||
// TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ... | ||
@@ -1072,3 +1072,3 @@ token = getToken(context, 13 /* InvalidPlace */, readInvalidIdentifier(scnr)); | ||
node.body = parseResource(tokenizer); | ||
// assert wheather achieved to EOF | ||
// assert whether achieved to EOF | ||
if (context.currentType !== 14 /* EOF */) { | ||
@@ -1109,3 +1109,3 @@ emitError(tokenizer, 13 /* UNEXPECTED_LEXICAL_ANALYSIS */, context.lastStartLoc, 0, source[context.offset] || ''); | ||
function traverseNode(node, transformer) { | ||
// TODO: if we need pre-hook of transform, should be implemeted to here | ||
// TODO: if we need pre-hook of transform, should be implemented to here | ||
switch (node.type) { | ||
@@ -1133,3 +1133,3 @@ case 1 /* Plural */: | ||
} | ||
// TODO: if we need post-hook of transform, should be implemeted to here | ||
// TODO: if we need post-hook of transform, should be implemented to here | ||
} | ||
@@ -1136,0 +1136,0 @@ // transform AST |
/*! | ||
* @intlify/message-compiler v9.0.0-rc.2 | ||
* @intlify/message-compiler v9.0.0-rc.3 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -49,4 +49,4 @@ * Released under the MIT License. | ||
}; | ||
function createCompileError(code, loc, optinos = {}) { | ||
const { domain, messages, args } = optinos; | ||
function createCompileError(code, loc, options = {}) { | ||
const { domain, messages, args } = options; | ||
const msg = format((messages || errorMessages)[code] || '', ...(args || [])) | ||
@@ -333,3 +333,3 @@ ; | ||
else { | ||
// other charactors | ||
// other characters | ||
return isIdentifierStart(ch); | ||
@@ -646,3 +646,3 @@ } | ||
let validListIdentifier = true; | ||
let validLeteral = true; | ||
let validLiteral = true; | ||
if (isPluralStart(scnr)) { | ||
@@ -676,3 +676,3 @@ if (context.braceNest > 0) { | ||
} | ||
if ((validLeteral = isLiteralStart(scnr, context))) { | ||
if ((validLiteral = isLiteralStart(scnr, context))) { | ||
token = getToken(context, 7 /* Literal */, readLiteral(scnr)); | ||
@@ -682,3 +682,3 @@ skipSpaces(scnr); | ||
} | ||
if (!validNamedIdentifier && !validListIdentifier && !validLeteral) { | ||
if (!validNamedIdentifier && !validListIdentifier && !validLiteral) { | ||
// TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ... | ||
@@ -1093,3 +1093,3 @@ token = getToken(context, 13 /* InvalidPlace */, readInvalidIdentifier(scnr)); | ||
node.body = parseResource(tokenizer); | ||
// assert wheather achieved to EOF | ||
// assert whether achieved to EOF | ||
if (context.currentType !== 14 /* EOF */) { | ||
@@ -1130,3 +1130,3 @@ emitError(tokenizer, 13 /* UNEXPECTED_LEXICAL_ANALYSIS */, context.lastStartLoc, 0, source[context.offset] || ''); | ||
function traverseNode(node, transformer) { | ||
// TODO: if we need pre-hook of transform, should be implemeted to here | ||
// TODO: if we need pre-hook of transform, should be implemented to here | ||
switch (node.type) { | ||
@@ -1154,3 +1154,3 @@ case 1 /* Plural */: | ||
} | ||
// TODO: if we need post-hook of transform, should be implemeted to here | ||
// TODO: if we need post-hook of transform, should be implemented to here | ||
} | ||
@@ -1157,0 +1157,0 @@ // transform AST |
/*! | ||
* @intlify/message-compiler v9.0.0-rc.2 | ||
* @intlify/message-compiler v9.0.0-rc.3 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
{ | ||
"name": "@intlify/message-compiler", | ||
"version": "9.0.0-rc.2", | ||
"version": "9.0.0-rc.3", | ||
"description": "@intlify/message-compiler", | ||
@@ -36,4 +36,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@intlify/message-resolver": "9.0.0-rc.2", | ||
"@intlify/shared": "9.0.0-rc.2", | ||
"@intlify/message-resolver": "9.0.0-rc.3", | ||
"@intlify/shared": "9.0.0-rc.3", | ||
"source-map": "0.6.1" | ||
@@ -40,0 +40,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
287278
+ Added@intlify/message-resolver@9.0.0-rc.3(transitive)
+ Added@intlify/shared@9.0.0-rc.3(transitive)
- Removed@intlify/message-resolver@9.0.0-rc.2(transitive)
- Removed@intlify/shared@9.0.0-rc.2(transitive)
Updated@intlify/shared@9.0.0-rc.3