Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
A library for helping you organise your JavaScript test automation code, inspired by the screenplay pattern.
Feynman is designed to make it simple to run the same tasks at different levels of your stack.
Here's an example:
const { Book, CancelRoom, CurrentBookings } = require('TODO')
const throughTheDomain = new DomainPerspective()
const throughTheWebApp = new WebAppPerspective()
const Book = Tasks(Book => {
Book.aRoom
Book.aFlight = destination => ???
Book.aHoliday = destination => ???
})
const Book = {
aRoom: 'book-a-room-123',
aFlight: 'la ala la',
}
const globalPerspecive = definePerspective(() => {
action(Book.aHoliday, destination => ({actor}) => actor.attemptsTo(Book.aRoom, Book.aFlight(destination)))
})
const domainPerspective = definePerspective(() => {
action(Book.aRoom, ({domain, state}) => {
domain.bookARoom(state.get('email'))
})
action(Book.aFlight, destination => ({domain}) => {
domain.bookAFlight(destination)
})
})
// interacting tasks (i.e. interactions? or are interations the methods called in those low-level tasks?)
const BookARoom = roomNumber => ({ type: 'BookARoom', roomNumber })
const BookAFlight = flightNumber => ({ type: 'BookAFlight', flightNumber })
// high order tasks
const BookAHoliday = (roomNumber, flightNumber) => ({
type: 'BookAHoliday',
roomNumber,
flightNumber,
})
const handleBookAHoliday = [BookARoom, BookAFlight]
domainPerspective.handle(BookARoom, (actor, action, { domain }) =>
domain.bookRoom(action.roomNumber)
)
webbAppPerspective.handle(BookARoom, (actor, action, { browser }) =>
browser.go(`http://blah/${action.roomNumber}`)
)
domainPerspective.handle(BookAHoliday, handleBookAHoliday)
webbAppPerspective.handle(BookAHoliday, handleBookAHoliday)
// last two lines can be rewritten with a helper as:
handleInPerspectives(
BookAHoliday,
[domainPerspective, webbAppPerspective],
(actor, { roomNumber, flightNumber }) =>
actor.attempsTo(BookARoom(roomNumber), BookAFlight(flightNumber))
)
const Actor = (perspective, abilities) => {
attemptsTo: (action) => {
perspective.lookUpHandler(action.type)(...)
}
}
Given('Joe has booked a hotel room', async () => {
const joe = Actor()
throughTheDomain(joe).attemptsTo(
Book.aRoom
)
})
When('Joe cancels his hotel room', async () => {
const joe = Actor()
throughTheWebApp(joe).attemptsTo(
CancelRoom.bookedBy(joe)
)
})
Then('Joe should have no bookings', async () => {
const joe = Actor()
throughTheWebApp(joe).attemptsTo(
AssertThat(CurrentBookings.areEmpty)
)
// ==
throughTheWebApp(joe).checksThat(
CurrentBookings.areEmpty
)
})
// TODO: map the Book.aRoom task to these lower level tasks to show that tasks are composable
// Login.withValidCredentials,
// SearchForRoom.availableWithinNextTwoWeeks
// BookRoom.fromFirstSearchResult
FAQs
A screenplay pattern library for javascript
The npm package feynman receives a total of 0 weekly downloads. As such, feynman popularity was classified as not popular.
We found that feynman demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.