-
Notifications
You must be signed in to change notification settings - Fork 644
Comparing changes
Open a pull request
base repository: facebook/metro
base: v0.73.8
head repository: facebook/metro
compare: v0.74.0
Commits on Dec 15, 2022
-
Refactor watcher change handling to promises
Summary: Some lightweight modernising of `metro-file-map` watcher backends to allow the cleaner addition of an another async step (`readLink`), to follow. (Re `graceful-fs` -> `fs` in `FSEventsWatcher` - this only affects the call to `lstat`, which is [wrapped by `graceful-fs`](https://l.facebook.com/l.php?u=https%3A%2F%2Fgithub.com%2Fisaacs%2Fnode-graceful-fs%2Fblob%2F1f19b0b467e4144260b397343cd60f37c5bdcfda%2Fpolyfills.js%23L292&h=AT1P8P4IV8T7USaqoeaSrADFV0TYg4fSes1ACxBJTf1xD0thUYMKLdwbJ9DsI-jp3yG-j52_EJE7rec2VOa0H_0k5Prll3CAT747p8IGaxvZrscX40tFFtsWIB4OAB695JLank07cGR4vH57l13fVuxo) *only* to fix a very old `guid`/`uid` reporting issue irrelevant to us - in short, `graceful-fs` isn't adding anything here). Changelog: [Internal] Reviewed By: jacdebug Differential Revision: D41522808 fbshipit-source-id: 03819fc489710d3091505a83a3babfa5aceaf4a7
Configuration menu - View commit details
-
Copy full SHA for 2f42bc9 - Browse repository at this point
Copy the full SHA 2f42bc9View commit details
Commits on Dec 16, 2022
-
Remove @babel/plugin-transform-template-literals
Summary: Remove babel/plugin-transform-template-literals as this is natively supported by, - Hermes - JSC - v8 (Since some community uses v8 too). Ref: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#browser_compatibility - http://kangax.github.io/compat-table/es6/ - https://github.com/WebKit/WebKit/blob/923859afb65b75c83b5c6ce68846e14a8e38845d/Source/JavaScriptCore/features.json#L371 Changelog: [Breaking] Removed babel plugin transform-template-literals from metro preset Reviewed By: blakef Differential Revision: D42069641 fbshipit-source-id: e4dfc8234e2a74ab5ed68ed14258bcee03f5b67e
Configuration menu - View commit details
-
Copy full SHA for 322dea8 - Browse repository at this point
Copy the full SHA 322dea8View commit details
Commits on Dec 19, 2022
-
Remove non-implemented
postProcessBundleSourcemap
from docs and conβ¦β¦fig (#890) Summary: Remove docs, type and config default for the non-implemented `postProcessBundleSourcemap` Changelog: **[Breaking]** Remove `postProcessBundleSourcemap` from config *(Breaks consumers relying on the config default being populated with a function.)* -- Original PR description follows -- As [the issue](#400) mentions the function is not implemented therefore I thought it should be removed from the public docs. - #400 Pull Request resolved: #890 Test Plan: This is only a docs update no need for testing. Reviewed By: jacdebug Differential Revision: D41161760 Pulled By: robhogan fbshipit-source-id: bd57f9db2192f16afec66dc85a1a6180dda84b89
Configuration menu - View commit details
-
Copy full SHA for 339794e - Browse repository at this point
Copy the full SHA 339794eView commit details -
Add Watcher tests for behaviour on pre-existing files
Summary: Refactor watcher integration tests to extract a lot of supporting code for clarity, and add some fixtures *before* creating the Watcher in order to test behaviour when pre-existing files are modified or deleted. Use those fixtures for two additional tests. (Motivation: Similar tests for symlinks have inconsistent results, fixed in the next diff) Changelog: [Internal] Reviewed By: jacdebug Differential Revision: D42110285 fbshipit-source-id: 0721cbc5a41ce3eddef7ff4c4aff0b7ffff34156
Configuration menu - View commit details
-
Copy full SHA for 33ead26 - Browse repository at this point
Copy the full SHA 33ead26View commit details -
Consistent reporting of symlink changes across watcher backends
Summary: Currently, symlinks are reported (similarly to regular files) by all watcher backends when added or removed (if not ignored), *except* in some specific cases: - Symlinks discovered when adding a new subtree are not always reported by `NodeWatcher`. - Symlinks deleted are not reported by `FSEventsWatcher` or `NodeWatcher`. That's simply because we use `walker` to scan files, and it distinguishes symlinks from regular files - we were not listening to the `symlink` event. - In the case of symlinks in very new directories, that meant we didn't emit an `add` event unless we already had a watch on the parent - the scan is expected to race against the recursive watch, so this was non-deterministic. - In the case of symlink deletions, these were not reported by `NodeWatcher` or `FSEventsWatcher` because those rely on an internal set of "tracked" files provided by `walker`, and don't emit events for untracked files that no longer exist. This diff adds a listener for discovered symlinks and tests to verify pre-existing symlinks correctly have their deletion reported. Changelog: [Internal] *(symlink changes are not yet propagated out of `metro-file-map`, so this fix isn't technically observable)* Reviewed By: jacdebug Differential Revision: D41774723 fbshipit-source-id: 0e9e7d0ecd0bdfbb316af7657e7f2599b5dfb49d
Configuration menu - View commit details
-
Copy full SHA for bcb4d5b - Browse repository at this point
Copy the full SHA bcb4d5bView commit details -
Summary: Add tests exercising system `find` (where supported), recursive Node `fs` crawl, and first-run (no `since`) Watchman query, ahead of addressing inconsistencies and gaps in symlink handling. Reviewed By: motiz88 Differential Revision: D42122025 fbshipit-source-id: 8d547b95a02ef460aa7e4e32b9b53e9147306289
Configuration menu - View commit details
-
Copy full SHA for 8e946e9 - Browse repository at this point
Copy the full SHA 8e946e9View commit details -
Node crawler integration tests: Explicitly cover find vs recursive (#907
) Summary: Pull Request resolved: #907 D42122025 adds an integration test for the "node crawler" that tests both values of `forceNodeFilesystemAPI`. When `forceNodeFilesystemAPI` is `false`, the crawler runs a dummy `find` command to determine whether the system supports the necessary `find` syntax. If so, it proceeds with `find`, and if not it falls back to `fs` (the "Node filesystem API"). That left a potential gap in our tests, because if `hasNativeFindSupport` (eg because *it* has a bug or uses syntax supported nowhere) the `find` path would be broken, but the tests would still be green. This diff separates `hasNativeFindSupport` into a separate file so it can be mocked, to force testing of the `find` path more explicitly. We'll need to skip the test on systems that don't support it, as we do with Watchman and (macOS) FSEvents. NOTE: I'm sceptical about the `find` crawl, and may look to remove it. Although using "native" system features seems like a good idea, surprisingly some quick tests show it to be considerably slower than a recursive `fs` scan at all scales, at least on the OS/file systems I've tested. Reviewed By: motiz88 Differential Revision: D42128545 fbshipit-source-id: 2d164209f052af002c6fbd3b3ab6e04151235e8f
Configuration menu - View commit details
-
Copy full SHA for c8ae22d - Browse repository at this point
Copy the full SHA c8ae22dView commit details -
Node crawler: Drop unsupported Node <10.10 code paths
Summary: Metro already has a minimum Node version of 14, so we don't need to maintain this Node <10.10 fallback for `withFileTypes`. This just reduces some complexity and cases to cover ahead of working on these files. Reviewed By: motiz88 Differential Revision: D42115449 fbshipit-source-id: 2ead333b69446400735c5fd3348fec18a8248524
Configuration menu - View commit details
-
Copy full SHA for 7b4a4d0 - Browse repository at this point
Copy the full SHA 7b4a4d0View commit details -
Prevent
@babel/traverse
path cache side-effects in `generateFunctioβ¦β¦nMap` (#906) Summary: Pull Request resolved: #906 ## Motivation For performance reasons, we'd like to have the option to re-use an AST (without cloning) after deriving source map information from it. However, due to babel/babel#6437, traversing the AST within `generateFunctionMap` causes the `babel/traverse` path cache to be populated with entries Babel transform plugins can't use - in particular because `hub` is assumed to be set. ## Change This diffs saves and clears the traverse cache before traversal, and then restores it afterwards. This isn't pretty but it's the cleanest approach I could find - we include tests to verify that this is (and continues to be) necessary. ## Other approaches I tried some other things before resorting to manipulating `babel/traverse` internals: - Actually providing a `hub` so that it's set on the cache means adding a dependency on `babel/core`, and requires a similar level of hackery / assumptions of Babel internals. - Clearing the bad cache with `traverse.clearNode(ast)` or `traverse.cache.clearPath()` doesn't work because other tools (eg, Jest) rely on `properties` held in the path cache. Changelog: [Internal] Reviewed By: jacdebug, motiz88 Differential Revision: D42068914 fbshipit-source-id: e928b7ee1ffc5462f0ead7bcf4077b818a4cd95a
Configuration menu - View commit details
-
Copy full SHA for 29bb5f2 - Browse repository at this point
Copy the full SHA 29bb5f2View commit details -
feat: skip extraneously duplicating AST during transformation (#854)
Summary: We split the parse/transform steps up to accommodate Hermes parsing, but this defaults to cloning the AST which increases the transformation time by a fair amount. You get this behavior by default when using Babel's `transform` method directly, which is what other bundlers do. Pull Request resolved: #854 Test Plan: Bundling [`three.js`](https://unpkg.com/three@0.77.0/three.js) in production mode: `$ metro build ./example/index.js --out dist/index.js --platform ios --reset-cache --max-workers 0` Before: ``` babel.transform: 1.961s ``` After: ``` babel.transform: 1.047s ``` Reviewed By: GijsWeterings Differential Revision: D41036881 Pulled By: robhogan fbshipit-source-id: 5bed54f3363a60c5c087c06135d851b8fa1dc620
Configuration menu - View commit details
-
Copy full SHA for 553241c - Browse repository at this point
Copy the full SHA 553241cView commit details
Commits on Dec 21, 2022
-
Summary: Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D42188136 fbshipit-source-id: 6d9220f553ceece7871243ca73aa285df136ae72
Configuration menu - View commit details
-
Copy full SHA for fba10fe - Browse repository at this point
Copy the full SHA fba10feView commit details
Commits on Dec 22, 2022
-
Summary: Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D42203063 fbshipit-source-id: cf0281d202193e7c7fb232fc8db8029f3a700963
Configuration menu - View commit details
-
Copy full SHA for 736de64 - Browse repository at this point
Copy the full SHA 736de64View commit details
Commits on Dec 30, 2022
-
Add .gitattributes for LF line endings on Windows
Summary: When cloning the Metro repo on Windows with default git settings, the working copy will be created with CRLF endings. This breaks integration tests expecting particular file sizes. With `.gitattributes` we can ensure that LF endings are retained. Reviewed By: motiz88 Differential Revision: D42266712 fbshipit-source-id: b9628565e21f194e0dccaf847bf1b974755b41cd
Configuration menu - View commit details
-
Copy full SHA for 216c5c4 - Browse repository at this point
Copy the full SHA 216c5c4View commit details -
Fix Windows platform detection, Watchman detection in tests
Summary: While checking some `metro-file-map` behaviour on Windows I noticed the Watchman detection we use in integration tests was all wrong :) - `os.platform()` returns `win32` on Windows, not `windows`. - `where` works in a command prompt but not PowerShell - there it's usually an alias for `Where-Object`. `where.exe` works on both. - `where.exe` prints "INFO: Could not find files for the given pattern(s)" to stderr on no match. Use `/Q` for silent running - the exit code is all we need. Reviewed By: motiz88 Differential Revision: D42266748 fbshipit-source-id: 4494cd39dd94da7dc17442264a3828a35aaf9c30
Configuration menu - View commit details
-
Copy full SHA for 2d60a02 - Browse repository at this point
Copy the full SHA 2d60a02View commit details
Commits on Jan 3, 2023
-
Add symlink field to file metadata and cache
Summary: This adds another entry to the `FileMetadata` tuple used throughout `metro-file-map`, to be used to compactly represent: a) Whether a file is regular or a symlink b) The symlink target, if known. In doing so, it changes the persisted cache format - so this diff also bumps the `CACHE_BREAKER` key. Note that because Metro only passes `enableSymlinks: false` to the `metro-file-map`, and this config isn't exposed to the user, *all* crawl results should currently have a `0` entry. ## Storing symlinks in the `files` map I considered storing symlinks in a separate `Map` alongside `files`, which is slightly more compact. Ultimately though this is more difficult to work with - almost every lookup becomes two lookups and it's rare that we'd need to iterate over one but not the other. We could revisit this if we ever separate the serialised structure from the working-copy structure. ## Type: `0 | 1 | string` There are a couple of considerations in this type, which aims to compactly capture both the type and (optionally) the symlink target: - As an intermediate state, it's useful to be able to record that a file is a symlink without necessarily knowing the target. In particular, this allows us to `readlink` downstream of non-Watchman crawlers and watchers that can't natively provide the target, e.g. in the multi-thread `processFile` phase, or indeed on demand. - We use `0 | 1` as opposed to `boolean` for serialised compactness, following the precedent of `H.VISITED`. (`null` would be ambiguous in this context.) NOTE: `metadata[H.SYMLINK] === 0` should be used to check for regular files at the low level - truthiness is unreliable because [POSIX says](https://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html) the target is an arbitrary string (including an empty string) - (in practice - macOS allows empty symlinks, linux doesn't). Reviewed By: huntie Differential Revision: D42131590 fbshipit-source-id: 1fa39576988159887b88057f003de6018b85a583
Configuration menu - View commit details
-
Copy full SHA for 58c88b8 - Browse repository at this point
Copy the full SHA 58c88b8View commit details -
Fix ENOENT during symbolication for known source URLs (#910)
Summary: As reported in expo/expo#17903, Metro logs errors to console attempting to read nonsense file paths. This occurs when trying to build a code frame for a URL `frame.file`, which Metro *should* skip attempting for any URLs it has already seen. Typically, URLs reach this point when a particular frame cannot be symbolicated. The problem goes back to D25262626 (8cf2434), which introduced resolving the "file" to an absolute path before checking for its presence in the list of known URLs. The `urls.has` check has effectively been broken since then. This restores the `urls` map lookup with the "unresolved" `file`, and allows `getCodeFrame` to skip trying to read the nonsense path. The runtime result is the same either way - `getCodeFrame` moves on to the next frame in the stack, but no error should be logged to console. This also eliminates some noisy logging to console while running Jest tests. Supersedes #841 Changelog: [Fix] Don't log ENOENT errors to console for expected URL stack frames Pull Request resolved: #910 Test Plan: ### Before Added failing tests to `Server-test.js`: ``` yarn jest Server/__tests__/Server-test yarn run v1.22.19 $ /Users/robhogan/gh/metro-symbolicate/node_modules/.bin/jest Server/__tests__/Server-test (node:5886) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit (Use `node --trace-warnings ...` to show where the warning was created) FAIL packages/metro/src/Server/__tests__/Server-test.js (6.25 s) processRequest β returns JS bundle source on request of *.bundle (978 ms) β returns a bytecode bundle source on request of *.bundle?runtimeBytecodeVersion (209 ms) β returns JS bundle without the initial require() call (106 ms) β returns Last-Modified header on request of *.bundle (104 ms) β returns build info headers on request of *.bundle (108 ms) β returns Content-Length header on request of *.bundle (99 ms) β returns 404 on request of *.bundle when resource does not exist (103 ms) β returns 304 on request of *.bundle when if-modified-since equals Last-Modified (110 ms) β returns 200 on request of *.bundle when something changes (ignoring if-modified-since headers) (114 ms) β supports the `modulesOnly` option (100 ms) β supports the `shallow` option (99 ms) β should handle DELETE requests on *.bundle (112 ms) β multiple DELETE requests on *.bundle succeed (109 ms) β DELETE succeeds with a nonexistent path (102 ms) β DELETE handles errors (106 ms) β returns sourcemap on request of *.map (109 ms) β source map request respects `modulesOnly` option (113 ms) β does not rebuild the graph when requesting the sourcemaps after having requested the same bundle (101 ms) β does build a delta when requesting the sourcemaps after having requested the same bundle (103 ms) β does rebuild the graph when requesting the sourcemaps if the bundle has not been built yet (114 ms) β passes in the platform param (116 ms) β passes in the unstable_transformProfile param (101 ms) β rewrites URLs before bundling (103 ms) β does not rebuild the bundle when making concurrent requests (108 ms) /assets endpoint β should serve simple case (88 ms) β should parse the platform option (77 ms) β should serve range request (75 ms) β should serve assets files's name contain non-latin letter (73 ms) β should use unstable_path if provided (80 ms) β should parse the platform option if tacked onto unstable_path (82 ms) β unstable_path can escape from projectRoot (74 ms) build(options) β Calls the delta bundler with the correct args (82 ms) /symbolicate endpoint β should symbolicate given stack trace (105 ms) β should update the graph when symbolicating a second time (114 ms) β supports the `modulesOnly` option (137 ms) β supports the `shallow` option (108 ms) β should symbolicate function name if available (105 ms) β should collapse frames as specified in customizeFrame (107 ms) β should leave original file and position when cannot symbolicate (132 ms) should rewrite URLs before symbolicating β mapped location symbolicates correctly (108 ms) β unmapped location returns the rewritten URL (112 ms) /symbolicate handles errors β should symbolicate given stack trace (80 ms) β processRequest βΊ /symbolicate endpoint βΊ should rewrite URLs before symbolicating βΊ unmapped location returns the rewritten URL expect(jest.fn()).not.toHaveBeenCalled() Expected number of calls: 0 Received number of calls: 1 1: [Error: ENOENT: `/root/http:/localhost:8081/mybundle.bundle?runModule=true&TEST_URL_WAS_REWRITTEN=true`: no such file or directory] 119 | afterEach(() => { 120 | expect(mockConsoleWarn).not.toHaveBeenCalled(); > 121 | expect(mockConsoleError).not.toHaveBeenCalled(); | ^ 122 | }); 123 | 124 | let server; at Object.toHaveBeenCalled (packages/metro/src/Server/__tests__/Server-test.js:121:34) β processRequest βΊ /symbolicate endpoint βΊ should leave original file and position when cannot symbolicate expect(jest.fn()).not.toHaveBeenCalled() Expected number of calls: 0 Received number of calls: 1 1: [Error: ENOENT: `/root/http:/localhost:8081/mybundle.bundle?runModule=true`: no such file or directory] 119 | afterEach(() => { 120 | expect(mockConsoleWarn).not.toHaveBeenCalled(); > 121 | expect(mockConsoleError).not.toHaveBeenCalled(); | ^ 122 | }); 123 | 124 | let server; at Object.toHaveBeenCalled (packages/metro/src/Server/__tests__/Server-test.js:121:34) Test Suites: 1 failed, 1 total Tests: 2 failed, 40 passed, 42 total Snapshots: 3 passed, 3 total Time: 6.383 s, estimated 7 s ``` ### After ``` yarn jest Server/__tests__/Server-test yarn run v1.22.19 $ /Users/robhogan/gh/metro-symbolicate/node_modules/.bin/jest Server/__tests__/Server-test (node:6573) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit (Use `node --trace-warnings ...` to show where the warning was created) PASS packages/metro/src/Server/__tests__/Server-test.js (5.609 s) processRequest β returns JS bundle source on request of *.bundle (683 ms) β returns a bytecode bundle source on request of *.bundle?runtimeBytecodeVersion (217 ms) β returns JS bundle without the initial require() call (107 ms) β returns Last-Modified header on request of *.bundle (103 ms) β returns build info headers on request of *.bundle (108 ms) β returns Content-Length header on request of *.bundle (101 ms) β returns 404 on request of *.bundle when resource does not exist (99 ms) β returns 304 on request of *.bundle when if-modified-since equals Last-Modified (108 ms) β returns 200 on request of *.bundle when something changes (ignoring if-modified-since headers) (112 ms) β supports the `modulesOnly` option (101 ms) β supports the `shallow` option (104 ms) β should handle DELETE requests on *.bundle (112 ms) β multiple DELETE requests on *.bundle succeed (114 ms) β DELETE succeeds with a nonexistent path (92 ms) β DELETE handles errors (113 ms) β returns sourcemap on request of *.map (106 ms) β source map request respects `modulesOnly` option (109 ms) β does not rebuild the graph when requesting the sourcemaps after having requested the same bundle (106 ms) β does build a delta when requesting the sourcemaps after having requested the same bundle (101 ms) β does rebuild the graph when requesting the sourcemaps if the bundle has not been built yet (113 ms) β passes in the platform param (108 ms) β passes in the unstable_transformProfile param (100 ms) β rewrites URLs before bundling (100 ms) β does not rebuild the bundle when making concurrent requests (110 ms) /assets endpoint β should serve simple case (95 ms) β should parse the platform option (73 ms) β should serve range request (73 ms) β should serve assets files's name contain non-latin letter (77 ms) β should use unstable_path if provided (76 ms) β should parse the platform option if tacked onto unstable_path (74 ms) β unstable_path can escape from projectRoot (80 ms) build(options) β Calls the delta bundler with the correct args (81 ms) /symbolicate endpoint β should symbolicate given stack trace (100 ms) β should update the graph when symbolicating a second time (109 ms) β supports the `modulesOnly` option (123 ms) β supports the `shallow` option (102 ms) β should symbolicate function name if available (101 ms) β should collapse frames as specified in customizeFrame (99 ms) β should leave original file and position when cannot symbolicate (131 ms) should rewrite URLs before symbolicating β mapped location symbolicates correctly (106 ms) β unmapped location returns the rewritten URL (103 ms) /symbolicate handles errors β should symbolicate given stack trace (76 ms) Test Suites: 1 passed, 1 total Tests: 42 passed, 42 total Snapshots: 3 passed, 3 total Time: 5.7 s, estimated 7 s ``` Reviewed By: motiz88, huntie Differential Revision: D42246439 Pulled By: robhogan fbshipit-source-id: 76019bf48588e82c4091abc5bc7db8c88098c48c
Configuration menu - View commit details
-
Copy full SHA for 1031ae6 - Browse repository at this point
Copy the full SHA 1031ae6View commit details -
Bump decode-uri-component from 0.2.0 to 0.2.2 (#904)
Summary: Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/SamVerschueren/decode-uri-component/releases">decode-uri-component's releases</a>.</em></p> <blockquote> <h2>v0.2.2</h2> <ul> <li>Prevent overwriting previously decoded tokens 980e0bf</li> </ul> <p><a href="https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2">https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2</a></p> <h2>v0.2.1</h2> <ul> <li>Switch to GitHub workflows 76abc93</li> <li>Fix issue where decode throws - fixes <a href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/6">https://github.com/facebook/metro/issues/6</a> 746ca5d</li> <li>Update license (<a href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/1">https://github.com/facebook/metro/issues/1</a>) 486d7e2</li> <li>Tidelift tasks a650457</li> <li>Meta tweaks 66e1c28</li> </ul> <p><a href="https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1">https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/a0eea469d26eb0df668b081672cdb9581feb78eb"><code>a0eea46</code></a> 0.2.2</li> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/980e0bf09b64d94f1aa79012f895816c30ffd152"><code>980e0bf</code></a> Prevent overwriting previously decoded tokens</li> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/3c8a373dd4837e89b3f970e01295dd03e1405a33"><code>3c8a373</code></a> 0.2.1</li> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/76abc939783fe3900fadb7d384a74d324d5557f3"><code>76abc93</code></a> Switch to GitHub workflows</li> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/746ca5dcb6667c5d364e782d53c542830e4c10b9"><code>746ca5d</code></a> Fix issue where decode throws - fixes <a href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/6">https://github.com/facebook/metro/issues/6</a></li> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/486d7e26d3a8c0fbe860fb651fe1bc98c2f2be30"><code>486d7e2</code></a> Update license (<a href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/1">https://github.com/facebook/metro/issues/1</a>)</li> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/a65045724e6234acef87f31da499d4807b20b134"><code>a650457</code></a> Tidelift tasks</li> <li><a href="https://github.com/SamVerschueren/decode-uri-component/commit/66e1c2834c0e189201cb65196ec3101372459b02"><code>66e1c28</code></a> Meta tweaks</li> <li>See full diff in <a href="https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/metro/network/alerts). </details> Pull Request resolved: #904 Reviewed By: huntie Differential Revision: D42144247 Pulled By: robhogan fbshipit-source-id: 84a40b3af0559564a8a5431db5b294507d5ca88a
Configuration menu - View commit details
-
Copy full SHA for e197bc2 - Browse repository at this point
Copy the full SHA e197bc2View commit details -
Watchman crawler: remove
symlink_target
Summary: Watchman "since" queries and subscriptions currently fail when `symlink_target` is requested and the result would include a deleted symlink *except* on Eden. - facebook/watchman#1084 Additionally, the Eden watcher lacks the potential bulk-fetch optimisation that would make it preferable to calling `readlink` ourselves: - https://github.com/facebook/watchman/blob/v2023.01.02.00/watchman/watcher/eden.cpp#L476-L485 - https://github.com/facebook/watchman/blob/v2023.01.02.00/watchman/watcher/eden.cpp#L433-L434 This change removes the use of `symlink_target` until it is reliable and efficient on at least one backend. Additionally, we gather and record the `watcher` from the `watch-project` response. In the first version of this diff we enabled `symlink_target` for `eden` only - the `watcher` field is now only used to provide an extra perf log annotation, but since it's gathered at no cost and potentially useful for Watcher-based query planning in future, I've left it in. Changelog: [Internal] Remove `symlink_target` from Watchman crawler Reviewed By: motiz88 Differential Revision: D42143103 fbshipit-source-id: 9f1cce64a7ef3c8ec3759f1e4c1e9317f728e118
Configuration menu - View commit details
-
Copy full SHA for e402dd2 - Browse repository at this point
Copy the full SHA e402dd2View commit details -
Implement consistent
includeSymlinks
option for crawlersSummary: Remove inconsistent `enableSymlinks` and implement `includeSymlinks` across crawler backends. The contract here is that: - `includeSymlinks: false` should not return any symlinks in crawl results. - `includeSymlinks: true` should return symlinks and the metadata corresponding to the link itself (`lstat`, not `stat`), *without* filtering them by extension (because symlink targets may be directories). - `previousState` given to crawlers is assumed to follow the rules above. This does not alter the observable behaviour of Metro because we don't expose `enableSymlinks` or change the behaviour of `enableSymlinks: false`. However, it will be breaking for Jest should we upstream this. Changelog: [Internal] Implement consistent `includeSymlinks` option for crawler backends (not yet exposed) Reviewed By: motiz88 Differential Revision: D42143877 fbshipit-source-id: 6f6e00887257b4cc909e2f209805f1df6ea64bb3
Configuration menu - View commit details
-
Copy full SHA for 456718d - Browse repository at this point
Copy the full SHA 456718dView commit details -
Bump json5 from 2.2.1 to 2.2.3 in /website (#911)
Summary: Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p> <blockquote> <h2>v2.2.3</h2> <ul> <li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">https://github.com/facebook/metro/issues/299</a>)</li> </ul> <h2>v2.2.2</h2> <ul> <li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/metro/issues/199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>).</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/json5/json5/blob/main/CHANGELOG.md">json5's changelog</a>.</em></p> <blockquote> <h3>v2.2.3 [<a href="https://github.com/json5/json5/tree/v2.2.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.2...v2.2.3">diff</a>]</h3> <ul> <li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">https://github.com/facebook/metro/issues/299</a>)</li> </ul> <h3>v2.2.2 [<a href="https://github.com/json5/json5/tree/v2.2.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.2">diff</a>]</h3> <ul> <li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/metro/issues/199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/json5/json5/commit/c3a75242772a5026a49c4017a16d9b3543b62776"><code>c3a7524</code></a> 2.2.3</li> <li><a href="https://github.com/json5/json5/commit/94fd06d82eeed225fa172f6fb2ca27375cbd2e39"><code>94fd06d</code></a> docs: update CHANGELOG for v2.2.3</li> <li><a href="https://github.com/json5/json5/commit/3b8cebf0c474a8b20c78bd75c89cca0c4dce84ce"><code>3b8cebf</code></a> docs(security): use GitHub security advisories</li> <li><a href="https://github.com/json5/json5/commit/f0fd9e194dde282caff114a110f4fac635f3a62c"><code>f0fd9e1</code></a> docs: publish a security policy</li> <li><a href="https://github.com/json5/json5/commit/6a91a05fffeda16ff6b3b5008b6b340d42d31ec0"><code>6a91a05</code></a> docs(template): bug -> bug report</li> <li><a href="https://github.com/json5/json5/commit/14f8cb186e8abdfaccf6527171da7b1224374650"><code>14f8cb1</code></a> 2.2.2</li> <li><a href="https://github.com/json5/json5/commit/10cc7ca9169b59c5e0f5afc03dbd870cd06bcc46"><code>10cc7ca</code></a> docs: update CHANGELOG for v2.2.2</li> <li><a href="https://github.com/json5/json5/commit/7774c1097993bc3ce9f0ac4b722a32bf7d6871c8"><code>7774c10</code></a> fix: add <strong>proto</strong> to objects and arrays</li> <li><a href="https://github.com/json5/json5/commit/edde30abd8b22facf2c06c72586b9f6edf12700d"><code>edde30a</code></a> Readme: slight tweak to intro</li> <li><a href="https://github.com/json5/json5/commit/97286f8bd542c89dcee096bc05dd28ed2dfc1e16"><code>97286f8</code></a> Improve example in readme</li> <li>Additional commits viewable in <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.3">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/metro/network/alerts). </details> Pull Request resolved: #911 Reviewed By: huntie Differential Revision: D42314022 Pulled By: robhogan fbshipit-source-id: 9a46e58f8a0a7ea5a3fedbf7df761ecebc437e8b
Configuration menu - View commit details
-
Copy full SHA for 6620386 - Browse repository at this point
Copy the full SHA 6620386View commit details -
Bump json5 from 1.0.1 to 1.0.2 (#912)
Summary: Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p> <blockquote> <h2>v1.0.2</h2> <ul> <li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/metro/issues/199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>). This has been backported to v1. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/298">#298</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/json5/json5/blob/main/CHANGELOG.md">json5's changelog</a>.</em></p> <blockquote> <h3>Unreleased [<a href="https://github.com/json5/json5/tree/main">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.3...HEAD">diff</a>]</h3> <h3>v2.2.3 [<a href="https://github.com/json5/json5/tree/v2.2.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.2...v2.2.3">diff</a>]</h3> <ul> <li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">https://github.com/facebook/metro/issues/299</a>)</li> </ul> <h3>v2.2.2 [<a href="https://github.com/json5/json5/tree/v2.2.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.2">diff</a>]</h3> <ul> <li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/metro/issues/199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>).</li> </ul> <h3>v2.2.1 [<a href="https://github.com/json5/json5/tree/v2.2.1">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.0...v2.2.1">diff</a>]</h3> <ul> <li>Fix: Removed dependence on minimist to patch CVE-2021-44906. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/266">https://github.com/facebook/metro/issues/266</a>)</li> </ul> <h3>v2.2.0 [<a href="https://github.com/json5/json5/tree/v2.2.0">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.3...v2.2.0">diff</a>]</h3> <ul> <li>New: Accurate and documented TypeScript declarations are now included. There is no need to install <code>types/json5</code>. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/236">https://github.com/facebook/metro/issues/236</a>, <a href="https://github-redirect.dependabot.com/json5/json5/issues/244">https://github.com/facebook/metro/issues/244</a>)</li> </ul> <h3>v2.1.3 [<a href="https://github.com/json5/json5/tree/v2.1.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.2...v2.1.3">diff</a>]</h3> <ul> <li>Fix: An out of memory bug when parsing numbers has been fixed. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/228">https://github.com/facebook/metro/issues/228</a>, <a href="https://github-redirect.dependabot.com/json5/json5/issues/229">https://github.com/facebook/metro/issues/229</a>)</li> </ul> <h3>v2.1.2 [<a href="https://github.com/json5/json5/tree/v2.1.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.1...v2.1.2">diff</a>]</h3> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/json5/json5/commit/a62db1e51e1031d92ac260f5bb38bbed1fdbc754"><code>a62db1e</code></a> 1.0.2</li> <li><a href="https://github.com/json5/json5/commit/e0c23fe458a77c0b2cdb271376be5d8d0908133c"><code>e0c23fe</code></a> docs: update CHANGELOG for v1.0.2</li> <li><a href="https://github.com/json5/json5/commit/62a65408408d40aeea14c7869ed327acead12972"><code>62a6540</code></a> fix: add <strong>proto</strong> to objects and arrays</li> <li>See full diff in <a href="https://github.com/json5/json5/compare/v1.0.1...v1.0.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/metro/network/alerts). </details> Pull Request resolved: #912 Reviewed By: robhogan Differential Revision: D42319230 Pulled By: huntie fbshipit-source-id: 14f9eca13a166f39a80f81aecc6bc0cbd6de8986
Configuration menu - View commit details
-
Copy full SHA for 7d89ee4 - Browse repository at this point
Copy the full SHA 7d89ee4View commit details
Commits on Jan 4, 2023
-
Improve Fast Refresh responsiveness when watching a large number of fβ¦
β¦iles (#913) Summary: Pull Request resolved: #913 Following D40829941 (7191173), where we changed the output of `metro-file-map`'s `build()` to return "live" references to the file system and the Haste module map (rather than snapshots), we no longer require further snapshots to be emitted as part of a change event payload. In fact, `ChangeEvent['snapshotFS']` and `ChangeEvent['moduleMap']` are currently only referenced in test code. Removing them means we don't have to copy potentially large data structures on each emitted change. With ~300k files and ~150k Haste map entries, this amounts to ~200ms more responsive fast refresh - in general this boost will be proportional to the total number of files+Haste modules watched. After this, a `HasteFS` instance is only constructed once, on Metro startup. That clears the way for an alternative (more expensive to initialise) implementation capable of performing lookups through symlinks. Changelog: [Performance] Improve Fast Refresh responsiveness when watching a large number of files. Reviewed By: motiz88 Differential Revision: D42303139 fbshipit-source-id: b158ca2fdcddf02ecb2f2d17bc5b35e448fed0ae
Configuration menu - View commit details
-
Copy full SHA for b942eca - Browse repository at this point
Copy the full SHA b942ecaView commit details
Commits on Jan 5, 2023
-
Don't attempt to use
find
crawler on WindowsSummary: This replicates the [hotfix](3703019) released in 0.73.7, to address an issue whereby Metro would fail to crawl files on Windows for non-Watchman MinGW users. A more substantial fix should follow - IMO, we should remove this `find` crawler completely unless it's more performant in some circumstance. This diff just brings in the quick, least-intrusive fix to get `main` up to parity with `0.73.x`. Closes: #914 Reviewed By: huntie Differential Revision: D42371016 fbshipit-source-id: 3bd9c5e5bd42245ada39b314ac2c6301ca4315f4
Configuration menu - View commit details
-
Copy full SHA for 735aa9f - Browse repository at this point
Copy the full SHA 735aa9fView commit details
Commits on Jan 9, 2023
-
GitHub Workflows security hardening (#870)
Summary: This PR adds explicit [permissions section](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions) to workflows. This is a security best practice because by default workflows run with [extended set of permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) (except from `on: pull_request` [from external forks](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an [injection](https://securitylab.github.com/research/github-actions-untrusted-input/) or compromised third party tool or action) is restricted. It is recommended to have [most strict permissions on the top level](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) and grant write permissions on [job level](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) case by case. Pull Request resolved: #870 Reviewed By: jacdebug Differential Revision: D42406481 Pulled By: robhogan fbshipit-source-id: c1118141c8b95d85c850ebe91b6b72c3b5170869
Configuration menu - View commit details
-
Copy full SHA for b27ceef - Browse repository at this point
Copy the full SHA b27ceefView commit details -
Reviewed By: jacdebug Differential Revision: D42368262 fbshipit-source-id: 274c6d47c15075ac1db1ab68459edbedc9079ed3
Configuration menu - View commit details
-
Copy full SHA for 67d211d - Browse repository at this point
Copy the full SHA 67d211dView commit details
There are no files selected for viewing