Skip to content

chore: bump deps for plugin metadata #70

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

Merged
merged 3 commits into from
Mar 6, 2025
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
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"changelog": [
"@changesets/changelog-github",
{
"repo": "rx-ts/angular-eslint-template-parser"
"repo": "un-ts/angular-eslint-template-parser"
}
],
"commit": false,
Expand Down
5 changes: 5 additions & 0 deletions .changeset/selfish-tables-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"angular-eslint-template-parser": patch
---

chore: bump deps for plugin metadata
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"node": "14",
"node": "20",
"sandboxes": []
}
35 changes: 15 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,42 @@ on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 14.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Enable Corepack
run: corepack enable

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Setup Node.js LTS
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: lts/*
cache: yarn

- name: Install Dependencies
# https://github.com/atlassian/changesets/issues/246
run: |
yarn --frozen-lockfile
rm -rf .git/hooks/commit-msg
yarn --immutable

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run release
publish: yarn release
commit: 'chore: release angular-eslint-template-parser'
title: 'chore: release angular-eslint-template-parser'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
1 change: 1 addition & 0 deletions .yarn/plugins/plugin-prepare-lifecycle.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};
8 changes: 8 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
enableTelemetry: false

nodeLinker: node-modules

plugins:
- checksum: 37b2361b1502b2054e6779788c0e9bdd6a90ce49852a8cad2feda79b0614ec94f06fb6e78951f5f95429c610d7934dd077caa47413a0227378a102c55161616d
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
spec: "https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js"
20 changes: 10 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
// @ts-check

/**
* @typedef {import('eslint').Linter.ESLintParseResult} ESLintParseResult
* @typedef {{ filePath: string }} Options
* @import { Linter } from 'eslint'
* @import { ParserOptions } from '@angular-eslint/template-parser'
*/

const _ =
/** @type {{parseForESLint: (code: string, options: Options) => ESLintParseResult}} */ (
/** @type {any} */ (require('@angular-eslint/template-parser'))
)
const _ = require('@angular-eslint/template-parser')

/**
* @param {string} code
* @param {Options} options
* @returns {ESLintParseResult} parse result with AST
* @param {ParserOptions} options
* @returns {Linter.ESLintParseResult} parse result with AST
*/
const parseForESLint = (code, options) => {
const result = _.parseForESLint(code, options)
result.ast.body = result.ast.body || []
return result
return /** @type {Linter.ESLintParseResult} */ (
/** @type {unknown} */ (result)
)
}

module.exports = {
..._,
parseForESLint,
/**
* @param {string} code
* @param {Options} options
* @param {ParserOptions} options
* @returns {import('eslint').AST.Program} parsed AST result
*/
parse: (code, options) => parseForESLint(code, options).ast,
Expand Down
31 changes: 20 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "angular-eslint-template-parser",
"version": "0.1.1",
"repository": "git+https://github.com/rx-ts/angular-eslint-template-parser.git",
"repository": "git+https://github.com/un-ts/angular-eslint-template-parser.git",
"author": "JounQin <[email protected]>",
"license": "MIT",
"packageManager": "[email protected]",
"main": "index.js",
"types": "index.d.ts",
"files": [
Expand All @@ -13,22 +14,30 @@
"scripts": {
"build": "tsc -p jsconfig.json",
"lint": "eslint --cache .",
"prepare": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
"prerelease": "npm run build",
"release": "clean-publish && changeset publish"
"prepack": "clean-pkg-json",
"prepare": "simple-git-hooks || exit 0",
"prerelease": "yarn build",
"release": "changeset publish"
},
"peerDependencies": {
"@angular-eslint/template-parser": "*"
},
"devDependencies": {
"@1stg/common-config": "^2.5.2",
"@angular-eslint/template-parser": "^12.7.0",
"@angular/compiler": "^12.2.17",
"@angular/core": "^12.2.17",
"@1stg/common-config": "^10.0.0",
"@angular-eslint/template-parser": "^19.2.0",
"@angular/compiler": "^19.2.1",
"@angular/core": "^19.2.1",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.28.1",
"@types/eslint": "^7.29.0",
"clean-publish": "^2.2.0",
"typescript": "^4.9.5"
"@commitlint/cli": "^18.6.1",
"@types/eslint": "^8.56.12",
"clean-pkg-json": "^1.2.0",
"eslint": "^8.57.1",
"lint-staged": "^15.4.3",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.8.2"
},
"resolutions": {
"eslint-plugin-jsdoc": "^48.3.0"
}
}
Loading