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

Removed unnecessary file path resolutions. Added tests. #46

Merged
merged 9 commits into from
Jul 9, 2023

Conversation

ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Jul 9, 2023

Background

Patches #42 (second try).

The file path resolutions in #45 were correct, but I didn't publish the right dist for 0.1.1. The reason that only 24 files had been published in 0.1.0 was the presence of .npmignore in the blueprints folder. This file, similarly to .gitignore, should be renamed.

What changed?

I reverted the unnecessary file path resolutions. Afterwards, added tests to document the steps of create-files-from-blueprints and update-package-json.

Testing

Running pnpm build, followed by pnpm publish --dry-run, shows that 52 files will be published.

Output from pnpm publish --dry-run
npm notice 1.1kB LICENSE.md                                                                                  
npm notice 2.3kB README.md                                                                                   
npm notice 1.1kB dist/bin/cli.js                                                                             
npm notice 114B  dist/src/blueprints/__gitignore__                                                           
npm notice 334B  dist/src/blueprints/__npmignore__                                                           
npm notice 131B  dist/src/blueprints/.eslintignore                                                           
npm notice 2.3kB dist/src/blueprints/.eslintrc.cjs                                                           
npm notice 782B  dist/src/blueprints/.github/ISSUE_TEMPLATE/ask-for-better-documentation.md                  
npm notice 730B  dist/src/blueprints/.github/ISSUE_TEMPLATE/ask-for-new-feature-or-refactor.md               
npm notice 728B  dist/src/blueprints/.github/ISSUE_TEMPLATE/report-bug.md                                    
npm notice 1.2kB dist/src/blueprints/.github/ISSUE_TEMPLATE/report-outdated-dependency.md                    
npm notice 1.2kB dist/src/blueprints/.github/workflows/ci.yml                                                
npm notice 306B  dist/src/blueprints/.prettierrc.cjs                                                         
npm notice 1.2kB dist/src/blueprints/bin/__codemod-name__.__js__                                             
npm notice 699B  dist/src/blueprints/build.sh                                                                
npm notice 12B   dist/src/blueprints/CHANGELOG.md                                                            
npm notice 1.0kB dist/src/blueprints/codemod-test-fixture.sh                                                 
npm notice 333B  dist/src/blueprints/codemod-test-fixtures.sh                                                
npm notice 1.7kB dist/src/blueprints/CONTRIBUTING.md                                                         
npm notice 1.1kB dist/src/blueprints/LICENSE.md                                                              
npm notice 2.5kB dist/src/blueprints/package.json                                                            
npm notice 1.4kB dist/src/blueprints/README.md                                                               
npm notice 0B    dist/src/blueprints/src/blueprints/.gitkeep                                                 
npm notice 588B  dist/src/blueprints/src/index.__js__                                                        
npm notice 1.3kB dist/src/blueprints/src/steps/add-end-of-line.__js__                                        
npm notice 406B  dist/src/blueprints/src/steps/create-options.__js__                                         
npm notice 75B   dist/src/blueprints/src/steps/index.__js__                                                  
npm notice 136B  dist/src/blueprints/src/types/index.ts                                                      
npm notice 49B   dist/src/blueprints/src/utils/blueprints.__js__                                             
npm notice 205B  dist/src/blueprints/src/utils/blueprints/blueprints-root.__js__                             
npm notice 239B  dist/src/blueprints/tests/fixtures/sample-project/index.__js__                              
npm notice 12B   dist/src/blueprints/tests/fixtures/sample-project/input/file.txt                            
npm notice 13B   dist/src/blueprints/tests/fixtures/sample-project/output/file.txt                           
npm notice 486B  dist/src/blueprints/tests/helpers/shared-test-setups/sample-project.__js__                  
npm notice 571B  dist/src/blueprints/tests/index/sample-project.test.__js__                                  
npm notice 545B  dist/src/blueprints/tests/steps/add-end-of-line/base-case.test.__js__                       
npm notice 572B  dist/src/blueprints/tests/steps/add-end-of-line/edge-case-file-ends-with-newline.test.__js__
npm notice 537B  dist/src/blueprints/tests/steps/add-end-of-line/edge-case-file-is-empty.test.__js__         
npm notice 347B  dist/src/blueprints/tests/steps/create-options/sample-project.test.__js__                   
npm notice 256B  dist/src/blueprints/tests/utils/blueprints/blueprints-root.test.__js__                      
npm notice 294B  dist/src/blueprints/tsconfig.build.json                                                     
npm notice 333B  dist/src/blueprints/tsconfig.json                                                           
npm notice 270B  dist/src/migration/index.js                                                                 
npm notice 2.5kB dist/src/migration/steps/create-files-from-blueprints.js                                    
npm notice 259B  dist/src/migration/steps/create-options.js                                                  
npm notice 130B  dist/src/migration/steps/index.js                                                           
npm notice 2.8kB dist/src/migration/steps/update-package-json.js                                             
npm notice 11B   dist/src/types/index.js                                                                     
npm notice 94B   dist/src/utils/blueprints.js                                                                
npm notice 202B  dist/src/utils/blueprints/blueprints-root.js                                                
npm notice 1.4kB dist/src/utils/blueprints/get-version.js                                                    
npm notice 1.4kB package.json                                                                                 

@ijlee2 ijlee2 added bug Something isn't working enhance: documentation Issue asks for better documentation (e.g. README, code, tests) labels Jul 9, 2023
@ijlee2 ijlee2 marked this pull request as ready for review July 9, 2023 21:16
@ijlee2 ijlee2 merged commit 6cb6777 into main Jul 9, 2023
2 checks passed
@ijlee2 ijlee2 deleted the patch-codemod-utils-cli-2 branch July 9, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhance: documentation Issue asks for better documentation (e.g. README, code, tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant