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
40 changes: 0 additions & 40 deletions .github/workflows/rollingversions-canary.yml

This file was deleted.

24 changes: 22 additions & 2 deletions .github/workflows/rollingversions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Release
on:
push:
branches:
- master
repository_dispatch:
types: [rollingversions_publish_approved]

Expand All @@ -21,18 +24,35 @@ jobs:
- run: yarn prettier:check
- run: yarn test


publish-canary:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 24.x
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn build
- run: npx rollingversions publish --canary $GITHUB_RUN_NUMBER
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'repository_dispatch' }}
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 24.x
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn build
- run: npx rollingversions publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 5 additions & 3 deletions packages/pug-code-gen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function Compiler(node, options) {
);
}
if (
this.doctype &&
(this.doctype.includes('<') || this.doctype.includes('>'))
this.options.doctype &&
(this.options.doctype.includes('<') || this.options.doctype.includes('>'))
) {
throw new Error('Doctype can not contain "<" or ">"');
}
Expand Down Expand Up @@ -209,7 +209,9 @@ Compiler.prototype = {
*/

setDoctype: function(name) {
this.doctype = doctypes[name.toLowerCase()] || '<!DOCTYPE ' + name + '>';
this.doctype = doctypes.hasOwnProperty(name.toLowerCase())
? doctypes[name.toLowerCase()]
: '<!DOCTYPE ' + name + '>';
this.terse = this.doctype.toLowerCase() == '<!doctype html>';
this.xml = 0 == this.doctype.indexOf('<?xml');
},
Expand Down
Loading