Skip to content
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

License Headers #191

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
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
8 changes: 7 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parser: '@typescript-eslint/parser'
plugins:
- '@typescript-eslint'
- 'license-header'
parserOptions:
ecmaVersion: 2018
sourceType: module
Expand Down Expand Up @@ -47,4 +48,9 @@ rules:
'@typescript-eslint/no-unsafe-assignment': off
'@typescript-eslint/no-unsafe-call': off
'@typescript-eslint/no-unsafe-member-access': off
'@typescript-eslint/explicit-module-boundary-types': off
'@typescript-eslint/explicit-module-boundary-types': off

# Ensure each source file has a corresponding license header.
'license-header/header':
- 'error'
- './scripts/eslint/licenseHeader.js'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-license-header": "0.6.1",
"execa": "^8.0.1",
"husky": "^8.0.3",
"jest": "^29.7.0",
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

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

8 changes: 8 additions & 0 deletions scripts/eslint/licenseHeader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/
9 changes: 9 additions & 0 deletions src/constants/builtins.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

/**
* A list of functions representing built-in types.
* @ignore @internal
Expand Down
9 changes: 9 additions & 0 deletions src/constants/empty.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

/**
* Indicates that a service has not been initialized yet.
*
Expand Down
9 changes: 9 additions & 0 deletions src/constants/host-container.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { ExecutableToken } from '../executable-token.class.mjs';
import { ContainerInstance } from '../container-instance.class.mjs';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down
9 changes: 9 additions & 0 deletions src/constants/minification/native-error.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

/**
* A reference to the host's intrinsic {@link Error} implementation.
*
Expand Down
9 changes: 9 additions & 0 deletions src/constants/minification/native-null.const.mts
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

export const NativeNull = null;
9 changes: 9 additions & 0 deletions src/constants/minification/strings.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

/**
* @fileoverview
* This file contains a number of strings used in error messages.
Expand Down
9 changes: 9 additions & 0 deletions src/constants/service-defaults.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { EMPTY_VALUE } from './empty.const.mjs';

/**
Expand Down
9 changes: 9 additions & 0 deletions src/constants/stamps/executable-token.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

export const EXECUTABLE_TOKEN = Symbol('executable-token');

export const enum ExecutableTokenStamp {
Expand Down
9 changes: 9 additions & 0 deletions src/constants/type-wrapper.const.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

export const TYPE_WRAPPER = Symbol('type-wrapper');

/**
Expand Down
9 changes: 9 additions & 0 deletions src/container-instance.class.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
import { ContainerRegistry } from './container-registry.class.mjs';
import { ServiceNotFoundError } from './error/service-not-found.error.mjs';
Expand Down
9 changes: 9 additions & 0 deletions src/container-registry.class.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { __NO_CONTAINER_IS_REGISTERED_WITH_THE_GIVEN_ID } from './constants/minification/strings.const.mjs';
import { ContainerInstance } from './container-instance.class.mjs';
import { ContainerRegistryError } from './error/container-registry-error.error.mjs';
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/es/es-service.decorator.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { AnyServiceDependency, ServiceOptions, Constructable, Service } from '../../index.mjs';
import {
ServiceOptionsWithDependencies,
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/es/index.mts
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

export { ESService } from './es-service.decorator.mjs';
9 changes: 9 additions & 0 deletions src/contrib/transient-ref/index.mts
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

export { TransientRefHost } from './transient-ref-host.class.mjs';
export { TransientRef } from './transient-ref.function.mjs';
9 changes: 9 additions & 0 deletions src/contrib/transient-ref/transient-ref-host.class.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { ServiceIdentifier } from '../../types/service-identifier.type.mjs';
import { ContainerInstance } from '../../container-instance.class.mjs';
import { InferServiceType } from '../../types/infer-service-type.type.mjs';
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/transient-ref/transient-ref.function.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { TYPE_WRAPPER, TypeWrapperStamp } from '../../constants/type-wrapper.const.mjs';
import { TransientRefHost } from './transient-ref-host.class.mjs';
import { InferServiceType } from '../../types/infer-service-type.type.mjs';
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/upstream/index.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

// Barrel stub as this package has no exports.

export {};
9 changes: 9 additions & 0 deletions src/contrib/util/es-class-decorator.type.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

/**
* A description of an ES class decorator (as of TypeScript 5.0).
*
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/util/get-service-identifier-type.util.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { isExecutableToken } from '../../executable-token.class.mjs';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/util/index.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

export { ESClassDecorator } from './es-class-decorator.type.mjs';
export { ServiceIdentifierType, getServiceIdentifierType } from './get-service-identifier-type.util.mjs';
export { resolveConstrainedContainer } from './resolve-constrained-container.util.mjs';
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/util/resolve-constrained-container.util.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { NativeError } from '../../constants/minification/native-error.const.mjs';
import { ContainerInstance } from '../../container-instance.class.mjs';
import { ResolutionConstraintFlag } from '../../types/resolution-constraint.type.mjs';
Expand Down
9 changes: 9 additions & 0 deletions src/contrib/util/synchronous-disposable.class.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { Disposable } from '../../types/disposable.type.mjs';

export class SynchronousDisposable implements Disposable {
Expand Down
9 changes: 9 additions & 0 deletions src/decorators/js-service.decorator.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

import { NativeError } from '../constants/minification/native-error.const.mjs';
import { AnyServiceDependency } from '../interfaces/service-dependency.interface.mjs';
import {
Expand Down
9 changes: 9 additions & 0 deletions src/decorators/service.decorator.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

/**
* @fileoverview
* This file contains the `@Service` decorator, which provides an API for
Expand Down
9 changes: 9 additions & 0 deletions src/entry/index.mts
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
/**
* @freshgum/typedi <https://github.com/freshgum-bubbles/typedi>
*
* @license MIT
* Copyright (c) 2015-2021 TypeStack
* Copyright (c) 2023-2024 freshgum (https://github.com/freshgum-bubbles)
* For a full copy of the license, see the LICENSE file in the root folder.
*/

export * from '../index.mjs';
Loading
Loading