- Linting: Lint hidden ncurc.js file
- Docs: Add 6.0.0.md migration file - Docs: Update Contributing, Testing (renamed to Development), Linting and ReleaseInstructions - Docs: Info on submodules - npm: Add scripts for updating submodules - npm: Add `license-badges`, `build-docs`, and `copy` scripts to `prepublishOnly` script - npm: Bump to 6.0.0
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
dependency's updated new API
|
||||
- `Refactoring: `
|
||||
- `Linting (<type>):` - Linting by type, e.g., "ESLint"
|
||||
- `Testing:`
|
||||
- `Testing (<UI|Unit>):`
|
||||
- `Build: `
|
||||
- `npm` - Updates to dependencies, npm version, etc.
|
||||
1. See [`Testing.md`](./Testing.md) for other information helpful for contributing.
|
||||
|
||||
@@ -1,8 +1,31 @@
|
||||
# Testing
|
||||
# Development
|
||||
|
||||
Note that this document goes roughly in order of increasing importance. This
|
||||
is done so you can see what is available and also see what scripts may be
|
||||
automatically run as part of the later-mentioned items.
|
||||
|
||||
## Installing/Updating releases
|
||||
|
||||
In order to allow old versions to be available along with the `master` version
|
||||
on our Github Pages-hosted repository, we have added old versions as submodules.
|
||||
|
||||
Most users will therefore not want to clone recursively, but for developing,
|
||||
at least publishing, this may be necessary.
|
||||
|
||||
- `npm run submodules`
|
||||
- `npm run submodules-init`- This is a *non-recursive* init as we don't
|
||||
want the submodules themselves to have their own releases!
|
||||
(They will have `releases` with subfolders for versions, but
|
||||
no contents.)
|
||||
- `npm run submodules-update` - Fetches and merges *non-recursively* and
|
||||
merges any changes into `master` (e.g., if an unreleased version branch
|
||||
was first added but needed more added to it).
|
||||
|
||||
## Building docs
|
||||
|
||||
This may be useful during testing. Build through `npm run build-docs`.
|
||||
Though the building of docs is automatically run before publishing,
|
||||
this may also be useful for reference during testing. Build through
|
||||
`npm run build-docs`.
|
||||
|
||||
To start a server and open already built docs, use `npm run open-docs` (or
|
||||
`npm run open-docs-no-start` if you already have a `start` process
|
||||
@@ -32,9 +55,14 @@ running in another terminal tab).
|
||||
unless a project is restrictive in terms of usage--i.e., if a
|
||||
dependency is not what is typically considered "open" source.)
|
||||
|
||||
The above are run before publishing, but they should be checked whenever
|
||||
updating dependencies ([`npm-check-updates`](https://github.com/tjunnone/npm-check-updates)
|
||||
is recommended, especially as our repo is configured to ignore updating
|
||||
those packages which shouldn't be updated (see `.ncurc.js`)).
|
||||
|
||||
(Note that the test and coverage badges are generated automatically during
|
||||
testing to ensure they are up to date, so you should not need to call those
|
||||
scripts directly.)
|
||||
scripts directly, and the license badges are updated before publishing.)
|
||||
|
||||
## Miscellaneous scripts
|
||||
|
||||
@@ -97,9 +125,9 @@ line, even when automated tests already exist for a type of editor.
|
||||
|
||||
## Reading/Opening test coverage reports
|
||||
|
||||
For testing coverage reports (see "Testing"), you can open the HTML-based
|
||||
reports that are generated during the testing process (or when running
|
||||
`npm run instrument` directly) from the command line into your
|
||||
For testing coverage reports (see "Testing and coverage"), you can open
|
||||
the HTML-based reports that are generated during the testing process (or
|
||||
when running `npm run instrument` directly) from the command line into your
|
||||
browser by the following commands:
|
||||
|
||||
1. Reading reports from the command line
|
||||
@@ -5,7 +5,8 @@ npm run eslint
|
||||
```
|
||||
|
||||
This will query both JavaScript files and will query JavaScript within
|
||||
Markdown files. It will also check for some JSDoc issues.
|
||||
Markdown and HTML files. It will also check for some JSDoc issues,
|
||||
Mocha/chai-specific rules, etc.
|
||||
|
||||
## Atom usage
|
||||
|
||||
|
||||
@@ -2,20 +2,24 @@
|
||||
|
||||
## Prepare
|
||||
|
||||
1. `npm run browser-test` - Ensure build steps occur and tests are passing
|
||||
1. `npm start` and in another console window, `npm test` - This should
|
||||
also be run, though currently accessibility tests are failing.
|
||||
1. `npm run build-docs` - Ensure JSDoc can build and is available for site
|
||||
build (though not added to `master`, will be copied over in
|
||||
the `SVG-Edit.github.io` steps and used in `npm publish` step).
|
||||
1. `npm pack --dry-run` to preview which files will be included once
|
||||
published and taking into account `.npmignore`.
|
||||
1. `npm test` - Ensure build steps occur and tests are passing (note that
|
||||
accessibility tests are currently failing).
|
||||
1. `npm publish --dry-run` to run the preparatory scripts to ensure the
|
||||
necessary files are updated and also to see which files will be
|
||||
included once published and taking into account `.npmignore`
|
||||
(use `npm pack --dry-run` to see the files without the preparatory
|
||||
steps).
|
||||
|
||||
## Update the main project
|
||||
|
||||
1. Update `version` in `package.json` (and `package-lock.json` (via `npm i`)).
|
||||
1. Update the CHANGES file with a summary of all changes.
|
||||
1. Update the `CHANGES.md` file with a summary of all changes (adding the
|
||||
version of the new release).
|
||||
1. Add new release info to `Recent news` section in README
|
||||
1. For major version changes, add a separate document for that version
|
||||
to `docs/versions/X.Y.Z.md` to summarizethe changes (higher level
|
||||
than the CHANGES file) and to indicate what is needed to update code
|
||||
to work with the breaking changes.
|
||||
1. Commit these changes `git commit -m "Updating CHANGES for release X.Y.Z"`-->.
|
||||
1. Tag the version, prefixed by "v", e.g., `v6.0.0`.
|
||||
|
||||
@@ -53,6 +57,5 @@ You will need to be a member of the SVG-Edit GitHub group to do this step.
|
||||
|
||||
1. `npm publish`
|
||||
|
||||
You will need to be a member of the npm group to do this step. You can run
|
||||
`npm publish --dry-run` to confirm that the files being included are all desired,
|
||||
and add to `.npmignore` if not.
|
||||
You will need to be a member of the npm group to do this step. See above
|
||||
for `npm publish --dry-run`.
|
||||
|
||||
48
docs/versions/6.0.0.md
Normal file
48
docs/versions/6.0.0.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Version 6.0.0
|
||||
|
||||
This release should require minimal updating.
|
||||
|
||||
Besides the breaking changes and license updates, contains miscellanous
|
||||
fixes and enhancements, for example:
|
||||
|
||||
1. Switching from `localStorage` to `sessionStorage` for the clipboard (@NeilFraser)
|
||||
1. PDF export improvements (@cuixiping)
|
||||
|
||||
Please see the CHANGES file (or the Git history or Github tracker) for
|
||||
more fixes and enhancements.
|
||||
|
||||
## Breaking changes (and clarifying license info)
|
||||
|
||||
- License:
|
||||
1. The `license` indicated in `package.json` had not included all
|
||||
of the license terms bundled with the package. It now includes them:
|
||||
`(MIT AND Apache-2.0 AND CC-BY-SA-2.0 AND ISC AND LGPL-3.0-or-later AND X11)`
|
||||
A `licenseInfo.json` file has been added with its `filesByLicense`
|
||||
property mapping which files have which licenses. The
|
||||
`bundledRootPackages` property in that file indicates which
|
||||
`devDependencies` packages are actually copied into this repository
|
||||
(so that npm or Git-based hosting services can include them
|
||||
for live use of our editors).
|
||||
1. License: Relicense `ext-mathjax.js` from `Apache-2.0` to `MIT` per
|
||||
permission granted in <https://github.com/josegaert/ext-mathjax/issues/6>
|
||||
1. License: Clarify in `@license` jsdoc that `ext-server_moinsave.js` is
|
||||
"(MIT OR GPL-2.0-or-later)" per subsequent text
|
||||
1. License: Reorder license listing in `jquery.contextMenu.js` so
|
||||
that the more permissive license is noticeable first
|
||||
1. See the new license badges on the README for a summary of
|
||||
the licenses including either bundled devDependencies or all
|
||||
`devDependencies` (we have no direct npm `dependencies` currently).
|
||||
These badges categorize the licenses into different degrees of
|
||||
permissiveness.
|
||||
1. `$.pref` - Remove in favor of new `svgEditor.pref` (avoids polluting
|
||||
`jQuery`). (This might be moved to its own module in future.)
|
||||
1. `putLocale` (a function called automatically by `svg-editor.js`) no
|
||||
longer checks `pref`. Should not impact average consumers.
|
||||
1. Some unused files were removed, i.e., `jquery-ui-1.8.custom.min.js`,
|
||||
some old build/tools closure/yuicompressor code, and the unmaintained
|
||||
chrome-app, firefox-extension, and opera-widget. (However, an updated
|
||||
WebExtensions replacement (or such) for these would be welcome.)
|
||||
1. User-facing changes:
|
||||
1. Clipboard: Move clipboard from `localStorage` to `sessionStorage`.
|
||||
Listing as a breaking change as previously held clipboard data
|
||||
will not be restored.
|
||||
Reference in New Issue
Block a user