telus / create-library Goto Github PK
View Code? Open in Web Editor NEWAn opinionated npm package starter kit
License: MIT License
An opinionated npm package starter kit
License: MIT License
Using @ahmadnassri's token at the moment, so he gets to boast about his intensive Github activity LOL.
Add a note in the readme to make consumers aware of the fact that they should name the library wisely (consider scope, consider overlap with other existing/future libraries, etc.)
Please note that this repository is publicly visible to the internet!
/cc @ahmadnassri
/cc @admins
Until we figure out the matter of NPM access provisioning, how can existing team members get visibility into already existing libraries before creating similar/duplicate ones?
Checking out the latest master branch, we are seeing the following issues:
Cannot find module '@telus/eslint-config'
and
command not found: remark
Bills-MacBook-Pro:create-library billli$ npm run lint
> @telus/[email protected] lint /Users/billli/Code/telus/create-library
> npx npm-run-all -p -c -l lint:*
npx: installed 58 in 3.558s
[lint:deps ]
[lint:deps ] > @telus/[email protected] lint:deps /Users/billli/Code/telus/create-library
[lint:deps ] > npx updated
[lint:deps ]
[lint:audit]
[lint:audit] > @telus/[email protected] lint:audit /Users/billli/Code/telus/create-library
[lint:audit] > npm audit
[lint:audit]
[lint:js ]
[lint:js ] > @telus/[email protected] lint:js /Users/billli/Code/telus/create-library
[lint:js ] > npx eslint .
[lint:js ]
[lint:md ]
[lint:md ] > @telus/[email protected] lint:md /Users/billli/Code/telus/create-library
[lint:md ] > npx remark --quiet --frail .
[lint:md ]
[lint:ec ]
[lint:ec ] > @telus/[email protected] lint:ec /Users/billli/Code/telus/create-library
[lint:ec ] > npx editorconfig-checker .
[lint:ec ]
[lint:js ] Cannot find module '@telus/eslint-config'
[lint:js ] Referenced from: /Users/billli/Code/telus/create-library/.eslintrc
[lint:js ] npm ERR! code ELIFECYCLE
[lint:js ] npm ERR! errno 1
[lint:js ] npm ERR! @telus/[email protected] lint:js: `npx eslint .`
[lint:js ] npm ERR! Exit status 1
[lint:js ] npm ERR!
[lint:js ] npm ERR! Failed at the @telus/[email protected] lint:js script.
[lint:js ] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[lint:js ] npm WARN Local package.json exists, but node_modules missing, did you mean to install?
[lint:js ]
[lint:js ] npm ERR! A complete log of this run can be found in:
[lint:js ] npm ERR! /Users/billli/.npm/_logs/2019-01-08T02_26_17_683Z-debug.log
[lint:audit] === npm audit security report ===
[lint:audit]
[lint:audit] found 0 vulnerabilities
[lint:audit] in 1014 scanned packages
[lint:deps ] npx: installed 1 in 1.81s
[lint:deps ] OUTDATED ^2.2.4 → 2.2.6 fast-glob @ ^2.2.4
[lint:deps ] npm ERR! code ELIFECYCLE
[lint:deps ] npm ERR! errno 1
[lint:deps ] npm ERR! @telus/[email protected] lint:deps: `npx updated`
[lint:deps ] npm ERR! Exit status 1
[lint:deps ] npm ERR!
[lint:deps ] npm ERR! Failed at the @telus/[email protected] lint:deps script.
[lint:deps ] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[lint:deps ] npm WARN Local package.json exists, but node_modules missing, did you mean to install?
[lint:deps ]
[lint:deps ] npm ERR! A complete log of this run can be found in:
[lint:deps ] npm ERR! /Users/billli/.npm/_logs/2019-01-08T02_26_19_836Z-debug.log
[lint:md ] npx: installed 49 in 3.253s
[lint:md ] command not found: remark
[lint:md ] npm ERR! code ELIFECYCLE
[lint:md ] npm ERR! errno 1
[lint:md ] npm ERR! @telus/[email protected] lint:md: `npx remark --quiet --frail .`
[lint:md ] npm ERR! Exit status 1
[lint:md ] npm ERR!
[lint:md ] npm ERR! Failed at the @telus/[email protected] lint:md script.
[lint:md ] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[lint:md ] npm WARN Local package.json exists, but node_modules missing, did you mean to install?
[lint:md ]
[lint:md ] npm ERR! A complete log of this run can be found in:
[lint:md ] npm ERR! /Users/billli/.npm/_logs/2019-01-08T02_26_20_425Z-debug.log
[lint:ec ] npx: installed 127 in 5.447s
[lint:ec ] sucessfully checked 34 files :)
ERROR: "lint:md" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @telus/[email protected] lint: `npx npm-run-all -p -c -l lint:*`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @telus/[email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/billli/.npm/_logs/2019-01-08T02_26_22_947Z-debug.log
Bills-MacBook-Pro:create-library billli$
Running with:
Bills-MacBook-Pro:create-library billli$ node -v
v8.12.0
Bills-MacBook-Pro:create-library billli$ npm -v
6.4.1
See https://github.com/telus/telus-core/blob/master/src/scaffold.js#L51 for inspiration/fix
Should the template include a script (like our init.sh
scripts in the older SKs) that gets the NPM token from somewhere (vault?). It's not uncommon for our private libraries to have other private libraries as dependencies ..
It's easy for me to just copy that very same script and put it in there, but I'm not sure that's the approach we want to take. Maybe we should just add something to the README to tell people what to expect, but handle it differently? Are we gonna get npm enterprise and then ensure we have a solid onboarding process?
Thoughts, @ahmadnassri & @kspaans?
install-group peer --package @telus/build-essential --no-save
I'm not able to leverage this initializer as the docs describe:
$ npm init @telus/library my-new-project
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@telus%2fcore - Not found
npm ERR! 404
npm ERR! 404 '@telus/core@^0.0.3' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of '@telus/create-library'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/phildufault/.npm/_logs/2019-12-30T18_59_33_802Z-debug.log
Install for @telus/create-library@latest failed with code 1
I'm following https://github.com/telus/create-library#-usage
The npm package published seems stale, as in the Git repo @telus/core is not referenced.
This might be a quick win, to publish a new release of this package to npmjs.org
I was able to clone this package's repo and use it locally to initialize a new npm library repo, so I believe just a new release to npmjs.org is needed.
Cheers! ❤️
We should update the CLI to get token(s) needed for npm & build status badges in the case of private packages.
npm init library
not working:L600799:Code t967649$ mkdir test1
L600799:Code t967649$ cd test1
L600799:test1 t967649$ npm init @telus/library
Need to install the following packages:
@telus/[email protected]
Ok to proceed? (y) y
/Users/t967649/.npm/_npx/730020322dede8e1/node_modules/@telus/create-library/lib/questions.js:1
const inquirer = require('inquirer')
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/t967649/.npm/_npx/730020322dede8e1/node_modules/inquirer/lib/inquirer.js from /Users/t967649/.npm/_npx/730020322dede8e1/node_modules/@telus/create-library/lib/questions.js not supported.
Instead change the require of inquirer.js in /Users/t967649/.npm/_npx/730020322dede8e1/node_modules/@telus/create-library/lib/questions.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/t967649/.npm/_npx/730020322dede8e1/node_modules/@telus/create-library/lib/questions.js:1:18)
at Object.<anonymous> (/Users/t967649/.npm/_npx/730020322dede8e1/node_modules/@telus/create-library/lib/template.js:7:19)
at Object.<anonymous> (/Users/t967649/.npm/_npx/730020322dede8e1/node_modules/@telus/create-library/index.js:7:18) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.16.0
npm ERR! code 1
npm ERR! path /Users/t967649/Code/test1
npm ERR! command failed
npm ERR! command sh -c create-library
npm ERR! A complete log of this run can be found in: /Users/t967649/.npm/_logs/2023-07-04T21_31_52_586Z-debug-0.log
L600799:test1 t967649$
inquirer
was changed between v8 and v9L600799:create-library t967649$ git diff package.json | grep inquire
- "inquirer": "^9.2.6",
+ "inquirer": "^8.2.3",
L600799:create-library t967649$ cd -
/Users/t967649/Code/test1
L600799:test1 t967649$ npm init @telus/[email protected]
npx: installed 82 in 8.696s
? is this an open source project? No
? project title blah
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
The npm token configured in the NPM_TOKEN
environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/
.
If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.
Please make sure to set the NPM_TOKEN
environment variable in your CI with the exact value of the npm token.
Good luck with your project ✨
Your semantic-release bot 📦🚀
It's only doing offline check at the moment (not live results). Until it will be updated/fixed, it can be removed.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/build.yaml
actions/checkout v2
actions/setup-node v2
.github/workflows/main.yaml
actions/checkout v2
actions/setup-node v2
actions/setup-python v2
google-github-actions/setup-gcloud v0.2.1
actions/checkout v2
.github/workflows/publish.yaml
actions/checkout v2
actions/setup-node v2
package.json
fast-glob ^3.2.12
inquirer ^8.2.3
mkdirp ^1.0.4
spdx-license-list ^6.6.0
validate-npm-package-name ^3.0.0
yargs ^17.6.2
@commitlint/cli ^17.3.0
@commitlint/config-angular ^17.3.0
@telus/prettier-config ^3.2.4
@telus/remark-config ^2.2.5
@telus/semantic-release-config ^2.2.5
editorconfig-checker ^4.0.2
husky ^4.3.8
npm-run-all ^4.1.5
node >=14
line 16 in build-publish.yml
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
should it be NPM_AUTH_TOKEN instead of NPM_TOKEN?
Right now, it fails when the project has a coverage folder (with xml
and iml
files) or when using Jetbrains IDEs.
Using husky or something equivalent, have the lint scripts be run before each commit, so that developers receive instant feedback from eslint.
Issue
We have the following environments setup in Home Solutions:
We typically use the test
environment as an integration environment so that we can test changes from multiple teams. In those cases when we want to test a component change, we do not want to publish it as a proper version, but instead do a pre-release.
Solution
The semantic-release
team has a pre-release feature in beta right now. We should start using it once it's out of beta.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.