Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "Node.js",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# http://editorconfig.org
# https://editorconfig.org
root = true

[*]
Expand Down
11 changes: 0 additions & 11 deletions .eslintrc

This file was deleted.

38 changes: 14 additions & 24 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,50 @@ on:
pull_request:
push:
branches:
- master
- main
env:
CI: true

jobs:
prettier:
name: Format code
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Prettier
uses: gulpjs/prettier_action@v3.0
with:
commit_message: 'chore: Run prettier'
prettier_options: '--write .'

test:
name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 16]
node: [22, 24, 26]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set Node.js version
uses: actions/setup-node@v2
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}

- run: node --version
- run: npm --version
- name: Check node version
run: node --version

- name: Check npm version
run: npm --version

- name: Install npm dependencies
run: npm install
run: npm ci

- name: Run lint
run: npm run lint

- name: Run tests
run: npm test

- name: Check format
run: npm run format-check

- name: Coveralls
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{matrix.os}}-node-${{ matrix.node }}
Expand All @@ -69,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ name: release
on:
push:
branches:
- master
- main

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: release-please-action
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ coverage
# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019-2021 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
Copyright (c) 2021-2023, 2026 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 39 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a href="http://gulpjs.com">
<a href="https://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
Expand All @@ -12,24 +12,58 @@ Updates a gulpjs repository to match our current scaffold.

## Usage

This is a command-line tool that normalizes all repositories in the gulpjs organization by applying git commits from our [.boilerplate] repository on top of the code that already exists. Running the command `update-template` with no flags will try to detect the version of [.boilerplate] is currently used and apply only the commits necessary. If detection fails or is incorrect, you can use the `--start-tag` and/or `--end-tag` flags explicitly.

```sh
> update-template
update-template
```

If you resolve any merge conflicts, a file with the `.orig` extension will be created. You should delete these files, as they are just showing the previous conflict.

## Merge tool

A merge tool should must set to resolve any merge conflicts encountered while applying the new boilerplate.

If you use VSCode, you can specify:

```
git config --global merge.tool vscode
git config --global mergetool.vscode.cmd 'code --wait --merge $REMOTE $LOCAL $BASE $MERGED'
```

Git supports vim and emacs out of the box, but you could also use [meld] as a standalone tool if you don't like any of those options.

## API

None, exclusively used as a command-line tool.

## Strict No LLM / No AI Policy

No LLMs for issues.

No LLMs for patches / pull requests.

No LLMs for comments on the bug tracker, including translation.

English is encouraged, but not required. You are welcome to post in your native language and rely on others to have their own translation tools of choice to interpret your words.

## License

MIT

<!-- prettier-ignore-start -->
[.boilerplate]: https://github.com/gulpjs/.boilerplate
[meld]: https://meldmerge.org/
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/@gulpjs/update-template.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@gulpjs/update-template
[npm-image]: https://img.shields.io/npm/v/@gulpjs/update-template.svg?style=flat-square

[ci-url]: https://github.com/gulpjs/update-template/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/update-template/dev?style=flat-square
[ci-url]: https://github.com/gulpjs/update-template/actions/workflows/dev.yml
[ci-image]: https://img.shields.io/github/actions/workflow/status/gulpjs/update-template/dev.yml?style=flat-square

[coveralls-url]: https://coveralls.io/r/gulpjs/update-template
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/update-template/master.svg?style=flat-square
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/update-template/main.svg?style=flat-square
<!-- prettier-ignore-end -->
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var gulpConfig = require("eslint-config-gulp");

module.exports = [...gulpConfig.default];
18 changes: 16 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
const { Semver } = require(`sver`);
const remoteGitTags = require(`remote-git-tags`);
const boilerplateUpdate = require(`boilerplate-update`);
const { execSync } = require("child_process");

const REMOTE_URL = `https://github.com/gulpjs/.boilerplate`;

Expand Down Expand Up @@ -61,8 +62,13 @@
return `3.0.3`;
}

return `3.1.0`;
if (releaseWorkflow) {
return `3.1.0`;
}

// 4.0.0 had a bug with repository metadata in package.json
return `4.0.1`;
} catch (err) {

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 22 on windows-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 22 on windows-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 26 on macos-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 26 on macos-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 24 on ubuntu-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 24 on ubuntu-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 26 on windows-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 26 on windows-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 22 on ubuntu-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 22 on ubuntu-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 26 on ubuntu-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 26 on ubuntu-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 22 on macos-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 22 on macos-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 24 on windows-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 24 on windows-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 24 on macos-latest

'err' is defined but never used

Check warning on line 71 in index.js

View workflow job for this annotation

GitHub Actions / Tests for Node 24 on macos-latest

'err' is defined but never used
// Always fallback to 1.0.0
return `1.0.0`;
}
Expand Down Expand Up @@ -131,12 +137,20 @@
startVersion: argv.startTag,
endVersion: argv.endTag,
resolveConflicts: {
stdio: 'inherit',
stdio: "inherit",
},
wasRunAsExecutable: true,
});

await boilerplateUpdatePromise;

if (argv.endTag === `4.0.1`) {
console.log("fixing npm package...");
execSync("npm pkg fix");
console.log("updating lockfile...");
execSync("npm install --package-lock-only");
console.warn("you probably want to run `npm ci && npm run format-write`");
}
}

yargs.command(`$0`, `Update a gulp repository to our template`, opts, run, [
Expand Down
Loading
Loading