Skip to content

Commit 2e13ddf

Browse files
Merge branch 'upstream/main' into escape-sequence
2 parents d165d08 + e4816ed commit 2e13ddf

File tree

321 files changed

+11886
-2824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+11886
-2824
lines changed

.github/codeql/codeql-configuration.yml

+1-27
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,6 @@ name : CodeQL Configuration
33
paths:
44
- src
55
- scripts
6-
- Gulpfile.mjs
6+
- Herebyfile.mjs
77
paths-ignore:
88
- src/lib
9-
10-
# These queries appear to time out after the module conversion.
11-
# https://github.com/github/codeql/issues/10937
12-
query-filters:
13-
- exclude:
14-
id: js/path-injection # TaintedPath.ql
15-
- exclude:
16-
id: js/command-line-injection # CommandInjection.ql
17-
- exclude:
18-
id: js/code-injection # CodeInjection.ql
19-
- exclude:
20-
id: js/bad-code-sanitization # ImproperCodeSanitization.ql
21-
- exclude:
22-
id: js/unsafe-dynamic-method-access # UnsafeDynamicMethodAccess.ql
23-
- exclude:
24-
id: js/clear-text-logging # CleartextLogging.ql
25-
- exclude:
26-
id: js/regex-injection # RegExpInjection.ql
27-
- exclude:
28-
id: js/unvalidated-dynamic-method-call # UnvalidatedDynamicMethodCall.ql
29-
- exclude:
30-
id: js/insecure-download # InsecureDownload.ql
31-
- exclude:
32-
id: js/prototype-polluting-assignment # PrototypePollutingAssignment.ql
33-
- exclude:
34-
id: js/request-forgery # RequestForgery.ql

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@ tests/cases/user/puppeteer/puppeteer
8484
tests/cases/user/axios-src/axios-src
8585
tests/cases/user/prettier/prettier
8686
.eslintcache
87+
*v8.log

Herebyfile.mjs

+1-32
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ async function runDtsBundler(entrypoint, output) {
160160
* @param {BundlerTaskOptions} [taskOptions]
161161
*
162162
* @typedef BundlerTaskOptions
163-
* @property {string[]} [external]
164163
* @property {boolean} [exportIsTsObject]
165164
* @property {boolean} [treeShaking]
166165
* @property {esbuild.WatchMode} [watchMode]
@@ -179,32 +178,10 @@ function createBundler(entrypoint, outfile, taskOptions = {}) {
179178
sourcemap: "linked",
180179
sourcesContent: false,
181180
treeShaking: taskOptions.treeShaking,
182-
external: [
183-
...(taskOptions.external ?? []),
184-
"source-map-support",
185-
],
181+
packages: "external",
186182
logLevel: "warning",
187183
// legalComments: "none", // If we add copyright headers to the source files, uncomment.
188184
plugins: [
189-
{
190-
name: "no-node-modules",
191-
setup: (build) => {
192-
build.onLoad({ filter: /[\\/]node_modules[\\/]/ }, () => {
193-
// Ideally, we'd use "--external:./node_modules/*" here, but that doesn't work; we
194-
// will instead end up with paths to node_modules rather than the package names.
195-
// Instead, we'll return a load error when we see that we're trying to bundle from
196-
// node_modules, then explicitly declare which external dependencies we rely on, which
197-
// ensures that the correct module specifier is kept in the output (the non-wildcard
198-
// form works properly). It also helps us keep tabs on what external dependencies we
199-
// may be importing, which is handy.
200-
//
201-
// See: https://github.com/evanw/esbuild/issues/1958
202-
return {
203-
errors: [{ text: 'Attempted to bundle from node_modules; ensure "external" is set correctly.' }]
204-
};
205-
});
206-
}
207-
},
208185
{
209186
name: "fix-require",
210187
setup: (build) => {
@@ -448,14 +425,6 @@ const { main: tests, watch: watchTests } = entrypointBuildTask({
448425
bundlerOptions: {
449426
// Ensure we never drop any dead code, which might be helpful while debugging.
450427
treeShaking: false,
451-
// These are directly imported via import statements and should not be bundled.
452-
external: [
453-
"chai",
454-
"del",
455-
"diff",
456-
"mocha",
457-
"ms",
458-
],
459428
watchMode: {
460429
onRebuild() {
461430
watchTestsEmitter.emit("rebuild");

0 commit comments

Comments
 (0)