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

getLicense replacements don't work on Apache-2.0 #12

Closed
erunion opened this issue Oct 25, 2023 · 1 comment
Closed

getLicense replacements don't work on Apache-2.0 #12

erunion opened this issue Oct 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@erunion
Copy link
Contributor

erunion commented Oct 25, 2023

👋 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);

@Ovyerus Ovyerus self-assigned this Dec 7, 2023
@Ovyerus Ovyerus added the bug Something isn't working label Dec 7, 2023
@erunion
Copy link
Contributor Author

erunion commented Jun 13, 2024

#15 resolved this

@erunion erunion closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants