Giter Club home page Giter Club logo

license's Introduction

THE DEVELOPER IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE PARENTS OR
GUARDIANS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE DEVELOPER OR THE USE OR OTHER DEALINGS IN THE DEVELOPER.

license's People

Contributors

buschtoens avatar dependabot[bot] avatar erunion avatar ovyerus avatar yurickh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

license's Issues

Refactor

  • Monorepo with CLI & licenses list packages.
  • Find new CLI library to use (probably oclif)
  • Put together license data from scratch instead of relying on Sindre's list.
  • Make betterer

Can't install license version 1.0.0 and up

When trying to install or use license via npx I get the following error message

npm i license
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/pnash/projects/project-name/node_modules/license/dist/cli/index.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/pnash/projects/project-name/node_modules/license/dist/cli/index.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pnash/.npm/_logs/2020-03-24T03_59_10_214Z-debug.log

Version 0.0.3 still works. Was the project released without building the files to dist? Or are the dist files not being included in the package?

Thanks

use git username and email for getLicense by default

Currently,

import getLicense from "license";
getLicense("MIT")

Will generate a license with empty username and emailname. Why not insert username and email from git by default? That is, if user name is foo and email is [email protected], getLicense("MIT") will be like getLicense("MIT", { author: "foo", year: "2020" }).

license [license] does not work with npx

Running the follow code still triggers the interactive CLI:

npx license [license]

With the example of mit:

npx license mit

I think this changed in the most recent release since it stopped working for me about 9 months ago.

Also, thank you for this module. It's a core part of my workflow <3

License ISC wrongly applied

STEPS TO REPRODUCE:

npm install ISC

CURRENT BEHAVIOUR:

The produced license has the copyright set the Internet Software Consortium

DESIRED BEHAVIOUR:

The produced license has the copyright set to the author of the project

SUMMARY:

The ISC license is indeed created by the Internet Software Consortium but the license generated should have the permission from the author of the new piece of software, not the ISC.

You may follow this official template:

https://opensource.org/licenses/ISC

(you may find date and owner placeholders for be replaced by the projects author and date)

NOTE: no need to replace the "AUTHOR" text on the license if the copyright is correctly set to the author as mentioned

Thank you very much for the license package is really cool and usefull.

Checking license of other package/repository

There's several other packages available that allow trying to find the license of a particular npm package or git repository. It might be cool to integrate something similar into license to help make it an all-in-one experience.

Usage could look something like license check [@scope/]package for checking an npm package, and license check user/repo for checking a GitHub repository. Ideally would also want to support any other Git provider without needing to be locked into just GitHub, via just a url I presume.
(Note to self: research to see if we can get info about a remote repo through Git without needing to locally clone it, would probably help with performance in this respect)

Idea

Also add a flag to try and check the compatibility of a package's license with another license, would be useful for companies or individuals who need to ensure that dependencies are compatible with a specific license - e.g. GPL.

Would probably be named something along the lines of --check-compatibility or --compatibility-with, e.g. license check MIT --compatibility-with GPL (and add a shorthand of course, -c).


Also expose it as through the API like with getLicense so users don't need to install an extra package.

`getLicense` replacements don't work on Apache-2.0

๐Ÿ‘‹ We're using this library for some code generation tooling we've got and noticed that the yyyy template value in the Apache-2.0 license isn't getting swapped out:

const license = getLicense('Apache-2.0', {
  year: 2023,
  author:  'Company Name',
});
Copyright [yyyy] Company Name

Looking at the source for getLicense it seems like it doesn't support templates that are structured as [templatekey]:

modified = modified.replace(new RegExp(`<${key}>`, "g"), value);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.