@absolutejs/absolute 0.19.0-beta.1104 → 0.19.0-beta.1106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +8 -10
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +8 -10
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +35 -18
- package/dist/build.js.map +4 -4
- package/dist/cli/index.js +249 -122
- package/dist/index.js +35 -18
- package/dist/index.js.map +4 -4
- package/dist/islands/index.js +8 -10
- package/dist/islands/index.js.map +3 -3
- package/dist/react/index.js +8 -10
- package/dist/react/index.js.map +3 -3
- package/dist/src/build/maskLiterals.d.ts +9 -6
- package/dist/src/cli/scripts/eslint.d.ts +15 -2
- package/dist/svelte/index.js +8 -10
- package/dist/svelte/index.js.map +3 -3
- package/dist/vue/index.js +8 -10
- package/dist/vue/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -8,16 +8,19 @@
|
|
|
8
8
|
* comment — so it rewrites the snippet's specifier too. The browser bundle then
|
|
9
9
|
* diverges from the SSR pre-render → React hydration mismatch on the code block.
|
|
10
10
|
*
|
|
11
|
-
* Fix: before rewriting, replace template literals
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* Fix: before rewriting, replace template literals and comments with opaque
|
|
12
|
+
* placeholders, plus any string literal whose *own text* contains an
|
|
13
|
+
* import-like sequence (`from`/`import`/`require` + quote); rewrite; then
|
|
14
|
+
* restore them verbatim. A real import specifier string (e.g.
|
|
15
|
+
* "react/jsx-runtime") never contains that sequence, so it is left untouched
|
|
16
|
+
* and always gets rewritten — no matter what token precedes it. Regex literals
|
|
17
|
+
* are skipped (copied verbatim) so their contents can't be misread as
|
|
18
|
+
* strings/templates.
|
|
17
19
|
*
|
|
18
20
|
* Usage: `const { masked, restore } = maskLiterals(src)`, run the existing
|
|
19
21
|
* rewriter on `masked`, then `restore(rewritten)`.
|
|
20
22
|
*/
|
|
23
|
+
export declare const SENTINEL: string;
|
|
21
24
|
export type MaskedSource = {
|
|
22
25
|
masked: string;
|
|
23
26
|
restore: (rewritten: string) => string;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
export declare const getCacheLocation: (args: string[]) => string;
|
|
2
|
+
export declare const createEslintCacheFingerprint: (cwd?: string) => string;
|
|
3
|
+
type EslintCacheOptions = {
|
|
4
|
+
cacheLocation: string;
|
|
5
|
+
cwd?: string;
|
|
6
|
+
fingerprint?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const prepareEslintCache: (options: EslintCacheOptions) => boolean;
|
|
9
|
+
export declare const buildEslintCommand: (args: string[], cacheLocation: string) => string[];
|
|
1
10
|
/**
|
|
2
11
|
* Run ESLint with sensible absolutejs defaults.
|
|
3
12
|
*
|
|
4
|
-
* - Caching: enabled by default
|
|
5
|
-
*
|
|
13
|
+
* - Caching: enabled by default with ESLint's content strategy, so Git
|
|
14
|
+
* operations that alter mtimes don't make unchanged files expensive.
|
|
15
|
+
* Installed lint-tool or config changes invalidate the cache automatically.
|
|
16
|
+
* The cache location is overridable via `ABSOLUTE_ESLINT_CACHE`
|
|
17
|
+
* (default: `.absolutejs/eslint-cache`).
|
|
6
18
|
* - Implicit lint target: `.` is appended only when the user hasn't
|
|
7
19
|
* supplied a positional path of their own. So `bun lint src/backend/`
|
|
8
20
|
* lints just that directory — not the whole repo plus `src/backend/`.
|
|
@@ -14,3 +26,4 @@
|
|
|
14
26
|
* spread through to the underlying `bun eslint` invocation.
|
|
15
27
|
*/
|
|
16
28
|
export declare const eslint: (args: string[]) => Promise<void>;
|
|
29
|
+
export {};
|
package/dist/svelte/index.js
CHANGED
|
@@ -3129,7 +3129,7 @@ var init_islandSsr = __esm(() => {
|
|
|
3129
3129
|
});
|
|
3130
3130
|
|
|
3131
3131
|
// src/build/maskLiterals.ts
|
|
3132
|
-
var SENTINEL, isIdentChar = (c) => /[A-Za-z0-9_$]/.test(c), REGEX_OK_AFTER_CHAR, REGEX_OK_AFTER_WORD, maskLiterals = (src) => {
|
|
3132
|
+
var SENTINEL, RISKY_STRING_CONTENT, isIdentChar = (c) => /[A-Za-z0-9_$]/.test(c), REGEX_OK_AFTER_CHAR, REGEX_OK_AFTER_WORD, maskLiterals = (src) => {
|
|
3133
3133
|
const n = src.length;
|
|
3134
3134
|
const pieces = [];
|
|
3135
3135
|
let out = "";
|
|
@@ -3137,7 +3137,6 @@ var SENTINEL, isIdentChar = (c) => /[A-Za-z0-9_$]/.test(c), REGEX_OK_AFTER_CHAR,
|
|
|
3137
3137
|
let prevChar = "";
|
|
3138
3138
|
let prevWord = "";
|
|
3139
3139
|
let prevWasSpace = false;
|
|
3140
|
-
let wordBeforeParen = "";
|
|
3141
3140
|
const mask = (text) => {
|
|
3142
3141
|
out += SENTINEL + pieces.length + SENTINEL;
|
|
3143
3142
|
pieces.push(text);
|
|
@@ -3275,14 +3274,14 @@ var SENTINEL, isIdentChar = (c) => /[A-Za-z0-9_$]/.test(c), REGEX_OK_AFTER_CHAR,
|
|
|
3275
3274
|
}
|
|
3276
3275
|
if (c === '"' || c === "'") {
|
|
3277
3276
|
const end = endOfString(i);
|
|
3278
|
-
const
|
|
3279
|
-
if (
|
|
3280
|
-
|
|
3277
|
+
const text = src.slice(i, end);
|
|
3278
|
+
if (RISKY_STRING_CONTENT.test(text)) {
|
|
3279
|
+
mask(text);
|
|
3280
|
+
} else {
|
|
3281
|
+
out += text;
|
|
3281
3282
|
prevChar = '"';
|
|
3282
3283
|
prevWord = "";
|
|
3283
3284
|
prevWasSpace = false;
|
|
3284
|
-
} else {
|
|
3285
|
-
mask(src.slice(i, end));
|
|
3286
3285
|
}
|
|
3287
3286
|
i = end;
|
|
3288
3287
|
continue;
|
|
@@ -3309,8 +3308,6 @@ var SENTINEL, isIdentChar = (c) => /[A-Za-z0-9_$]/.test(c), REGEX_OK_AFTER_CHAR,
|
|
|
3309
3308
|
const contiguous = isIdentChar(prevChar) && !prevWasSpace;
|
|
3310
3309
|
prevWord = contiguous ? prevWord + c : c;
|
|
3311
3310
|
} else {
|
|
3312
|
-
if (c === "(")
|
|
3313
|
-
wordBeforeParen = prevWord;
|
|
3314
3311
|
prevWord = "";
|
|
3315
3312
|
}
|
|
3316
3313
|
prevChar = c;
|
|
@@ -3322,6 +3319,7 @@ var SENTINEL, isIdentChar = (c) => /[A-Za-z0-9_$]/.test(c), REGEX_OK_AFTER_CHAR,
|
|
|
3322
3319
|
};
|
|
3323
3320
|
var init_maskLiterals = __esm(() => {
|
|
3324
3321
|
SENTINEL = String.fromCharCode(57344);
|
|
3322
|
+
RISKY_STRING_CONTENT = /\b(?:from|import|require)\s*\(?\s*["'`]/;
|
|
3325
3323
|
REGEX_OK_AFTER_CHAR = new Set([
|
|
3326
3324
|
"(",
|
|
3327
3325
|
",",
|
|
@@ -4700,5 +4698,5 @@ export {
|
|
|
4700
4698
|
createTypedIsland
|
|
4701
4699
|
};
|
|
4702
4700
|
|
|
4703
|
-
//# debugId=
|
|
4701
|
+
//# debugId=5A09E6361E2C596964756E2164756E21
|
|
4704
4702
|
//# sourceMappingURL=index.js.map
|