poe-code 13.0.7 → 13.0.9
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/index.js +21 -2
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/package-lint/dist/bundle-policy.js +6 -4
- package/packages/package-lint/dist/node-builtins.d.ts +1 -0
- package/packages/package-lint/dist/node-builtins.js +142 -0
- package/packages/safe-js/dist/chunks/{chunk-ES7OFCHQ.js → chunk-SUOXSVL2.js} +2 -2
- package/packages/safe-js/dist/chunks/{chunk-YVTMQWCX.js → chunk-XY2A4W6O.js} +21 -2
- package/packages/safe-js/dist/chunks/chunk-XY2A4W6O.js.map +7 -0
- package/packages/safe-js/dist/cli.js +2 -2
- package/packages/safe-js/dist/core.js +1 -1
- package/packages/safe-js/dist/index.js +2 -2
- package/packages/safe-js/dist/interp/methods/string.d.ts +1 -1
- package/packages/safe-js/dist/interp/methods/string.js +18 -0
- package/packages/safe-js/dist/parse/tokenizer.js +2 -1
- package/packages/safe-js/dist/chunks/chunk-YVTMQWCX.js.map +0 -7
- /package/packages/safe-js/dist/chunks/{chunk-ES7OFCHQ.js.map → chunk-SUOXSVL2.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { publicationNodeBuiltins } from "./node-builtins.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
export const canonicalFsRoutes = [
|
|
4
4
|
{
|
|
@@ -124,7 +124,7 @@ export function findBundleIssues(manifest, workspaceNames, metafile, packedFiles
|
|
|
124
124
|
...Object.keys(manifest.optionalDependencies ?? {})
|
|
125
125
|
]);
|
|
126
126
|
for (const specifier of [...imports].sort()) {
|
|
127
|
-
if (
|
|
127
|
+
if (publicationNodeBuiltins.has(specifier))
|
|
128
128
|
continue;
|
|
129
129
|
if (routes.has(specifier) && manifest.name === "poe-code")
|
|
130
130
|
continue;
|
|
@@ -273,7 +273,9 @@ export function findBundleIssues(manifest, workspaceNames, metafile, packedFiles
|
|
|
273
273
|
pending.push(output.cssBundle);
|
|
274
274
|
for (const dependency of output.imports ?? []) {
|
|
275
275
|
if (dependency.external) {
|
|
276
|
-
if (profile === "browser" ||
|
|
276
|
+
if (profile === "browser" ||
|
|
277
|
+
!dependency.path ||
|
|
278
|
+
!publicationNodeBuiltins.has(dependency.path))
|
|
277
279
|
fail("external-canonical-dependency");
|
|
278
280
|
}
|
|
279
281
|
else if (dependency.path)
|
|
@@ -306,7 +308,7 @@ export function findBundleIssues(manifest, workspaceNames, metafile, packedFiles
|
|
|
306
308
|
for (const edge of edges) {
|
|
307
309
|
if (edge === "#safe-fs-platform")
|
|
308
310
|
typeQueue.push(settings.types);
|
|
309
|
-
else if (
|
|
311
|
+
else if (publicationNodeBuiltins.has(edge)) {
|
|
310
312
|
if (profile === "browser")
|
|
311
313
|
fail("external-canonical-types");
|
|
312
314
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const publicationNodeBuiltins: ReadonlySet<string>;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export const publicationNodeBuiltins = new Set([
|
|
2
|
+
"_http_agent",
|
|
3
|
+
"_http_client",
|
|
4
|
+
"_http_common",
|
|
5
|
+
"_http_incoming",
|
|
6
|
+
"_http_outgoing",
|
|
7
|
+
"_http_server",
|
|
8
|
+
"_stream_duplex",
|
|
9
|
+
"_stream_passthrough",
|
|
10
|
+
"_stream_readable",
|
|
11
|
+
"_stream_transform",
|
|
12
|
+
"_stream_wrap",
|
|
13
|
+
"_stream_writable",
|
|
14
|
+
"_tls_common",
|
|
15
|
+
"_tls_wrap",
|
|
16
|
+
"assert",
|
|
17
|
+
"assert/strict",
|
|
18
|
+
"async_hooks",
|
|
19
|
+
"buffer",
|
|
20
|
+
"child_process",
|
|
21
|
+
"cluster",
|
|
22
|
+
"console",
|
|
23
|
+
"constants",
|
|
24
|
+
"crypto",
|
|
25
|
+
"dgram",
|
|
26
|
+
"diagnostics_channel",
|
|
27
|
+
"dns",
|
|
28
|
+
"dns/promises",
|
|
29
|
+
"domain",
|
|
30
|
+
"events",
|
|
31
|
+
"fs",
|
|
32
|
+
"fs/promises",
|
|
33
|
+
"http",
|
|
34
|
+
"http2",
|
|
35
|
+
"https",
|
|
36
|
+
"inspector",
|
|
37
|
+
"inspector/promises",
|
|
38
|
+
"module",
|
|
39
|
+
"net",
|
|
40
|
+
"node:_http_agent",
|
|
41
|
+
"node:_http_client",
|
|
42
|
+
"node:_http_common",
|
|
43
|
+
"node:_http_incoming",
|
|
44
|
+
"node:_http_outgoing",
|
|
45
|
+
"node:_http_server",
|
|
46
|
+
"node:_stream_duplex",
|
|
47
|
+
"node:_stream_passthrough",
|
|
48
|
+
"node:_stream_readable",
|
|
49
|
+
"node:_stream_transform",
|
|
50
|
+
"node:_stream_wrap",
|
|
51
|
+
"node:_stream_writable",
|
|
52
|
+
"node:_tls_common",
|
|
53
|
+
"node:_tls_wrap",
|
|
54
|
+
"node:assert",
|
|
55
|
+
"node:assert/strict",
|
|
56
|
+
"node:async_hooks",
|
|
57
|
+
"node:buffer",
|
|
58
|
+
"node:child_process",
|
|
59
|
+
"node:cluster",
|
|
60
|
+
"node:console",
|
|
61
|
+
"node:constants",
|
|
62
|
+
"node:crypto",
|
|
63
|
+
"node:dgram",
|
|
64
|
+
"node:diagnostics_channel",
|
|
65
|
+
"node:dns",
|
|
66
|
+
"node:dns/promises",
|
|
67
|
+
"node:domain",
|
|
68
|
+
"node:events",
|
|
69
|
+
"node:fs",
|
|
70
|
+
"node:fs/promises",
|
|
71
|
+
"node:http",
|
|
72
|
+
"node:http2",
|
|
73
|
+
"node:https",
|
|
74
|
+
"node:inspector",
|
|
75
|
+
"node:inspector/promises",
|
|
76
|
+
"node:module",
|
|
77
|
+
"node:net",
|
|
78
|
+
"node:os",
|
|
79
|
+
"node:path",
|
|
80
|
+
"node:path/posix",
|
|
81
|
+
"node:path/win32",
|
|
82
|
+
"node:perf_hooks",
|
|
83
|
+
"node:process",
|
|
84
|
+
"node:punycode",
|
|
85
|
+
"node:querystring",
|
|
86
|
+
"node:readline",
|
|
87
|
+
"node:readline/promises",
|
|
88
|
+
"node:repl",
|
|
89
|
+
"node:sea",
|
|
90
|
+
"node:sqlite",
|
|
91
|
+
"node:stream",
|
|
92
|
+
"node:stream/consumers",
|
|
93
|
+
"node:stream/promises",
|
|
94
|
+
"node:stream/web",
|
|
95
|
+
"node:string_decoder",
|
|
96
|
+
"node:sys",
|
|
97
|
+
"node:test",
|
|
98
|
+
"node:test/reporters",
|
|
99
|
+
"node:timers",
|
|
100
|
+
"node:timers/promises",
|
|
101
|
+
"node:tls",
|
|
102
|
+
"node:trace_events",
|
|
103
|
+
"node:tty",
|
|
104
|
+
"node:url",
|
|
105
|
+
"node:util",
|
|
106
|
+
"node:util/types",
|
|
107
|
+
"node:v8",
|
|
108
|
+
"node:vm",
|
|
109
|
+
"node:wasi",
|
|
110
|
+
"node:worker_threads",
|
|
111
|
+
"node:zlib",
|
|
112
|
+
"os",
|
|
113
|
+
"path",
|
|
114
|
+
"path/posix",
|
|
115
|
+
"path/win32",
|
|
116
|
+
"perf_hooks",
|
|
117
|
+
"process",
|
|
118
|
+
"punycode",
|
|
119
|
+
"querystring",
|
|
120
|
+
"readline",
|
|
121
|
+
"readline/promises",
|
|
122
|
+
"repl",
|
|
123
|
+
"stream",
|
|
124
|
+
"stream/consumers",
|
|
125
|
+
"stream/promises",
|
|
126
|
+
"stream/web",
|
|
127
|
+
"string_decoder",
|
|
128
|
+
"sys",
|
|
129
|
+
"timers",
|
|
130
|
+
"timers/promises",
|
|
131
|
+
"tls",
|
|
132
|
+
"trace_events",
|
|
133
|
+
"tty",
|
|
134
|
+
"url",
|
|
135
|
+
"util",
|
|
136
|
+
"util/types",
|
|
137
|
+
"v8",
|
|
138
|
+
"vm",
|
|
139
|
+
"wasi",
|
|
140
|
+
"worker_threads",
|
|
141
|
+
"zlib"
|
|
142
|
+
]);
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XY2A4W6O.js";
|
|
31
31
|
import {
|
|
32
32
|
createFileSystem,
|
|
33
33
|
createNodeFileSystemAdapterRegistry,
|
|
@@ -8183,4 +8183,4 @@ export {
|
|
|
8183
8183
|
parseMcpConfig,
|
|
8184
8184
|
makeMcpModule
|
|
8185
8185
|
};
|
|
8186
|
-
//# sourceMappingURL=chunk-
|
|
8186
|
+
//# sourceMappingURL=chunk-SUOXSVL2.js.map
|
|
@@ -1647,7 +1647,9 @@ function isExpressionEndingPunctuator(value) {
|
|
|
1647
1647
|
return value === ")" || value === "]" || value === "}" || value === "++" || value === "--";
|
|
1648
1648
|
}
|
|
1649
1649
|
function matchPunctuator(source, index) {
|
|
1650
|
-
return PUNCTUATORS.find(
|
|
1650
|
+
return PUNCTUATORS.find(
|
|
1651
|
+
(punctuator) => source.startsWith(punctuator, index) && (punctuator !== "?." || !isDecimalDigit(source[index + 2] ?? ""))
|
|
1652
|
+
);
|
|
1651
1653
|
}
|
|
1652
1654
|
function shouldRejectRegexLiteral(previousToken, lastClosedControlParenthesis) {
|
|
1653
1655
|
if (previousToken === void 0) {
|
|
@@ -26445,6 +26447,7 @@ var stringMethodNames = /* @__PURE__ */ new Set([
|
|
|
26445
26447
|
"endsWith",
|
|
26446
26448
|
"includes",
|
|
26447
26449
|
"indexOf",
|
|
26450
|
+
"isWellFormed",
|
|
26448
26451
|
"lastIndexOf",
|
|
26449
26452
|
"localeCompare",
|
|
26450
26453
|
"match",
|
|
@@ -26482,6 +26485,7 @@ function getStringMember(value, property, budget) {
|
|
|
26482
26485
|
sandbox: true,
|
|
26483
26486
|
name: `String#${property}`,
|
|
26484
26487
|
...property === "localeCompare" ? { length: 1 } : {},
|
|
26488
|
+
...property === "isWellFormed" ? { length: 0 } : {},
|
|
26485
26489
|
call: (args, context) => callStringMethod(
|
|
26486
26490
|
value,
|
|
26487
26491
|
property,
|
|
@@ -26505,6 +26509,21 @@ function isStringMethodName(property) {
|
|
|
26505
26509
|
function validateStringMethodArguments(_methodName, _args) {
|
|
26506
26510
|
}
|
|
26507
26511
|
function callStringMethod(value, methodName, args, budget, callClosure = async (closure, closureArgs) => await closure.call(closureArgs), parent) {
|
|
26512
|
+
if (methodName === "isWellFormed") {
|
|
26513
|
+
for (let index = 0; index < value.length; index++) {
|
|
26514
|
+
const codeUnit = value.charCodeAt(index);
|
|
26515
|
+
if (codeUnit >= 55296 && codeUnit <= 56319) {
|
|
26516
|
+
const nextCodeUnit = value.charCodeAt(index + 1);
|
|
26517
|
+
if (!(nextCodeUnit >= 56320 && nextCodeUnit <= 57343)) {
|
|
26518
|
+
return false;
|
|
26519
|
+
}
|
|
26520
|
+
index++;
|
|
26521
|
+
} else if (codeUnit >= 56320 && codeUnit <= 57343) {
|
|
26522
|
+
return false;
|
|
26523
|
+
}
|
|
26524
|
+
}
|
|
26525
|
+
return true;
|
|
26526
|
+
}
|
|
26508
26527
|
if (methodName === "replace" || methodName === "replaceAll") {
|
|
26509
26528
|
return callReplaceLikeMethod(value, methodName, args, budget, callClosure);
|
|
26510
26529
|
}
|
|
@@ -30656,4 +30675,4 @@ export {
|
|
|
30656
30675
|
FileSnapshotBackend,
|
|
30657
30676
|
run
|
|
30658
30677
|
};
|
|
30659
|
-
//# sourceMappingURL=chunk-
|
|
30678
|
+
//# sourceMappingURL=chunk-XY2A4W6O.js.map
|