-
Notifications
You must be signed in to change notification settings - Fork 236
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
Release 13.0.0 #1783
Merged
Release 13.0.0 #1783
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure that create script installs same version of starter files and kit
Better cli argument parsing
V13 pre refactor
Use spawn instead of exec so we can inherit stdio.
Make sure first line is separated from second by a newline character.
On Windows (in GitHub Actions test environment) the `create` script failed because the spawn raised ENOENT: Error: spawn npm ENOENT Using the shell should fix this.
These scripts are no longer accessible by users as they are buried within the package, and are therefore no longer useful. This commit removes them.
…ught back fileHelpers tests.
Show output from npm install when running create script
Remove unused script stubs
Fix formatting of .tmp/sass/_extensions.scss
Update plugin interface
Investigating flakey tests
We don't want to accidentally end up with development code installed in system Node installation after running tests.
- log test directory - echo to stderr - no need to create directory for create script - run in repo dir instead of test dir - use remove instead of rmdir to avoid deprecation warnings - use writeJson to simplify creating tracking config
On Windows if given an absolute path starting with drive `create` would error with `Path contains invalid characters`.
Stop installing govuk-prototype-kit globally in tests
Previously we forced GitHub Actions and npm to use bash as the shell on all operating systems, npm defaults to using cmd.exe on Windows [[1]], GitHub Actions defaults to using PowerShell on Windows [[2]]. This commit removes the overrides, and also fixes up the npm package scripts syntax to support cmd.exe. [1]: https://docs.npmjs.com/cli/v8/using-npm/config#script-shell [2]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
Support cmd.exe and PowerShell
It is sometimes useful to be able to `exec` a command and have the output go to the terminal. This commit updates our exec to let us do that. The `child_process.exec` function does not support this, however spawn does, and we can emulate exec by using a shell (similar to what the `execa` package or `child_process` itself does).
Adds a script intended for use with npm scripts in package.json. It sort of works like `start-server-and-test`, only much simpler: it creates a prototype in a temporary folder using `mkPrototype`, then runs a shell command in the temporary folder. By default it runs `npm run start`, although by supplying a command line argument it can run any command, which is what makes it more useful than a script that creates and starts the prototype all within node. It can then be composed with `start-server-and-test`, without the need to pass the test directory around. For instance, for a simple test: npx start-server-and-test 'node scripts/create-prototype-and-start' 3000 test:smoke The npm script `start` will be run in the test directory ($TMPDIR/govuk-prototype-kit-test by default, but can be overridden with KIT_TEST_DIR), and the test script (`test:smoke` in this case) will be run in the kit project directory.
Split require lines in starter files
This is not needed for v13, delete it.
Merge 'main' into v13 branch
The documentation app is no longer part of this repo, so these internal docs are out-of-place. Delete them.
In future we will be releasing the GOV.UK Prototype Kit as a package on npm, this commit updates our internal docs to explain how to do that.
Fix plugin latest release versions
Link to docs
Fix changelog
Update domain from heroku to service.gov.uk
Update internal docs for v13
…hen-migration-is-successful Provide support contact even when migration is successful
4 tasks
BenSurgisonGDS
approved these changes
Nov 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this release we’ve made some significant changes to how the GOV.UK Prototype Kit works.
These changes make the kit:
If you have an existing prototype and want to make the changes in this release, we recommend using the migration script to help with any breaking changes.
Migrate an existing prototype to version 13
If you need help with the Prototype Kit, contact the GOV.UK Prototype team.
Breaking changes
The Prototype Kit is now an npm package
The 2 biggest breaking changes to the Prototype Kit are you can now create a prototype:
To run the kit, use
npm run dev
(notnpm start
).To make the kit easier to update in the future, we have moved essential Prototype Kit files out of the users prototype folder and into the npm package.
This is alongside other work we've been doing that allows users to delete files they're not using.
Using Node.js
The Prototype Kit no longer supports versions 12 or 14 of Node.js. We recommend you update to the latest LTS version Node.js 18
Creating routes, filters, templates and layouts
How you create routes, filters and templates has changed. There is also a new approach to layouts.
Create routes
Create pages from templates
How to use layouts
Default user template
The default user template for a new prototype has moved to
app/views/layouts/main.html
.To help make these changes to an existing prototype, we have a migration script
How to migrate an existing prototype to version 13
Other breaking changes
You can no longer use the Prototype Kit with Internet Explorer 8
The Prototype Kit no longer includes the step by step pattern by default
The Prototype Kit no longer includes jQuery by default
You can no longer use v6 compatibility mode
New features
Manage your Prototype
There is a new Manage your Prototype page in the kit. From this page you can:
add and change your service name
create new pages using templates
find and install plugins that work with the Prototype Kit
Create "Manage your prototype" pages #1589
GOV.UK Frontend
When creating a new prototype, you will always have the latest version of GOV.UK Frontend.
The latest version of GOV.UK Frontend is version 4.4.0.
Read the release notes
Other changes
Guidance and documentation for the Prototype Kit is now at prototype-kit.service.gov.uk
There are 2 sets of guidance to support users:
You can no longer see the docs folder in your prototype
If you need help with the Prototype Kit, contact the GOV.UK Prototype team.