Skip to content

Commit

Permalink
fix: correct license (web-infra-dev#2159)
Browse files Browse the repository at this point in the history
fix: correct all license
  • Loading branch information
JSerFeng authored Mar 11, 2023
1 parent b4f2068 commit 09dd5fb
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 3 deletions.
1 change: 0 additions & 1 deletion crates/node_binding/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,13 @@ export interface JsStatsGetAssets {
assets: Array<JsStatsAsset>
assetsByChunkName: Array<JsStatsAssetsByChunkName>
}
/**
* Some code is modified based on
* https://github.com/swc-project/swc/blob/d1d0607158ab40463d1b123fed52cc526eba8385/bindings/binding_core_node/src/util.rs#L29-L58
* Apache-2.0 licensed
* Author Donny/강동윤
* Copyright (c)
*/
export function initCustomTraceSubscriber(): void
export class JsCompilation {
updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSource) => JsCompatSource), assetInfoUpdateOrFunction?: JsAssetInfo | ((assetInfo: JsAssetInfo) => JsAssetInfo)): void
Expand Down
7 changes: 7 additions & 0 deletions crates/node_binding/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ pub(crate) fn get_named_property_value_string<T: NapiRaw>(
String::from_utf8(buf).map_err(|_| Error::from_reason("failed to get property"))
}

/**
* Some code is modified based on
* https://github.com/swc-project/swc/blob/d1d0607158ab40463d1b123fed52cc526eba8385/bindings/binding_core_node/src/util.rs#L29-L58
* Apache-2.0 licensed
* Author Donny/강동윤
* Copyright (c)
*/
#[napi]
pub fn init_custom_trace_subscriber(
mut env: Env,
Expand Down
8 changes: 8 additions & 0 deletions crates/rspack_core/src/dependency/code_generatable.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* Some code is modified based on
* https://github.com/vercel/turbo/blob/a1947f64443fb98e5c3e10bca6ef9eafd278bd21/crates/turbopack-ecmascript/src/code_gen.rs
* MPL-2.0 Licensed
* Author Alex Kirszenberg
* Copyright (c)
* https://github.com/vercel/turbo/blob/a1947f64443fb98e5c3e10bca6ef9eafd278bd21/LICENSE#L1
*/
use rspack_error::Result;
use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};

Expand Down
2 changes: 1 addition & 1 deletion packages/create-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "create-rspack",
"version": "0.1.0",
"license": "Create a new rspack project",
"license": "MIT",
"main": "index.js",
"bin": {
"create-rspack": "index.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack-cli/src/rspack-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class RspackCLI {
options: RspackCLIOptions,
rspackEnv: RspackEnv
): Promise<Compiler | MultiCompiler> {
process.env.RSPACK_CONFIG_VALIDATE = 'loose';
process.env.RSPACK_CONFIG_VALIDATE = "loose";
let nodeEnv = process?.env?.NODE_ENV;
if (typeof options.nodeEnv === "string") {
process.env.NODE_ENV = nodeEnv || options.nodeEnv;
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/src/compilation.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/Compilation.js
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
import * as tapable from "tapable";
import { RawSource, Source } from "webpack-sources";
import { Resolver } from "enhanced-resolve";
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/src/compiler.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/Compiler.js
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
import path from "path";
import fs from "fs";
import * as tapable from "tapable";
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/src/rspack.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3b/lib
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
import {
getNormalizedRspackOptions,
RspackOptions,
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/src/rspackOptionsApply.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/OptionsApply.js
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
import {
RspackOptionsNormalized,
Compiler,
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/src/stats.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/tree/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/stats
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
import * as binding from "@rspack/binding";
import { Compilation } from ".";
import { StatsValue, StatsOptions } from "./config";
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/src/util/hash/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/tree/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/util/hash
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
"use strict";

class Hash {
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/src/watching.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/Watching.js
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
import { Callback } from "tapable";
import type { Compilation, Compiler } from ".";
import { Stats } from ".";
Expand Down
9 changes: 9 additions & 0 deletions packages/rspack/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* The test code is modified based on
* https://github.com/webpack/webpack/tree/main/test
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/

0 comments on commit 09dd5fb

Please sign in to comment.