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

Prepare release of Bemuse v47.0.0 #571

Merged
merged 25 commits into from
Sep 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
30d4367
Bump axios from 0.17.1 to 0.18.1
dependabot[bot] Sep 15, 2019
d6eb605
Bump jquery from 3.3.1 to 3.4.0
dependabot[bot] Sep 15, 2019
aa51c65
Bump js-yaml from 3.12.0 to 3.13.1
dependabot[bot] Sep 15, 2019
1846a36
Bump webpack-dev-server from 3.1.9 to 3.1.11
dependabot[bot] Sep 15, 2019
c504e3b
Bump lodash from 4.17.11 to 4.17.13
dependabot[bot] Sep 15, 2019
e1ab04b
Bump eslint-utils from 1.3.1 to 1.4.2
dependabot[bot] Sep 15, 2019
85350f4
Bump lodash.merge from 4.6.1 to 4.6.2
dependabot[bot] Sep 15, 2019
ae79018
Bump mixin-deep from 1.3.1 to 1.3.2
dependabot[bot] Sep 15, 2019
6e48d57
Bump lodash.mergewith from 4.6.1 to 4.6.2
dependabot[bot] Sep 15, 2019
280a28d
Bump lodash-es from 4.17.11 to 4.17.15
dependabot[bot] Sep 15, 2019
aeba4f3
Bump fstream from 1.0.11 to 1.0.12
dependabot[bot] Sep 15, 2019
3f51c76
Merge remote-tracking branches 'origin/dependabot/npm_and_yarn/axios-…
dtinth Sep 15, 2019
cc6a6e7
Extract superclass for DndResources to extend CustomSongResources
dtinth Sep 29, 2019
ba9e15b
Add support for ?archive query flag
dtinth Sep 29, 2019
965f7c0
Add docs
dtinth Sep 29, 2019
c4ae882
Improve TODO comments
dtinth Sep 29, 2019
0fa7916
Disable breaks when markdown is safe to fix CHANGELOG linebreaking
dtinth Sep 29, 2019
f129f1c
Update strip-changelog-pre-version-postfix script to strip .0 from pr…
dtinth Sep 29, 2019
0c10fa1
Remove .0 version suffixes from CHANGELOG.md
dtinth Sep 29, 2019
c111431
Merge pull request #567 from deps-upgrade
release-train[bot] Sep 29, 2019
65b6c0d
Merge pull request #568 from archive-query-flag-support
release-train[bot] Sep 29, 2019
f3deff7
Merge pull request #569 from disable-breaks-safe-markdown
release-train[bot] Sep 29, 2019
5a60fea
Merge pull request #570 from fix-changelog-trailing-zeros
release-train[bot] Sep 29, 2019
c9a4263
Prepare changelog for v47.0.0-pre.201909291634
release-train[bot] Sep 29, 2019
7bad53b
Update package.json to version v47.0.0-pre.201909291634
release-train[bot] Sep 29, 2019
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: 33 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,33 @@
[@hajimehoshi]: https://github.com/hajimehoshi
[@nekokan]: https://github.com/Nekokan

## v46.0.0 (2019-09-12)
## v47.0.0-pre.201909291634

### New stuff

- Add support for `?archive` query flag
([requested](https://twitter.com/Nekokan_Server/status/1173186650865713153) by
[@Nekokan]) [#568], by [@dtinth]

### Internals

- Updated some dependencies in response to
[GitHub security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies).
[#567], by [@dtinth]

### Improvements

- Fixed a CHANGELOG formatting issue where changelog text is broken into
multiple lines when viewed in Bemuse. [#569], by [@dtinth]
- Minor CHANGELOG update: Removed trailing .0.0 in version number. [#570], by
[@dtinth]

[#567]: https://github.com/bemusic/bemuse/pull/567
[#568]: https://github.com/bemusic/bemuse/pull/568
[#569]: https://github.com/bemusic/bemuse/pull/569
[#570]: https://github.com/bemusic/bemuse/pull/570

## v46 (2019-09-12)

### New stuff

Expand All @@ -36,7 +62,7 @@
[#553]: https://github.com/bemusic/bemuse/pull/553
[#554]: https://github.com/bemusic/bemuse/pull/554

## v45.1.0 (2019-09-02)
## v45.1 (2019-09-02)

### Internals

Expand All @@ -45,7 +71,7 @@

[#549]: https://github.com/bemusic/bemuse/pull/549

## v45.0.0 (2019-08-31)
## v45 (2019-08-31)

### New stuff

Expand All @@ -67,7 +93,7 @@
[#546]: https://github.com/bemusic/bemuse/pull/546
[#547]: https://github.com/bemusic/bemuse/pull/547

## v44.5.0 (2019-08-30)
## v44.5 (2019-08-30)

### Internals

Expand All @@ -78,7 +104,7 @@

[#544]: https://github.com/bemusic/bemuse/pull/544

## v44.4.0 (2019-08-29)
## v44.4 (2019-08-29)

### New stuff

Expand All @@ -92,7 +118,7 @@
[#541]: https://github.com/bemusic/bemuse/pull/541
[#542]: https://github.com/bemusic/bemuse/pull/542

## v44.3.0 (2019-08-29)
## v44.3 (2019-08-29)

### Internals

Expand All @@ -116,7 +142,7 @@

[#536]: https://github.com/bemusic/bemuse/pull/536

## v44.1.0 (2019-08-29)
## v44.1 (2019-08-29)

### New stuff

Expand Down
2 changes: 1 addition & 1 deletion bin/strip-changelog-pre-version-postfix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ const data = fs.readFileSync('CHANGELOG.md', 'utf8')
const date = new Date().toJSON().split('T')[0]
fs.writeFileSync(
'CHANGELOG.md',
data.replace(/(## v[\d.]+)-pre\.\d+/g, `$1 (${date})`)
data.replace(/(## v[\d.]+?)(?:\.0)?(?:\.0)?-pre\.\d+/g, `$1 (${date})`)
)
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bemuse",
"version": "46.0.0",
"version": "47.0.0-pre.201909291634",
"description": "BEAT☆MUSIC☆SEQUENCE, a web-based music game of the future",
"main": "index.js",
"private": true,
Expand Down Expand Up @@ -145,14 +145,14 @@
"web-audio-test-api": "^0.5.2",
"webpack": "4.20.2",
"webpack-dev-middleware": "^3.4.0",
"webpack-dev-server": "3.1.9",
"webpack-dev-server": "3.1.11",
"worker-loader": "^2.0.0",
"yn": "^1.3.0"
},
"dependencies": {
"audio-context": "^1.0.3",
"auth0-js": "^9.8.0",
"axios": "^0.17.1",
"axios": "^0.18.1",
"baconjs": "^0.7.95",
"bemuse-indexer": "^45.1.0",
"bemuse-notechart": "^45.1.0",
Expand Down
27 changes: 27 additions & 0 deletions src/app/PreloadedCustomBMS.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { getPreloadArchiveFlag } from './query-flags'

let pending: string | null = String(getPreloadArchiveFlag() || '') || null

/**
* Returns `true` if there is a pending archive to be downloaded.
*
* @see https://github.com/bemusic/bemuse/pull/568
*/
export function hasPendingArchiveToLoad() {
return !!pending
}

/**
* Returns the URL to the pending archive to be downloaded.
* This function can be called once.
* After the URL is consumed, the pending URL is cleared.
*
* @see https://github.com/bemusic/bemuse/pull/568
*/
export function consumePendingArchiveURL() {
try {
return pending
} finally {
pending = null
}
}
2 changes: 1 addition & 1 deletion src/app/game-launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function launch({
invariant(options, 'Options must be passed!')

// initialize the loading specification
// TODO: Create an object at the end instead of building object from blank.
// TODO: Create the LoadSpec object at the end instead of building object from blank.
let loadSpec: LoadSpec = {} as any
loadSpec.songId = song.id

Expand Down
14 changes: 14 additions & 0 deletions src/app/io/CustomSongsIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import * as ReduxState from '../redux/ReduxState'
import { createIO } from 'impure'

import DndResources from '../../resources/dnd-resources'
import {
downloadFileEntryFromURL,
CustomSongResources,
} from '../../resources/custom-song-resources'
import { getIPFSResources } from '../../resources/ipfs-resources'

export function handleCustomSongFolderDrop(event) {
Expand All @@ -13,6 +17,16 @@ export function handleCustomSongFolderDrop(event) {
})
}

export function handleCustomSongURLLoad(url) {
return createIO(async ({ store, customSongLoader }) => {
const resources = new CustomSongResources({
getFiles: async log => [await downloadFileEntryFromURL(url, log)],
})
const initialLog = ['Loading from ' + url]
return loadCustomSong(resources, initialLog, { store, customSongLoader })
})
}

export function handleClipboardPaste(e) {
return createIO(async ({ store, customSongLoader }) => {
let match
Expand Down
29 changes: 25 additions & 4 deletions src/app/query-flags.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
import query from 'bemuse/utils/query'

/**
* The `?server` flag specifies a URL to a Bemuse custom music server.
*
* @see https://bemuse.ninja/project/docs/music-server.html
*/
export function getMusicServer() {
return query.BEMUSE_MUSIC_SERVER || query.server
}

export function getInitialGrepString() {
return query.grep
/**
* The `?archive` flag specifies a URL to a BMS archive file to be downloaded when the player enters the game.
*
* @see https://github.com/bemusic/bemuse/pull/568
* @see https://twitter.com/Nekokan_Server/status/1173186650865713153
*/
export function getPreloadArchiveFlag() {
return query.archive
}

export function getTimeSynchroServer() {
return query.BEMUSE_TIMESYNCHRO_SERVER
/**
* The `?grep` flag specifies the initials search text to be pre-filled when the player enters the music selection screen.
*/
export function getInitialGrepString() {
return query.grep
}

/**
* The `?song` flag specifies the title of the song to be pre-selected when the player enters the music selection screen.
*/
export function getInitiallySelectedSong() {
return query.song
}

export function getTimeSynchroServer() {
return query.BEMUSE_TIMESYNCHRO_SERVER
}
14 changes: 12 additions & 2 deletions src/app/ui/CustomBMS.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import * as Analytics from '../analytics'
import * as CustomSongsIO from '../io/CustomSongsIO'
import * as ReduxState from '../redux/ReduxState'
import connectIO from '../../impure-react/connectIO'
import {
hasPendingArchiveToLoad,
consumePendingArchiveURL,
} from '../PreloadedCustomBMS'

const enhance = compose(
connect(state => ({
Expand All @@ -19,6 +23,7 @@ const enhance = compose(
connectIO({
onFileDrop: () => event => CustomSongsIO.handleCustomSongFolderDrop(event),
onPaste: () => e => CustomSongsIO.handleClipboardPaste(e),
loadFromURL: () => url => CustomSongsIO.handleCustomSongURLLoad(url),
})
)

Expand All @@ -28,6 +33,7 @@ class CustomBMS extends React.Component {
onFileDrop: PropTypes.func,
onPaste: PropTypes.func,
onSongLoaded: PropTypes.func,
loadFromURL: PropTypes.func,
}

constructor(props) {
Expand All @@ -37,6 +43,11 @@ class CustomBMS extends React.Component {

componentDidMount() {
window.addEventListener('paste', this.handlePaste)
if (hasPendingArchiveToLoad()) {
this.props.loadFromURL(consumePendingArchiveURL()).then(song => {
if (this.props.onSongLoaded) this.props.onSongLoaded(song)
})
}
}

componentWillUnmount() {
Expand Down Expand Up @@ -109,8 +120,7 @@ class CustomBMS extends React.Component {
this.setState({ hover: false })
Analytics.send('CustomBMS', 'drop')
e.preventDefault()
const promise = this.props.onFileDrop(e.nativeEvent)
promise.then(song => {
this.props.onFileDrop(e.nativeEvent).then(song => {
if (this.props.onSongLoaded) this.props.onSongLoaded(song)
})
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/ui/MusicSelectScene.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { connect } from 'react-redux'
import { connect as connectToLegacyStore } from 'bemuse/flux'
import { createSelector, createStructuredSelector } from 'reselect'
import { shouldShowOptions } from 'bemuse/devtools/query-flags'
import { hasPendingArchiveToLoad } from '../PreloadedCustomBMS'

import * as Analytics from '../analytics'
import * as MusicSearchIO from '../io/MusicSearchIO'
Expand Down Expand Up @@ -100,7 +101,7 @@ class MusicSelectScene extends React.PureComponent {
super(props)
this.state = {
optionsVisible: shouldShowOptions(),
customBMSVisible: false,
customBMSVisible: hasPendingArchiveToLoad(),
unofficialDisclaimerVisible: false,
inSong: false,
authenticationPopupVisible: false,
Expand Down
2 changes: 1 addition & 1 deletion src/game/display/player-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class PlayerDisplay {

export default PlayerDisplay

// TODO: MOVE THIS TO bemuse-notechart
// TODO: MOVE THIS (getKeyMode) TO bemuse-notechart
//
function getKeyMode(notechart, scratch) {
const usedColumns = {}
Expand Down
Loading