Skip to content

Commit

Permalink
Merge pull request #6139 from backstage/rugvip/pubcore
Browse files Browse the repository at this point in the history
codemods: fix release trouble
  • Loading branch information
Rugvip committed Jun 21, 2021
2 parents 202d6f0 + 2eafb4b commit f2b2cf9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 11 deletions.
4 changes: 4 additions & 0 deletions packages/codemods/CHANGELOG.md
@@ -1,5 +1,9 @@
# @backstage/codemods

## 0.1.2

Fixed a publish issue, making this package available to the public.

## 0.1.1

### Patch Changes
Expand Down
26 changes: 17 additions & 9 deletions packages/codemods/bin/backstage-codemods
Expand Up @@ -17,13 +17,21 @@

const path = require('path');

require('ts-node').register({
transpileOnly: true,
/* eslint-disable-next-line no-restricted-syntax */
project: path.resolve(__dirname, '../../../tsconfig.json'),
compilerOptions: {
module: 'CommonJS',
},
});
// Figure out whether we're running inside the backstage repo or as an installed dependency
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('fs').existsSync(path.resolve(__dirname, '../src'));

require('../src');
if (!isLocal) {
require('..');
} else {
require('ts-node').register({
transpileOnly: true,
/* eslint-disable-next-line no-restricted-syntax */
project: path.resolve(__dirname, '../../../tsconfig.json'),
compilerOptions: {
module: 'CommonJS',
},
});

require('../src');
}
13 changes: 11 additions & 2 deletions packages/codemods/package.json
@@ -1,8 +1,12 @@
{
"name": "@backstage/codemods",
"description": "A collection of codemods for Backstage projects",
"version": "0.1.1",
"version": "0.1.2",
"private": false,
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js"
},
"homepage": "https://backstage.io",
"repository": {
"type": "git",
Expand All @@ -16,8 +20,12 @@
"main": "src/index.ts",
"scripts": {
"start": "nodemon --",
"build": "backstage-cli build --outputs cjs",
"lint": "backstage-cli lint",
"test": "backstage-cli test"
"test": "backstage-cli test",
"prepack": "backstage-cli prepack",
"postpack": "backstage-cli postpack",
"clean": "backstage-cli clean"
},
"bin": {
"backstage-codemods": "bin/backstage-codemods"
Expand All @@ -43,6 +51,7 @@
"ext": "ts"
},
"files": [
"bin",
"dist",
"transforms"
]
Expand Down

0 comments on commit f2b2cf9

Please sign in to comment.