-
Notifications
You must be signed in to change notification settings - Fork 72
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
Package Refactor (Tests, CI) #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
src/decode.js
Outdated
@@ -21,14 +21,31 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not nest files in src
folder (there's no transpilation step involved, so there's no point to maintain src/dist division)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
package.json
Outdated
"commonjs", | ||
"query", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those keywords are not relevant to this package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.prettierrc.json
Outdated
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think as of now it's manual since they can be different from commit messages (like something deprecated/upgrade instructions etc.)
package.json
Outdated
@@ -1,62 +1,24 @@ | |||
{ | |||
"name": "querystring", | |||
"id": "querystring", | |||
"version": "0.2.0", | |||
"version": "0.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not bump version in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
package.json
Outdated
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was testing as setup currently in master
broken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, test-browser
command was throwing error, also package phantomify
isn't updated in last 8 years
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
tape
tojest
since they were failing and test packages are not maintained from a whileDocumentation
CI
NPM_AUTH_TOKEN
toYour Repo > Settings > secrets > new repository secret
more info hereFile movements
license.md
toLICENSE
since this it directly recognized by IDE like vscode as license fileHistory.md
toCHANGELOG.md
with changelog guidelines.prettierrc.json
to keep format consistant across any IDE.npmignore
Only publish required files #45I'll be happy to help if you need more explaination or help on this PR