Repository navigation
Package Refactor (Tests, CI) - #46
harshzalavadiya wants to merge 9 commits into
Conversation
medikoo
left a comment
There was a problem hiding this comment.
@harshzalavadiya great thanks for this! Still please see my comments
Ideally if such improvements are proposed with multiple PR's, each covering different matter (e.g. CI, prettification, meta updates are separate matters that can be handled exclusively in its own PR's)
Such approach will also allow us the take in obvious changes, while elaborate on once which require further clarification.
Anyway we can continue that way, see my comments.
| @@ -21,14 +21,31 @@ | |||
|
|
|||
There was a problem hiding this comment.
Let's not nest files in src folder (there's no transpilation step involved, so there's no point to maintain src/dist division)
| "commonjs", | ||
| "query", |
There was a problem hiding this comment.
I think those keywords are not relevant to this package
| "semi": true, | ||
| "singleQuote": true, | ||
| "trailingComma": "none" | ||
| } |
There was a problem hiding this comment.
Let's stick to Prettier defaults (eventually we may put printWidth to 100).
Also let's put this config into package.json
There was a problem hiding this comment.
Done + also added preetier command to package.json
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
There was a problem hiding this comment.
Can CHANGELOG generation be automated in anyway? Or is it just simply about agreeing on rules and otherwise updating changelog manually?
There was a problem hiding this comment.
I think as of now it's manual since they can be different from commit messages (like something deprecated/upgrade instructions etc.)
| "name": "querystring", | ||
| "id": "querystring", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", |
There was a problem hiding this comment.
Let's not bump version in this PR
There was a problem hiding this comment.
I have changed it back to v0.2.0 but current version of package currently ships some wierd binary files, so giving minor bump might be a good thing.
I know this will be tree shaken most off time but this will save 15-20 kb on package download
There was a problem hiding this comment.
I agree.
Whole point is to handle version release outside of this PR (I believe versioning should not be mixed in features/fixes PR's)
| "test-browser": "node ./node_modules/phantomify/bin/cmd.js ./test/common-index.js", | ||
| "test-node": "node ./test/common-index.js", | ||
| "test-tap": "node ./test/tap-index.js" | ||
| "test": "jest" |
There was a problem hiding this comment.
This package was tested in browser engines, while if I see correctly it's no longer the case after this change
There was a problem hiding this comment.
true, like earlier browser testing isn't done since jest uses jsdom by default, if not jest then also any suggestion is welcome :)
There was a problem hiding this comment.
Was testing as setup currently in master broken?
There was a problem hiding this comment.
yeah, test-browser command was throwing error, also package phantomify isn't updated in last 8 years
There was a problem hiding this comment.
Yes, it appears it depends on phantomjs to be installed in a system, which on its own is deprecated
|
@medikoo I have resolved conflicts let me know if any changes are required from my end |
medikoo
left a comment
There was a problem hiding this comment.
@harshzalavadiya thanks for update!
I've just realized that to not be breaking we need to ensure that package (and tests that confirms that) still works in Node.js v0.6
At least we should not introduce any breaking changes in v0.2.
For further versions we need to at least maintain support for Node.js v0.12, check the roadmap -> #20
This I believe means that we cannot switch test suite to Jest.
I propose to stick to existing test suite, we may just remove browser testing script as I believe it cannot work now as Testling is no longer in service (putting aside deprecations of various packages)
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| node: ['10.x', '12.x', '14.x'] |
There was a problem hiding this comment.
We need to maintain support for Node.js v0.6 in v0.2 of querystring so this version should be in a Matrix.
|
Okay so as you said earlier I'm going to create seprate PR for the things that can be directly accepted and creating issue for test suites and nodejs support so we can discuss it there |

@Gozala I saw that this package can have many improvements that will make package maintainance easy for maintainers
Changelog
Tests
tapetojestsince they were failing and test packages are not maintained from a whileDocumentation
CI
NPM_AUTH_TOKENtoYour Repo > Settings > secrets > new repository secretmore info hereFile movements
license.mdtoLICENSEsince this it directly recognized by IDE like vscode as license fileHistory.mdtoCHANGELOG.mdwith changelog guidelines.prettierrc.jsonto keep format consistant across any IDE.npmignoreOnly publish required files #45I'll be happy to help if you need more explaination or help on this PR