Skip to content
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

Prep for release #4

Merged
merged 2 commits into from
Jun 5, 2020
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
9 changes: 9 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch"
}
5 changes: 5 additions & 0 deletions .changeset/kind-badgers-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

Release on `seek-oss`
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ jobs:

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-optional --non-interactive
# - name: Publish to npm
# run: yarn release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.SEEK_OSS_CI_NPM_TOKEN }}

- name: Publish to npm
uses: changesets/action@master
with:
publish: yarn release
version: yarn stage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEEK_OSS_CI_NPM_TOKEN }}
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,30 @@
"engines": {
"node": ">=12"
},
"version": "0.0.0-semantically-released",
"version": "3.4.0",
"main": "lib/commonjs",
"module": "lib/es2015",
"typings": "lib/index.d.ts",
"files": [
"config",
"lib",
"config/**/*",
"lib/**/*.d.ts",
"lib/**/*.js",
"lib/**/*.js.map",
"lib/template/**/*",
Comment on lines +16 to +19
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were previously bundling tsbuildinfos 🤦

This chicanery appears to get us down from ~1.5MB to ~0.5MB

"jest-preset.js"
],
"sideEffects": false,
"license": "MIT",
"scripts": {
"skuba": "ts-node src/skuba",
"build": "concurrently yarn:build:*",
"build": "concurrently yarn:build:* && scripts/postbuild.sh",
"build:commonjs": "tsc --module CommonJS --outDir lib/commonjs --project tsconfig.build.json",
"build:declaration": "tsc --allowJS false --declaration --emitDeclarationOnly --project tsconfig.build.json",
"build:es2015": "tsc --module ES2015 --outDir lib/es2015 --project tsconfig.build.json",
"format": "yarn skuba format",
"lint": "yarn skuba lint",
"postbuild": "scripts/postbuild.sh",
"prerelease": "yarn build",
"release": "semantic-release --success false",
"release": "yarn build && changeset publish",
"stage": "changeset version && yarn format",
"skuba": "ts-node src/skuba",
"test": "jest",
"test:template": ".buildkite/test-template.sh"
},
Expand All @@ -37,12 +39,12 @@
"url": "https://github.com/seek-oss/skuba.git"
},
"devDependencies": {
"@changesets/cli": "2.8.0",
"@types/concurrently": "5.2.1",
"@types/ejs": "3.0.4",
"@types/fs-extra": "9.0.1",
"@types/lodash": "4.14.154",
"@types/npm-which": "3.0.0",
"semantic-release": "17.0.8",
"type-fest": "0.15.0"
},
"dependencies": {
Expand Down
13 changes: 12 additions & 1 deletion src/cli/configure/analysis/project.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getSkubaVersion } from '../../../utils/version';
import * as packageAnalysis from '../analysis/package';
import { defaultOpts } from '../testing/module';

Expand All @@ -11,7 +12,17 @@ describe('diffFiles', () => {
.mockReturnValue(() => Promise.resolve(undefined));
jest.spyOn(packageAnalysis, 'getPackageVersion').mockResolvedValue('0.0.1');

const outputFiles = await diffFiles(defaultOpts);
const [outputFiles, version] = await Promise.all([
diffFiles(defaultOpts),
getSkubaVersion(),
]);

const manifest = outputFiles['package.json'];

manifest.data = manifest.data?.replace(
new RegExp(version, 'g'),
'0.0.0-semantically-released',
);

expect(outputFiles).toMatchSnapshot();
});
Expand Down
Loading