From 8dc3d2517b41d12b1e06f88a449f30d27c137c21 Mon Sep 17 00:00:00 2001 From: Jakob Linskeseder Date: Sun, 23 Jul 2023 20:36:51 +0200 Subject: [PATCH] v4.7.8 --- CONTRIBUTING.md | 83 +++++++++++++++++++++++++++------ components/bower.json | 2 +- components/handlebars.js.nuspec | 2 +- components/package.json | 2 +- lib/handlebars/base.js | 2 +- package.json | 3 +- release-notes.md | 13 +++++- 7 files changed, 88 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a31c0873..16c95fcb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ The `grunt dev` implements watching for tests and allows for in browser testing If you notice any problems, please report them to the GitHub issue tracker at [http://github.com/handlebars-lang/handlebars.js/issues](http://github.com/handlebars-lang/handlebars.js/issues). -##Running Tests +## Running Tests To run tests locally, first install all dependencies. @@ -86,7 +86,7 @@ You can use the following scripts to make sure that the CI job does not fail: - **npm run lint** will run `eslint` and fail on warnings - **npm run format** will run `prettier` on all files - **npm run check-before-pull-request** will perform all most checks that our CI job does in its build-job, excluding the "integration-test". -- **npm run integration-test** will run integration tests (using old NodeJS versions and integrations with webpack, babel and so on) +- **npm run test:integration** will run integration tests (using old NodeJS versions and integrations with webpack, babel and so on) These tests only work on a Linux-machine with `nvm` installed (for running tests in multiple versions of NodeJS). ## Releasing the latest version @@ -101,17 +101,74 @@ Before attempting the release Handlebars, please make sure that you have the fol _When releasing a previous version of Handlebars, please look into the CONTRIBUNG.md in the corresponding branch._ -A full release may be completed with the following: - -``` -npm ci -npx grunt -npm publish - -cd dist/components/ -gem build handlebars-source.gemspec -gem push handlebars-source-*.gem -``` +A full release via Docker may be completed with the following: + +1. Create a `Dockerfile` in this folder for releasing + ```Dockerfile + FROM node:10-slim + + ENV EDITOR=vim + + # Update stretch repositories + RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \ + -e 's|security.debian.org|archive.debian.org/|g' \ + -e '/stretch-updates/d' /etc/apt/sources.list + + # Install release dependencies + RUN apt-get update + RUN apt-get install -y git vim + + # Work around deprecated npm dependency install via unauthenticated git-protocol: + # https://github.com/kpdecker/generator-release/blob/87aab9b84c9f083635c3fcc822f18acce1f48736/package.json#L31 + RUN git config --system url."https://github.com/".insteadOf git://github.com/ + + # Configure git + RUN git config --system user.email "release@handlebarsjs.com" + RUN git config --system user.name "handlebars-lang" + + RUN mkdir /home/node/.config + RUN mkdir /home/node/.ssh + RUN mkdir /home/node/tmp + + # Generate config for yo generator-release: + # https://github.com/kpdecker/generator-release#example + # You have to add a valid GitHub OAuth token! + RUN echo "module.exports = {\n auth: 'oauth',\n token: 'GitHub OAuth token'\n};" > /home/node/.config/generator-release + RUN chown -R node:node /home/node/.config + + # Add the generated key to GitHub: https://github.com/settings/keys + RUN ssh-keygen -q -t ed25519 -N '' -f /home/node/.ssh/id_ed25519 -C "release@handlebarsjs.com" + RUN chmod 0600 /home/node/.ssh/id_ed25519* + RUN chown node:node /home/node/.ssh/id_ed25519* + ``` +2. Build and run the Docker image + ```bash + docker build --tag handlebars:release . + docker run --rm --interactive --tty \ + --volume $PWD:/app \ + --workdir /app \ + --user $(id -u):$(id -g) \ + --env NPM_CONFIG_PREFIX=/home/node/.npm-global \ + handlebars:release bash -c 'export PATH=$PATH:/home/node/.npm-global/bin; bash' + ``` +3. Add SSH key to GitHub: `cat /home/node/.ssh/id_ed25519.pub` (https://github.com/settings/keys) +4. Add GitHub API token: `vi /home/node/.config/generator-release` +5. Execute the following steps: + ```bash + npm ci + npm install -g yo@1 grunt@1 generator-release + npm run release + yo release + npm login + npm publish + yo release:publish components handlebars.js dist/components/ + + cd dist/components/ + gem build handlebars-source.gemspec + gem push handlebars-source-*.gem + ``` + +### After the release After the release, you should check that all places have really been updated. Especially verify that the `latest`-tags in those places still point to the latest version diff --git a/components/bower.json b/components/bower.json index ad03dcc4..2a770bce 100644 --- a/components/bower.json +++ b/components/bower.json @@ -1,6 +1,6 @@ { "name": "handlebars", - "version": "4.7.7", + "version": "4.7.8", "main": "handlebars.js", "license": "MIT", "dependencies": {} diff --git a/components/handlebars.js.nuspec b/components/handlebars.js.nuspec index d8031aeb..cbae184d 100644 --- a/components/handlebars.js.nuspec +++ b/components/handlebars.js.nuspec @@ -2,7 +2,7 @@ handlebars.js - 4.7.7 + 4.7.8 handlebars.js Authors https://github.com/handlebars-lang/handlebars.js/blob/master/LICENSE https://github.com/handlebars-lang/handlebars.js/ diff --git a/components/package.json b/components/package.json index 1f8e7309..35fc8ee7 100644 --- a/components/package.json +++ b/components/package.json @@ -1,6 +1,6 @@ { "name": "handlebars", - "version": "4.7.7", + "version": "4.7.8", "license": "MIT", "jspm": { "main": "handlebars", diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index 13bc32b0..d6afe331 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -5,7 +5,7 @@ import { registerDefaultDecorators } from './decorators'; import logger from './logger'; import { resetLoggedProperties } from './internal/proto-access'; -export const VERSION = '4.7.7'; +export const VERSION = '4.7.8'; export const COMPILER_REVISION = 8; export const LAST_COMPATIBLE_COMPILER_REVISION = 7; diff --git a/package.json b/package.json index 69b179d6..fc8bfa66 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "handlebars", "barename": "handlebars", - "version": "4.7.7", + "version": "4.7.8", "description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration", "homepage": "https://www.handlebarsjs.com/", "keywords": [ @@ -82,6 +82,7 @@ }, "scripts": { "build": "grunt build", + "release": "npm run build && grunt release", "format": "prettier --write '**/*.js' && eslint --fix .", "lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:types", "lint:eslint": "eslint --max-warnings 0 .", diff --git a/release-notes.md b/release-notes.md index cabef32b..0668bcc1 100644 --- a/release-notes.md +++ b/release-notes.md @@ -2,7 +2,18 @@ ## Development -[Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.7...master) +[Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.8...master) + +## v4.7.8 - July 27th, 2023 + +- Make library compatible with workers (#1894) - 3d3796c +- Don't rely on Node.js global object (#1776) - 2954e7e +- Fix compiling of each block params in strict mode (#1855) - 30dbf04 +- Fix rollup warning when importing Handlebars as ESM - 03d387b +- Fix bundler issue with webpack 5 (#1862) - c6c6bbb +- Use https instead of git for mustache submodule - 88ac068 + +[Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.7...v4.7.8) ## v4.7.7 - February 15th, 2021