Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions THIRDPARTY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Third-Party Notices

This project includes portions of code derived from third-party open-source software.

Each component retains its original license and attribution as noted below.

### pmmmwh/react-refresh-webpack-plugin

- **Source:** https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/0b960573797bf38926937994c481e4fec9ed8aa6
- **License:** MIT
- **Author:** Michael Mok
- **Copyright (c)** 2019 Michael Mok

The original license text is available at: https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE

### mahdyar/ansi-html-community

- **Source:** https://github.com/mahdyar/ansi-html-community/tree/b86cc3f1fa1d118477877352f0eafe1a70fd20ab
- **License:** Apache License 2.0
- **Original Author:** @Tjatse

Some utility code from this repository was adapted to enhance ANSI color parsing behavior.

The original license text is available at: https://github.com/mahdyar/ansi-html-community/blob/b86cc3f1fa1d118477877352f0eafe1a70fd20ab/LICENSE
9 changes: 0 additions & 9 deletions client/errorOverlayEntry.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
/* global __react_refresh_error_overlay__, __react_refresh_socket__, __resourceQuery */
/**
* The following code is modified based on
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f1c8b9a44198449093ca95f85af5df97925e1cfc/client/ErrorOverlayEntry.js
*
* MIT Licensed
* Author Michael Mok
* Copyright (c) 2019 Michael Mok
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
*/
const events = require('./utils/errorEventHandlers.js');
const formatWebpackErrors = require('./utils/formatWebpackErrors.js');
const runWithRetry = require('./utils/retry.js');
Expand Down
9 changes: 0 additions & 9 deletions client/overlay/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
/**
* The following code is modified based on
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f1c8b9a44198449093ca95f85af5df97925e1cfc/overlay/index.js
*
* MIT Licensed
* Author Michael Mok
* Copyright (c) 2019 Michael Mok
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
*/
const RuntimeErrorFooter = require('./components/RuntimeErrorFooter.js');
const RuntimeErrorHeader = require('./components/RuntimeErrorHeader.js');
const CompileErrorContainer = require('./containers/CompileErrorContainer.js');
Expand Down
2 changes: 0 additions & 2 deletions client/reactRefresh.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Thanks https://github.com/pmmmwh/react-refresh-webpack-plugin
const RefreshUtils = require('./refreshUtils');
const RefreshRuntime = require('react-refresh/runtime');

// Port from https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/loader/utils/getRefreshModuleRuntime.js#L29
function refresh(moduleId, webpackHot) {
const currentExports = RefreshUtils.getModuleExports(moduleId);
const fn = (exports) => {
Expand Down
10 changes: 0 additions & 10 deletions client/reactRefreshEntry.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/**
* The following code is modified based on
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/client/ReactRefreshEntry.js
*
* MIT Licensed
* Author Michael Mok
* Copyright (c) 2019 Michael Mok
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
*/

var RefreshRuntime = require('react-refresh/runtime');
var safeThis = (function () {
// copied from core-js-pure/features/global-this
Expand Down
10 changes: 0 additions & 10 deletions client/refreshUtils.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/**
* The following code is modified based on
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/lib/runtime/RefreshUtils.js
*
* MIT Licensed
* Author Michael Mok
* Copyright (c) 2019 Michael Mok
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
*/

/* global __webpack_require__ */
var Refresh = require('react-refresh/runtime');

Expand Down
11 changes: 2 additions & 9 deletions client/utils/ansi-html.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
/* eslint-disable */
// @ts-nocheck
/**
* The following code is modified based on
* https://github.com/mahdyar/ansi-html-community/blob/b86cc3f1fa1d118477877352f0eafe1a70fd20ab/index.js
*
* Supported:
* - added support for 24-bit RGB colors.
*
* Apache 2.0 Licensed
* Author @Tjatse
* https://github.com/mahdyar/ansi-html-community/blob/master/LICENSE
* The following code is modified based on mahdyar/ansi-html-community
* Added support for 24-bit RGB colors.
*/
'use strict';

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class ReactRefreshRspackPlugin {
},
resourceQuery: this.options.resourceQuery,
dependency: {
// `new URL("static/sdk.js", import.meta.url)` the sdk.js is an asset module
// we shoudn't inject react refresh for asset module
// Assets loaded via `new URL("static/sdk.js", import.meta.url)` are asset modules
// React Refresh should not be injected for asset modules as they are static resources
not: ['url'],
},
use: ReactRefreshRspackPlugin.loader,
Expand Down
9 changes: 0 additions & 9 deletions src/sockets/WDSSocket.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
/**
* The following code is modified based on
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f1c8b9a44198449093ca95f85af5df97925e1cfc/sockets/WDSSocket.js
*
* MIT Licensed
* Author Michael Mok
* Copyright (c) 2019 Michael Mok
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
*/
import getSocketUrlParts from './utils/getSocketUrlParts';
import getUrlFromParts from './utils/getUrlFromParts';
import getWDSMetadata from './utils/getWDSMetadata';
Expand Down
11 changes: 0 additions & 11 deletions src/sockets/WHMEventSource.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
/**
* The following code is modified based on
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f770d3962c388da01eeda7079bff5f40c93992d2/sockets/WHMEventSource.js
*
* MIT Licensed
* Author Michael Mok
* Copyright (c) 2019 Michael Mok
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f770d3962c388da01eeda7079bff5f40c93992d2/LICENSE
*/

/**
* The hard-coded singleton key for webpack-hot-middleware's client instance.
*
* [Ref](https://github.com/webpack-contrib/webpack-hot-middleware/blob/cb29abb9dde435a1ac8e9b19f82d7d36b1093198/client.js#L152)
*/
const singletonKey = '__webpack_hot_middleware_reporter__';
Expand Down