Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

router_js

Package Overview
Dependencies
Maintainers
7
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

router_js - npm Package Compare versions

Comparing version 8.0.5 to 8.0.6

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## v8.0.6 (2024-08-02)
- [#335] Fix followRedirects when source is async and destination is sync ([@davidtaylorhq](https://github.com/davidtaylorhq))
## v8.0.5 (2024-03-19)

@@ -2,0 +7,0 @@

2

dist/cjs/transition.d.ts

@@ -15,2 +15,3 @@ import { Promise } from 'rsvp';

export declare const QUERY_PARAMS_SYMBOL = "__QPS__-2619863929824844-32323";
export declare const REDIRECT_DESTINATION_SYMBOL = "__RDS__-2619863929824844-32323";
/**

@@ -58,2 +59,3 @@ A Transition is a thenable (a promise-like object) that represents

isIntermediate: boolean;
[REDIRECT_DESTINATION_SYMBOL]?: Transition<R>;
/**

@@ -60,0 +62,0 @@ In non-production builds, this function will return the stack that this Transition was

14

dist/cjs/transition.js

@@ -9,3 +9,3 @@ "use strict";

exports.prepareResult = prepareResult;
exports.default = exports.QUERY_PARAMS_SYMBOL = exports.PARAMS_SYMBOL = exports.STATE_SYMBOL = void 0;
exports.default = exports.REDIRECT_DESTINATION_SYMBOL = exports.QUERY_PARAMS_SYMBOL = exports.PARAMS_SYMBOL = exports.STATE_SYMBOL = void 0;

@@ -25,2 +25,4 @@ var _rsvp = require("rsvp");

const QUERY_PARAMS_SYMBOL = `__QPS__-2619863929824844-32323`;
exports.QUERY_PARAMS_SYMBOL = QUERY_PARAMS_SYMBOL;
const REDIRECT_DESTINATION_SYMBOL = `__RDS__-2619863929824844-32323`;
/**

@@ -42,3 +44,3 @@ A Transition is a thenable (a promise-like object) that represents

exports.QUERY_PARAMS_SYMBOL = QUERY_PARAMS_SYMBOL;
exports.REDIRECT_DESTINATION_SYMBOL = REDIRECT_DESTINATION_SYMBOL;

@@ -245,2 +247,3 @@ class Transition {

redirect(newTransition) {
this[REDIRECT_DESTINATION_SYMBOL] = newTransition;
this.rollback();

@@ -340,6 +343,5 @@ this.router.routeWillChange(newTransition);

followRedirects() {
let router = this.router;
return this.promise.catch(function (reason) {
if (router.activeTransition) {
return router.activeTransition.followRedirects();
return this.promise.catch(reason => {
if (this[REDIRECT_DESTINATION_SYMBOL]) {
return this[REDIRECT_DESTINATION_SYMBOL].followRedirects();
}

@@ -346,0 +348,0 @@

@@ -15,2 +15,3 @@ import { Promise } from 'rsvp';

export declare const QUERY_PARAMS_SYMBOL = "__QPS__-2619863929824844-32323";
export declare const REDIRECT_DESTINATION_SYMBOL = "__RDS__-2619863929824844-32323";
/**

@@ -58,2 +59,3 @@ A Transition is a thenable (a promise-like object) that represents

isIntermediate: boolean;
[REDIRECT_DESTINATION_SYMBOL]?: Transition<R>;
/**

@@ -60,0 +62,0 @@ In non-production builds, this function will return the stack that this Transition was

@@ -8,2 +8,3 @@ import { Promise } from 'rsvp';

export const QUERY_PARAMS_SYMBOL = `__QPS__-2619863929824844-32323`;
export const REDIRECT_DESTINATION_SYMBOL = `__RDS__-2619863929824844-32323`;
/**

@@ -213,2 +214,3 @@ A Transition is a thenable (a promise-like object) that represents

redirect(newTransition) {
this[REDIRECT_DESTINATION_SYMBOL] = newTransition;
this.rollback();

@@ -306,6 +308,5 @@ this.router.routeWillChange(newTransition);

followRedirects() {
let router = this.router;
return this.promise.catch(function (reason) {
if (router.activeTransition) {
return router.activeTransition.followRedirects();
return this.promise.catch((reason) => {
if (this[REDIRECT_DESTINATION_SYMBOL]) {
return this[REDIRECT_DESTINATION_SYMBOL].followRedirects();
}

@@ -312,0 +313,0 @@ return Promise.reject(reason);

{
"name": "router_js",
"version": "8.0.5",
"version": "8.0.6",
"description": "A lightweight JavaScript library is built on top of route-recognizer and rsvp.js to provide an API for handling routes",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc