-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Feature: Destructured imports in variable declarations, Refactor parser with Babel type guards #101
Closed
MajorLift
wants to merge
39
commits into
oslabs-beta:dev
from
MajorLift:feature/parser-type-guards,folder-modules
Closed
Feature: Destructured imports in variable declarations, Refactor parser with Babel type guards #101
MajorLift
wants to merge
39
commits into
oslabs-beta:dev
from
MajorLift:feature/parser-type-guards,folder-modules
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Github Actions CI/CD added to repo for PRs onto dev and master
Merge dev into master
Dev branch into master with initial version of website
Dev to Master
Dev to Master
Dev to Master
Dev merged into master
Merge Dev into Master, remove parser_setup folder from repo
Dev to master
Dev to Master
Dev to Master
Dev to Master
Refractor A Few Files For Readability And Improved TypeScript
…onalism merge conflict
- relaxed some superfluous style rules - set eslint scope to include webviews/
- Record<string, unknown> is default recommended by @typescript-eslint/ban-types. - Using Array<T> when T is composite data type, and T[] when T is primitive is useful visual cue.
* test 14: Folders as modules / batch exports / barrel files - export * from './File' import { File } from './dir' * test 15: - Variable declaration with.. a) object destructuring alias assignment b) array destructuring - Import Decaration with... * glob import and namespace specifier * See: Issue oslabs-beta#85, oslabs-beta#99
- Extensive rewrites in getImports(), findVarDecImports() methods - Explicit checks with strong typing for all possible variations in import statements - Passes all previously written tests - Readability, modularity, extensibility improvements
- passes test 14 - glob exports in general not yet supported Fixes: Issue oslabs-beta#85 See: Issue oslabs-beta#99
- files that are imported by multiple parents show up as duplicates in tree - may be useful to keep track of these, while leaving nonce id as an access key for all instances
- These class object implementations are tentative propsals - May be advisable to decouple tree state data/logic from parsing functionality - Parser can be converted to static class with no loss in utility
- passes test 14 - glob exports in general not yet supported Fixes: Issue oslabs-beta#85 See: Issue oslabs-beta#99
- Extensive rewrites in getImports(), findVarDecImports() methods - Explicit checks with strong typing for all possible variations in import statements - Passes all previously written tests - Readability, modularity, extensibility improvements
- e.g. const [foo, bar] = import('module');
MajorLift
changed the title
Add folder module import support (Fixes #85), Refactor parser with Babel type guards
Feature: folder module import support (Fixes #85), Feature: Destructured imports in variable declarations, Refactor parser with Babel type guards
Dec 1, 2021
- Also, barrel file feature needs more work - Design decision on how to display glob imports required. Currently shows imported module in tree as single node.
MajorLift
changed the title
Feature: folder module import support (Fixes #85), Feature: Destructured imports in variable declarations, Refactor parser with Babel type guards
Feature: Destructured imports in variable declarations, Refactor parser with Babel type guards
Dec 1, 2021
Closing and creating new PR to keep Issue 85 open. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Love this project, and having a ton of fun going through the code!
1) Features
const { foo1: bar1, foo2 } = import("module");
const [foo, bar] = import("module");
Adds support for subset of "export * from 'module'" syntax (Components exported with "export * from ..." are shown in error in the drawer #99), where an index.js,ts file containing such export statements can be used to import the parent folder as a module (a.k.a "barrel" files or batch exports) (Fixes Issue 85).2) SaplingParser
3) ComponentTree, TreeItem
4) Linter config revamp
Water for the tree :)