- 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
master
Brett Zamir 2020-02-22 11:38:33 +08:00
parent 105037ef79
commit 7c6f512512
13 changed files with 127 additions and 32 deletions

View File

@ -33,3 +33,4 @@ editor/external/dom-polyfill/*
mochawesome-report
releases
!.eslintrc.js
!.ncurc.js

View File

@ -69,7 +69,7 @@ module.exports = {
}
},
{
files: '.eslintrc.js',
files: ['.eslintrc.js', '.ncurc.js'],
extends: [
'plugin:node/recommended-script'
],

View File

@ -1,6 +1,8 @@
'use strict';
module.exports = {
"reject": [
// Old copy with jspdf which needs updating: https://github.com/SVG-Edit/svgedit/issues/51
"underscore"
reject: [
// Todo: Old copy with jspdf which needs updating: https://github.com/SVG-Edit/svgedit/issues/51
'underscore'
]
};

View File

@ -1,6 +1,6 @@
# SVG-Edit CHANGES
## 6.0.0 (unreleased)
## 6.0.0
- License: Reflect actual license of library in `package.json` based
not only on licenses of repository as a whole (i.e., "MIT") but
@ -21,6 +21,8 @@
- BREAKING CHANGE: `putLocale` (a function called automatically by
`svg-editor.js`) no longer checks `pref`. Should not impact
average consumers.
- BREAKING CHANGE: Move clipboard from `localStorage` to `sessionStorage`
(@NeilFraser)
- Fix: main menu style and text #371
- Fix (Accessibility): Avoid duplicate IDs
- Fix (openclipart browser): Redirect on lacking browser support
@ -44,7 +46,6 @@
- Localization: Add 'SVG-Edit Home Page' to locale files
- Docs: Remove outdated info on jsdoc linting (now just part of eslint config)
- Docs: Add testing badge
- Docs: Expand `Testing.md`.
- Docs: Add license badges and `licenseInfo.json` (has a
`filesByLicense` map of files to licenses (not yet used programmatically)
and `bundledRootPackages` which is used by `license-badger` to know which
@ -52,6 +53,8 @@
summary of all licenses including bundled).
- Docs: Reprioritize `docs` in commit lists (prioritize user-facing)
- Docs: Update Pavol's email address (@prusnak)
- Docs: Update Contributing, Testing (renamed to Development),
Linting and ReleaseInstructions
- Refactoring: Switch from `$.param.querystring` to `URL`
- Refactoring: Ensure file-global jsdoc tags are at beginning of file
- Refactoring: Move `build-html` to `build` directory
@ -61,6 +64,9 @@
- Linting (ESLint): Replace `innerHTML` with `textContent` from old demo
- Linting (ESLint): Update as per latest ash-nazg
- Linting (ESLint): Add rules to check for file-level tags
- Linting (ESLint): Check hidden rc files
- Linting (ESLint): Add linting plugins (mocha, chai-expect, chai-friendly,
cypress)
- Testing: Switch to Cypress with code coverage for UI testing;
use ESM version for faster debugging
- Testing: Add map file for underscore
@ -81,6 +87,8 @@
building docs and instrumenting)
- npm: Update scripts to reflect removal of `all_tests.html`;
remove `browser-test` script
- npm: Add `add-release` script
- npm: Add `license-badges`, `build-docs`, and `copy` scripts to `prepublishOnly` script
- npm: Rename `test-prep` to `prep` and other misc. script naming changes
- npm: Update `package-lock.json`
- npm: Update devDeps, peerDeps

View File

@ -25,7 +25,6 @@ works in any modern browser.
![screenshot](docs/screenshot.png)
## Help wanted
While we have made some recent releases to SVG-edit for bug fixes,
@ -148,6 +147,8 @@ incorporating SVGEdit. You will need to have Node.js/npm installed.
## Recent news
- 2020-02-22 Published 6.0.0 License clarifications/updates, PDF export
improvements, clipboard `sessionStorage`, and other changes.
- 2019-11-16 Published 5.1.0 Misc. fixes and refactoring
- 2019-05-07 Published 5.0.0 Change from `@babel/polyfill`
- 2019-04-03 Published 4.3.0 Fix for double click on gradient

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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
View 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.

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "svgedit",
"version": "5.1.0",
"version": "6.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "svgedit",
"version": "5.1.0",
"version": "6.0.0",
"description": "Powerful SVG-Editor for your browser ",
"main": "dist/index-umd.js",
"module": "dist/index-es.js",
@ -13,7 +13,10 @@
"node": ">=8.5.0"
},
"scripts": {
"add-release": "git submodule add -b \"release-v$VERSION\" https://github.com/SVG-Edit/svgedit.git \"releases/svg-edit-$VERSION\" && git config --file=.gitmodules submodule.releases/latest.branch \"release-v$VERSION\"",
"add-release": "git fetch --all && git submodule add --depth=1 -b \"release-v$VERSION\" https://github.com/SVG-Edit/svgedit.git \"releases/svg-edit-$VERSION\" && git config --file=.gitmodules submodule.releases/latest.branch \"release-v$VERSION\"",
"submodules": "run-s submodules-init submodules-update",
"submodules-init": "echo \"Performing non-recursive init as don't want submodules to have their own releases!\" && git submodule update --init",
"submodules-update": "echo \"Performing non-recursive fetch as don't want submodules to have their own releases!\" git submodule foreach git fetch && git submodule foreach git submodule update --remote",
"start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
"start-embedded": "run-p start start-allow-origin",
"start": "echo \"Open file, e.g., to http://localhost:8000/editor/svg-editor-es.html\" && static -p 8000",
@ -55,7 +58,7 @@
"build-by-config": "rollup -c rollup-config.config.js",
"prep-no-core-rollup": "run-s eslint build-html build-by-config",
"prep": "run-s prep-no-core-rollup rollup",
"prepublishOnly": "npm run prep",
"prepublishOnly": "run-s license-badges copy build-docs prep",
"cypress:open-no-start": "cypress open",
"cypress:open": "run-p start cypress:open-no-start",
"open-tests": "run-s instrument cypress:open",

@ -1 +1 @@
Subproject commit 334dc09c6354d37e4f57380a44b3818527befc7c
Subproject commit b1712702288c59ddf49d85d8252239b1834b880f