Skip to content

Commit 5832db3

Browse files
authored
docs: move license headers to THIRDPARTY.md (#64)
1 parent 3ea3f3e commit 5832db3

File tree

10 files changed

+28
-71
lines changed

10 files changed

+28
-71
lines changed

THIRDPARTY.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Third-Party Notices
2+
3+
This project includes portions of code derived from third-party open-source software.
4+
5+
Each component retains its original license and attribution as noted below.
6+
7+
### pmmmwh/react-refresh-webpack-plugin
8+
9+
- **Source:** https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/0b960573797bf38926937994c481e4fec9ed8aa6
10+
- **License:** MIT
11+
- **Author:** Michael Mok
12+
- **Copyright (c)** 2019 Michael Mok
13+
14+
The original license text is available at: https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
15+
16+
### mahdyar/ansi-html-community
17+
18+
- **Source:** https://github.com/mahdyar/ansi-html-community/tree/b86cc3f1fa1d118477877352f0eafe1a70fd20ab
19+
- **License:** Apache License 2.0
20+
- **Original Author:** @Tjatse
21+
22+
Some utility code from this repository was adapted to enhance ANSI color parsing behavior.
23+
24+
The original license text is available at: https://github.com/mahdyar/ansi-html-community/blob/b86cc3f1fa1d118477877352f0eafe1a70fd20ab/LICENSE

client/errorOverlayEntry.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
/* global __react_refresh_error_overlay__, __react_refresh_socket__, __resourceQuery */
2-
/**
3-
* The following code is modified based on
4-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f1c8b9a44198449093ca95f85af5df97925e1cfc/client/ErrorOverlayEntry.js
5-
*
6-
* MIT Licensed
7-
* Author Michael Mok
8-
* Copyright (c) 2019 Michael Mok
9-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
10-
*/
112
const events = require('./utils/errorEventHandlers.js');
123
const formatWebpackErrors = require('./utils/formatWebpackErrors.js');
134
const runWithRetry = require('./utils/retry.js');

client/overlay/index.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/**
2-
* The following code is modified based on
3-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f1c8b9a44198449093ca95f85af5df97925e1cfc/overlay/index.js
4-
*
5-
* MIT Licensed
6-
* Author Michael Mok
7-
* Copyright (c) 2019 Michael Mok
8-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
9-
*/
101
const RuntimeErrorFooter = require('./components/RuntimeErrorFooter.js');
112
const RuntimeErrorHeader = require('./components/RuntimeErrorHeader.js');
123
const CompileErrorContainer = require('./containers/CompileErrorContainer.js');

client/reactRefresh.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// Thanks https://github.com/pmmmwh/react-refresh-webpack-plugin
21
const RefreshUtils = require('./refreshUtils');
32
const RefreshRuntime = require('react-refresh/runtime');
43

5-
// Port from https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/loader/utils/getRefreshModuleRuntime.js#L29
64
function refresh(moduleId, webpackHot) {
75
const currentExports = RefreshUtils.getModuleExports(moduleId);
86
const fn = (exports) => {

client/reactRefreshEntry.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/**
2-
* The following code is modified based on
3-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/client/ReactRefreshEntry.js
4-
*
5-
* MIT Licensed
6-
* Author Michael Mok
7-
* Copyright (c) 2019 Michael Mok
8-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
9-
*/
10-
111
var RefreshRuntime = require('react-refresh/runtime');
122
var safeThis = (function () {
133
// copied from core-js-pure/features/global-this

client/refreshUtils.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/**
2-
* The following code is modified based on
3-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/lib/runtime/RefreshUtils.js
4-
*
5-
* MIT Licensed
6-
* Author Michael Mok
7-
* Copyright (c) 2019 Michael Mok
8-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
9-
*/
10-
111
/* global __webpack_require__ */
122
var Refresh = require('react-refresh/runtime');
133

client/utils/ansi-html.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
/* eslint-disable */
22
// @ts-nocheck
33
/**
4-
* The following code is modified based on
5-
* https://github.com/mahdyar/ansi-html-community/blob/b86cc3f1fa1d118477877352f0eafe1a70fd20ab/index.js
6-
*
7-
* Supported:
8-
* - added support for 24-bit RGB colors.
9-
*
10-
* Apache 2.0 Licensed
11-
* Author @Tjatse
12-
* https://github.com/mahdyar/ansi-html-community/blob/master/LICENSE
4+
* The following code is modified based on mahdyar/ansi-html-community
5+
* Added support for 24-bit RGB colors.
136
*/
147
'use strict';
158

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ class ReactRefreshRspackPlugin {
100100
},
101101
resourceQuery: this.options.resourceQuery,
102102
dependency: {
103-
// `new URL("static/sdk.js", import.meta.url)` the sdk.js is an asset module
104-
// we shoudn't inject react refresh for asset module
103+
// Assets loaded via `new URL("static/sdk.js", import.meta.url)` are asset modules
104+
// React Refresh should not be injected for asset modules as they are static resources
105105
not: ['url'],
106106
},
107107
use: ReactRefreshRspackPlugin.loader,

src/sockets/WDSSocket.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/**
2-
* The following code is modified based on
3-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f1c8b9a44198449093ca95f85af5df97925e1cfc/sockets/WDSSocket.js
4-
*
5-
* MIT Licensed
6-
* Author Michael Mok
7-
* Copyright (c) 2019 Michael Mok
8-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0b960573797bf38926937994c481e4fec9ed8aa6/LICENSE
9-
*/
101
import getSocketUrlParts from './utils/getSocketUrlParts';
112
import getUrlFromParts from './utils/getUrlFromParts';
123
import getWDSMetadata from './utils/getWDSMetadata';

src/sockets/WHMEventSource.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
/**
2-
* The following code is modified based on
3-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f770d3962c388da01eeda7079bff5f40c93992d2/sockets/WHMEventSource.js
4-
*
5-
* MIT Licensed
6-
* Author Michael Mok
7-
* Copyright (c) 2019 Michael Mok
8-
* https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/f770d3962c388da01eeda7079bff5f40c93992d2/LICENSE
9-
*/
10-
111
/**
122
* The hard-coded singleton key for webpack-hot-middleware's client instance.
13-
*
143
* [Ref](https://github.com/webpack-contrib/webpack-hot-middleware/blob/cb29abb9dde435a1ac8e9b19f82d7d36b1093198/client.js#L152)
154
*/
165
const singletonKey = '__webpack_hot_middleware_reporter__';

0 commit comments

Comments
 (0)