Comparing version 5.0.0-next.164 to 5.0.0-next.165
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "5.0.0-next.164", | ||
"version": "5.0.0-next.165", | ||
"type": "module", | ||
@@ -114,3 +114,3 @@ "types": "./types/index.d.ts", | ||
"@types/aria-query": "^5.0.4", | ||
"dts-buddy": "^0.4.7", | ||
"dts-buddy": "^0.5.0", | ||
"esbuild": "^0.19.11", | ||
@@ -117,0 +117,0 @@ "knip": "^4.2.1", |
@@ -17,6 +17,5 @@ // @ts-expect-error acorn type definitions are borked in the release we use | ||
* @param {import('../index.js').Parser} parser | ||
* @param {boolean} [optional_allowed] | ||
* @returns {import('estree').Pattern} | ||
*/ | ||
export default function read_pattern(parser, optional_allowed = false) { | ||
export default function read_pattern(parser) { | ||
const start = parser.index; | ||
@@ -28,3 +27,3 @@ let i = parser.index; | ||
const name = /** @type {string} */ (parser.read_identifier()); | ||
const annotation = read_type_annotation(parser, optional_allowed); | ||
const annotation = read_type_annotation(parser); | ||
@@ -89,3 +88,3 @@ return { | ||
expression.typeAnnotation = read_type_annotation(parser, optional_allowed); | ||
expression.typeAnnotation = read_type_annotation(parser); | ||
if (expression.typeAnnotation) { | ||
@@ -103,15 +102,8 @@ expression.end = expression.typeAnnotation.end; | ||
* @param {import('../index.js').Parser} parser | ||
* @param {boolean} [optional_allowed] | ||
* @returns {any} | ||
*/ | ||
function read_type_annotation(parser, optional_allowed = false) { | ||
function read_type_annotation(parser) { | ||
const start = parser.index; | ||
parser.allow_whitespace(); | ||
if (optional_allowed && parser.eat('?')) { | ||
// Acorn-TS puts the optional info as a property on the surrounding node. | ||
// We spare the work here because it doesn't matter for us anywhere else. | ||
parser.allow_whitespace(); | ||
} | ||
if (!parser.eat(':')) { | ||
@@ -118,0 +110,0 @@ parser.index = start; |
@@ -272,24 +272,26 @@ import read_pattern from '../read/context.js'; | ||
let slice_end = parser.index; | ||
parser.allow_whitespace(); | ||
const params_start = parser.index; | ||
parser.eat('(', true); | ||
let parentheses = 1; | ||
let params = ''; | ||
while (!parser.match(')') || parentheses !== 1) { | ||
while (parser.index < parser.template.length && (!parser.match(')') || parentheses !== 1)) { | ||
if (parser.match('(')) parentheses++; | ||
if (parser.match(')')) parentheses--; | ||
params += parser.read(/^./); | ||
parser.index += 1; | ||
} | ||
parser.eat(')', true); | ||
const prelude = parser.template.slice(0, params_start).replace(/\S/g, ' '); | ||
const params = parser.template.slice(params_start, parser.index); | ||
let function_expression = /** @type {import('estree').ArrowFunctionExpression} */ ( | ||
parse_expression_at( | ||
parser.template.slice(0, slice_end).replace(/\S/g, ' ') + `(${params}) => {}`, | ||
parser.ts, | ||
0 | ||
) | ||
parse_expression_at(prelude + `${params} => {}`, parser.ts, params_start) | ||
); | ||
parser.index += 2; | ||
parser.allow_whitespace(); | ||
parser.eat('}', true); | ||
@@ -296,0 +298,0 @@ /** @type {ReturnType<typeof parser.append<import('#compiler').SnippetBlock>>} */ |
import { noop, run_all } from '../internal/shared/utils.js'; | ||
import { safe_not_equal } from '../internal/client/reactivity/equality.js'; | ||
import { subscribe_to_store } from './utils.js'; | ||
@@ -25,11 +26,2 @@ | ||
/** | ||
* @param {any} a | ||
* @param {any} b | ||
* @returns {boolean} | ||
*/ | ||
export function safe_not_equal(a, b) { | ||
return a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function'; | ||
} | ||
/** | ||
* Create a `Writable` store that allows both updating and reading by subscription. | ||
@@ -217,3 +209,3 @@ * | ||
*/ | ||
export function get_store_value(store) { | ||
export function get(store) { | ||
let value; | ||
@@ -224,3 +216,1 @@ subscribe_to_store(store, (_) => (value = _))(); | ||
} | ||
export { get_store_value as get }; |
@@ -9,3 +9,3 @@ // generated during release, do not modify | ||
*/ | ||
export const VERSION = '5.0.0-next.164'; | ||
export const VERSION = '5.0.0-next.165'; | ||
export const PUBLIC_VERSION = '5'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
2112420