Self-Study Unit: Shipping Third-Party Licence Notices

Most permissive licences ask for very little, but the little they ask is easy to lose. If your package bundles, vendors or minifies code written by someone else, you are usually redistributing it, and its licence notice has to travel with it. This unit explains when that applies, what a tidy notice file looks like, and how build tools quietly break it. It is educational material for maintainers, not legal advice.

Objectives

Explanation

Declared versus bundled

When your package.json or pyproject.toml merely lists a dependency, the user's package manager fetches that dependency from its own source, complete with its own licence file. You are not redistributing it. When you copy the code into your repository, or a bundler inlines it into your dist/ output, or you ship a wheel with a compiled library inside, you are. Those copies are the ones that need notices.

What the common licences ask

LicenceNotice requirement in short
MITInclude the copyright notice and permission notice in copies or substantial portions.
BSD-2-Clause / BSD-3-ClauseRetain the copyright notice, conditions and disclaimer; for binaries, reproduce them in documentation or other materials.
ISCSimilar to MIT: keep the copyright and permission notice.
Apache-2.0Provide a copy of the licence, keep notices, mark modified files, and pass on any NOTICE file the upstream includes.

Read the full text of each licence on the SPDX License List or the Open Source Initiative site before relying on a summary like this one.

A tidy notices file

THIRD-PARTY NOTICES for package-g

This package includes code from the following projects.

------------------------------------------------------------
tiny-parser 1.4.0  (MIT)
Location in this package: dist/vendor/tiny-parser.js
Copyright (c) [year] [original author]

Permission is hereby granted, free of charge, ...
[full MIT text as it appears upstream]
------------------------------------------------------------

Copy the upstream notice exactly, including the original copyright line. Do not "normalise" years or names.

How bundlers lose notices

Minifiers strip comments by default, and the licence header at the top of a vendored file is a comment. Many minifiers keep comments that start with /*! or contain @license, and many bundlers can extract licence comments to a separate file. Whatever your tool, configure it deliberately and check the output rather than assuming.

Practice exercise

Using your own package, or a hypothetical Package G that bundles two small MIT libraries and one Apache-2.0 library with a NOTICE file:

  1. Run npm pack --dry-run (or build a wheel and list its contents) and note which third-party code physically ends up in the artefact.
  2. For each item, find its licence and any NOTICE file upstream.
  3. Write a THIRD-PARTY-NOTICES file and add it to the published files list.
  4. Grep the minified output for each library's licence header.

Self-check answers

The licence compatibility FAQ covers what happens when the licences involved are not permissive.

Related pages