Skip to content

Update LICENSE and remove license header from source files #1960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2019
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
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rules:
flowtype/require-readonly-react-props: off
flowtype/require-return-type: off
flowtype/require-types-at-top: off
flowtype/require-valid-file-annotation: [error, always, { annotationStyle: block }]
flowtype/require-valid-file-annotation: [error, always, { annotationStyle: line }]
flowtype/require-variable-type: off
flowtype/sort-keys: off
flowtype/spread-exact-type: off
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Facebook, Inc. and its affiliates.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright (c) 2019 GraphQL Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 1 addition & 8 deletions resources/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
// @noflow

'use strict';

Expand Down
9 changes: 1 addition & 8 deletions resources/build.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
// @noflow

'use strict';

Expand Down
9 changes: 1 addition & 8 deletions resources/check-cover.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
// @noflow

'use strict';

Expand Down
2 changes: 1 addition & 1 deletion resources/gen-changelog.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @noflow */
// @noflow

'use strict';

Expand Down
18 changes: 2 additions & 16 deletions resources/gen-version.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
// @noflow

'use strict';

const { version } = require('../package.json');
const { writeFile, parseSemver } = require('./utils');

const versionInfo = parseSemver(version);
const body = `/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
const body = `// @flow strict

/**
* Note: This file is autogenerated using "resources/gen-version.js" script and
Expand Down
9 changes: 1 addition & 8 deletions resources/inline-invariant.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
// @noflow

'use strict';

Expand Down
9 changes: 1 addition & 8 deletions resources/utils.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
// @noflow

'use strict';

Expand Down
9 changes: 1 addition & 8 deletions src/__fixtures__/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { join } from 'path';
import { readFileSync } from 'fs';
Expand Down
5 changes: 0 additions & 5 deletions src/__fixtures__/kitchen-sink.graphql
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery {
whoever123is: node(id: [123, 456]) {
id ,
Expand Down
5 changes: 0 additions & 5 deletions src/__fixtures__/schema-kitchen-sink.graphql
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

schema {
query: QueryType
mutation: MutationType
Expand Down
9 changes: 1 addition & 8 deletions src/__tests__/starWarsData.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

/**
* This defines a basic set of data for our Star Wars Schema.
Expand Down
9 changes: 1 addition & 8 deletions src/__tests__/starWarsIntrospection-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/__tests__/starWarsQuery-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/__tests__/starWarsSchema.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import {
GraphQLEnumType,
Expand Down
9 changes: 1 addition & 8 deletions src/__tests__/starWarsValidation-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/__tests__/version-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/error/GraphQLError.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the source code for a couple of other projects under LF (Node.js, ESLint, esprima) and they just just have LICENSE at the root of the project and no license headers inside the source code.

Those headers add some inconvenience in the development process e.g. new contributors forget to add them, old PRs contains an old version of the license text, it's harder to diff and revert old commits, etc.

Plus they effectively double up the size of NPM package:

npm notice package size:  483.3 kB
npm notice unpacked size: 3.6 MB

VS

npm notice package size:  237.5 kB
npm notice unpacked size: 1.7 MB

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plus they effectively double up the size of NPM package:

I mad mistake during measurement, in reality, it was around ~100 kB difference unpacked.

// @flow strict

import { printError } from './printError';
import { type ASTNode } from '../language/ast';
Expand Down
9 changes: 1 addition & 8 deletions src/error/__tests__/GraphQLError-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/error/__tests__/locatedError-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/error/__tests__/printError-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/error/formatError.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import invariant from '../jsutils/invariant';
import { type GraphQLError } from './GraphQLError';
Expand Down
9 changes: 1 addition & 8 deletions src/error/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

export { GraphQLError } from './GraphQLError';

Expand Down
9 changes: 1 addition & 8 deletions src/error/locatedError.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { GraphQLError } from './GraphQLError';
import { type ASTNode } from '../language/ast';
Expand Down
9 changes: 1 addition & 8 deletions src/error/printError.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { type SourceLocation, getLocation } from '../language/location';
import { type Source } from '../language/source';
Expand Down
9 changes: 1 addition & 8 deletions src/error/syntaxError.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { type Source } from '../language/source';
import { GraphQLError } from './GraphQLError';
Expand Down
9 changes: 1 addition & 8 deletions src/execution/__tests__/abstract-promise-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/execution/__tests__/abstract-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
9 changes: 1 addition & 8 deletions src/execution/__tests__/directives-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { execute } from '../execute';
Expand Down
9 changes: 1 addition & 8 deletions src/execution/__tests__/executor-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// @flow strict

import { expect } from 'chai';
import { describe, it } from 'mocha';
Expand Down
Loading