Comments (7)
This is incorrect behavior as to how it should work, I was just explaining why it's like this. How you imagined it is how it should work. I'm going to take a closer look.
from config.
yeah this is a little odd. For a little background that explains why this is like this: I went back and forth about whether or not there should be a 'name' field. I never wanted the name field in the configuration, my intention was for that to be populated inside the code with the key of the object it was inside of. It makes it a little easier to pass around a complete topic object that has the name attached. See in places like this: https://github.com/oclif/plugin-help/blob/master/src/index.ts#L48
So I think we do need the name. I'm not sure where it's populating that field exactly though, I would expect it to be in this repo but I can't seem to find it.
from config.
Also worth noting, I can't get other variations to work. Like
"topics": [{
"name": "t1",
"description": "desc for t1",
"subtopics": [{
"name": "t1-1",
"description": "desc for t1-1",
"subtopics": [{
"name": "t1-1-1",
"description": "desc for t1-1-1"
}, {
"name": "t1-1-2",
"description": "desc for t1-1-2"
}]
}]
}]
Do you have a working example for nested topics?
from config.
You're mixing up how we reference topics in the code vs how they should be referenced in the config, they're not the same. In the code, we deal with a single array of all the topics including all subtopics but in the config it's a nested object. It's strange, but I've found this is the easiest way to deal with them in both places.
from config.
Having said that, we don't do much work with deeply nested things so I wouldn't be surprised if there was a bug inside of this logic. Let me see if I can work up an example.
from config.
Alright, you are right with adding names. This works:
"topics": {
"t1": {
"name": "t1",
"description": "desc for t1",
"subtopics": {
"t1-1": {
"name": "t1-1",
"description": "desc for t1-1",
"subtopics": {
"t1-1-1": {
"name": "t1-1-1",
"description": "desc for t1-1-1"
},
"t1-1-2": {
"name": "t1-1-2",
"description": "desc for t1-1-2"
}
}
}
}
}
}
Still seems odd to me that I need to duplicate the name when the framework can easily fo that for me. Also, I'm still not sure why my previous example didn't work, because it has a name and you have code in there to handle arrays.
from config.
🎉 This issue has been resolved in version 1.7.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
from config.
Related Issues (20)
- The cli project throws Cannot find module 'globby' error
- WSL for config.platform HOT 1
- Command name (options.id) is undefined in a hook HOT 2
- Pass command args to `command_not_found` hook
- Finding plugins breaks when the package manager doesn't use node_modules HOT 1
- tsconfig "extends" not used HOT 1
- Fails silently if (.)oclif.manifest.json is missing
- Pull Request: Native ES Module support for Oclif w/ continued support of CommonJS HOT 1
- Support for .oclifrc/.oclifrc.json/.oclifrc.js
- S3 Templates not found as mentioned in the docs
- Incompatible with yarn2 and PnP
- Array flag reading other flags
- Config runCommand should return result HOT 5
- @oclif/parser should be a production dependency HOT 1
- @oclif/errors should be a dependency HOT 2
- use semantic release or similar to publish release notes
- Getting "Cannot find module 'ts-node'" when running with DEBUG=* HOT 7
- Identify which plugin command belongs to HOT 2
- allow JSX and TSX commands
- config breaks jest inline snapshots due to ts-node/register HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from config.