js-routes 2.0.2 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c14ad3a055abd586066f226e79c08040e311aa8d76012983a52785acbc5ae94
4
- data.tar.gz: 330f6f56f13d6d6c48923b201ce75e24f07a9c9adac17cb599e64de7db1d3ad8
3
+ metadata.gz: 4c4859fef1627aff464cbfd2c4cede3be5890c402d6bcb20afe1617059996d85
4
+ data.tar.gz: 04135b7c60e37f964f7f3904f04714fe76e6297560c7526b9ff5d3dd6069aa1c
5
5
  SHA512:
6
- metadata.gz: 21550a3ebe547e811e3fa7b3c343e5c332e9dd9f6a0bac9025a8cb29156b8c392aa57d45c556741427bd2f173dedd1ea98aa7d4fe17225c0b45f79a46eedc322
7
- data.tar.gz: 8b89660314d650dcf1091b277b615cdb653e7cd4b89b06ec676c0ad7cdd420f725930198f9f7cfe10e123d84e6085fefddd2df701f946dfcc91826047938b320
6
+ metadata.gz: 77a1e9c70ee04c5e01a64cd910ea724f68f5eaec46977bb2d2f3bb2677482688ca11a6efb32ba54e397f7f6267aa1eccc3797d86f9ce629a4c988731ba48bbaf
7
+ data.tar.gz: cb8166142e036e1232f517c25e6a3d515f8ecc75c87aa356562e3db1199a9962d51f64f21932a502de75c0b0fba94202efb0f40574f6c16b8fb6910a6a4c3577
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  ## master
2
2
 
3
+ ## v2.0.7
4
+
5
+ * Remove source map annotation from JS file. Fixes [#277](https://github.com/railsware/js-routes/issues/277)
6
+ * Generated file is not minified, so it is better to use app side bundler/compressor for source maps
7
+
8
+
9
+ ## v2.0.6
10
+
11
+ * Disable `namespace` option default for all envs [#278](https://github.com/railsware/js-routes/issues/278)
12
+
13
+ ## v2.0.5
14
+
15
+ * Fixed backward compatibility issue [#276](https://github.com/railsware/js-routes/issues/276)
16
+
17
+ ## v2.0.4
18
+
19
+ * Fixed backward compatibility issue [#275](https://github.com/railsware/js-routes/issues/275)
20
+
21
+ ## v2.0.3
22
+
23
+ * Fixed backward compatibility issue [#275](https://github.com/railsware/js-routes/issues/275)
24
+
3
25
  ## v2.0.2
4
26
 
5
27
  * Fixed backward compatibility issue [#274](https://github.com/railsware/js-routes/issues/274)
data/VERSION_2_UPGRADE.md CHANGED
@@ -8,13 +8,18 @@ Setting | Old | New
8
8
  --- | --- | ---
9
9
  module\_type | nil | ESM
10
10
  namespace | Routes | nil
11
+ documentation | false | true
11
12
 
12
- This is more optimized setup for WebPacker. You can restore the old configuration like this:
13
+ This is more optimized setup for WebPacker.
14
+ New version of js-routes generates function comment in the [JSDoc](https://jsdoc.app) format.
15
+
16
+ You can restore the old configuration like this:
13
17
 
14
18
  ``` ruby
15
19
  JsRoutes.setup do |config|
16
20
  config.module_type = nil
17
21
  config.namespace = 'Routes'
22
+ config.documentation = false
18
23
  end
19
24
  ```
20
25
 
@@ -47,15 +52,3 @@ try {
47
52
  }
48
53
  }
49
54
  ```
50
-
51
- ### JSDoc comment format
52
-
53
- New version of js-routes generates function comment in the [JSDoc](https://jsdoc.app) format.
54
- If you have any problems with that disable the annotation:
55
-
56
- ``` ruby
57
- JsRoutes.setup do |config|
58
- config.documentation = false
59
- end
60
- ```
61
-
data/lib/js_routes.rb CHANGED
@@ -12,7 +12,7 @@ class JsRoutes
12
12
  #
13
13
 
14
14
  DEFAULTS = {
15
- namespace: -> { defined?(Webpacker) ? nil : "Routes" },
15
+ namespace: nil,
16
16
  exclude: [],
17
17
  include: //,
18
18
  file: -> do
@@ -261,7 +261,8 @@ class JsRoutes
261
261
  end
262
262
 
263
263
  def base_name
264
- @base_name ||= apply_case(parent_route&.name, route.name)
264
+ @base_name ||= parent_route ?
265
+ [parent_route.name, route.name].join('_') : route.name
265
266
  end
266
267
 
267
268
  def parent_spec
@@ -278,7 +279,7 @@ class JsRoutes
278
279
 
279
280
  def helper_name(absolute)
280
281
  suffix = absolute ? :url : @configuration[:compact] ? nil : :path
281
- suffix ? apply_case(base_name, suffix) : base_name
282
+ apply_case(base_name, suffix)
282
283
  end
283
284
 
284
285
  def documentation
@@ -349,7 +350,7 @@ JS
349
350
  return spec.tr(':*', '') if spec.is_a?(String)
350
351
 
351
352
  result = serialize_spec(spec, parent_spec)
352
- if parent_spec && result[1].is_a?(String)
353
+ if parent_spec && result[1].is_a?(String) && parent_spec.type != :SLASH
353
354
  result = [
354
355
  # We encode node symbols as integer
355
356
  # to reduce the routes.js file size
@@ -1,3 +1,3 @@
1
1
  class JsRoutes
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.7"
3
3
  end
data/lib/routes.d.ts CHANGED
@@ -6,59 +6,52 @@ declare type RouteParameter = unknown;
6
6
  declare type RouteParameters = Record<string, RouteParameter>;
7
7
  declare type Serializer = (value: unknown) => string;
8
8
  declare type RouteHelper = {
9
- (...args: RouteParameter[]): string;
10
- requiredParams(): string[];
11
- toString(): string;
9
+ (...args: RouteParameter[]): string;
10
+ requiredParams(): string[];
11
+ toString(): string;
12
12
  };
13
13
  declare type RouteHelpers = Record<string, RouteHelper>;
14
14
  declare type Configuration = {
15
- prefix: string;
16
- default_url_options: RouteParameters;
17
- special_options_key: string;
18
- serializer: Serializer;
15
+ prefix: string;
16
+ default_url_options: RouteParameters;
17
+ special_options_key: string;
18
+ serializer: Serializer;
19
19
  };
20
20
  declare type Optional<T> = {
21
- [P in keyof T]?: T[P] | null;
21
+ [P in keyof T]?: T[P] | null;
22
22
  };
23
23
  interface RouterExposedMethods {
24
- config(): Configuration;
25
- configure(arg: Partial<Configuration>): Configuration;
26
- serialize: Serializer;
24
+ config(): Configuration;
25
+ configure(arg: Partial<Configuration>): Configuration;
26
+ serialize: Serializer;
27
27
  }
28
28
  declare type KeywordUrlOptions = Optional<{
29
- host: string;
30
- protocol: string;
31
- subdomain: string;
32
- port: string;
33
- anchor: string;
34
- trailing_slash: boolean;
29
+ host: string;
30
+ protocol: string;
31
+ subdomain: string;
32
+ port: string;
33
+ anchor: string;
34
+ trailing_slash: boolean;
35
35
  }>;
36
- declare type PartsTable = Record<
37
- string,
38
- {
36
+ declare type PartsTable = Record<string, {
39
37
  r?: boolean;
40
38
  d?: unknown;
41
- }
42
- >;
39
+ }>;
43
40
  declare type ModuleType = "CJS" | "AMD" | "UMD" | "ESM";
44
41
  declare const RubyVariables: {
45
- PREFIX: string;
46
- DEPRECATED_GLOBBING_BEHAVIOR: boolean;
47
- SPECIAL_OPTIONS_KEY: string;
48
- DEFAULT_URL_OPTIONS: RouteParameters;
49
- SERIALIZER: Serializer;
50
- NAMESPACE: string;
51
- ROUTES_OBJECT: RouteHelpers;
52
- MODULE_TYPE: ModuleType | null;
53
- WRAPPER: <T>(callback: T) => T;
42
+ PREFIX: string;
43
+ DEPRECATED_GLOBBING_BEHAVIOR: boolean;
44
+ SPECIAL_OPTIONS_KEY: string;
45
+ DEFAULT_URL_OPTIONS: RouteParameters;
46
+ SERIALIZER: Serializer;
47
+ NAMESPACE: string;
48
+ ROUTES_OBJECT: RouteHelpers;
49
+ MODULE_TYPE: ModuleType | null;
50
+ WRAPPER: <T>(callback: T) => T;
54
51
  };
55
- declare const define:
56
- | undefined
57
- | (((arg: unknown[], callback: () => unknown) => void) & {
58
- amd?: unknown;
59
- });
60
- declare const module:
61
- | {
62
- exports: any;
63
- }
64
- | undefined;
52
+ declare const define: undefined | (((arg: unknown[], callback: () => unknown) => void) & {
53
+ amd?: unknown;
54
+ });
55
+ declare const module: {
56
+ exports: any;
57
+ } | undefined;
data/lib/routes.js CHANGED
@@ -268,12 +268,18 @@ RubyVariables.WRAPPER((that) => {
268
268
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
269
269
  [_type, left, right], parameters, optional) {
270
270
  const left_part = this.visit(left, parameters, optional);
271
- const right_part = this.visit(right, parameters, optional);
271
+ let right_part = this.visit(right, parameters, optional);
272
272
  if (optional &&
273
273
  ((this.is_optional_node(left[0]) && !left_part) ||
274
274
  (this.is_optional_node(right[0]) && !right_part))) {
275
275
  return "";
276
276
  }
277
+ // if left_part ends on '/' and right_part starts on '/'
278
+ if (left_part[left_part.length - 1] === "/" && right_part[0] === "/") {
279
+ // strip slash from right_part
280
+ // to prevent double slash
281
+ right_part = right_part.substring(1);
282
+ }
277
283
  return left_part + right_part;
278
284
  }
279
285
  visit_symbol(
@@ -484,4 +490,3 @@ RubyVariables.WRAPPER((that) => {
484
490
  }
485
491
  return result;
486
492
  })(this);
487
- //# sourceMappingURL=routes.js.map
data/lib/routes.ts CHANGED
@@ -410,7 +410,7 @@ RubyVariables.WRAPPER(
410
410
  optional: boolean
411
411
  ): string {
412
412
  const left_part = this.visit(left, parameters, optional);
413
- const right_part = this.visit(right, parameters, optional);
413
+ let right_part = this.visit(right, parameters, optional);
414
414
  if (
415
415
  optional &&
416
416
  ((this.is_optional_node(left[0]) && !left_part) ||
@@ -418,6 +418,12 @@ RubyVariables.WRAPPER(
418
418
  ) {
419
419
  return "";
420
420
  }
421
+ // if left_part ends on '/' and right_part starts on '/'
422
+ if (left_part[left_part.length - 1] === "/" && right_part[0] === "/") {
423
+ // strip slash from right_part
424
+ // to prevent double slash
425
+ right_part = right_part.substring(1);
426
+ }
421
427
  return left_part + right_part;
422
428
  }
423
429
 
data/package.json CHANGED
@@ -21,6 +21,7 @@
21
21
  "prettier": "^2.2.1"
22
22
  },
23
23
  "scripts": {
24
+ "build": "tsc && yarn lint:fix",
24
25
  "lint:fix": "yarn eslint --fix && yarn prettier --write lib/routes.ts",
25
26
  "postinstall": "yarn husky-upgrade"
26
27
  },
@@ -30,7 +31,7 @@
30
31
  }
31
32
  },
32
33
  "lint-staged": {
33
- "*.ts": ["yarn lint:fix" ]
34
+ "./lib/routes.ts": ["yarn lint:fix" ]
34
35
  }
35
36
 
36
37
  }
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  describe JsRoutes, "#serialize" do
4
4
 
5
5
  before(:each) do
6
- evaljs(JsRoutes.generate({module_type: nil}))
6
+ evaljs(JsRoutes.generate({module_type: nil, namespace: 'Routes'}))
7
7
  end
8
8
 
9
9
  it "should provide this method" do
@@ -3,7 +3,11 @@ require 'spec_helper'
3
3
  describe JsRoutes, "options" do
4
4
 
5
5
  let(:generated_js) do
6
- JsRoutes.generate({module_type: nil, **_options})
6
+ JsRoutes.generate({
7
+ module_type: nil,
8
+ namespace: 'Routes',
9
+ **_options
10
+ })
7
11
  end
8
12
 
9
13
  before(:each) do
@@ -91,6 +95,18 @@ describe JsRoutes, "options" do
91
95
  expect(evaljs("Routes.inboxes_path")).to be_nil
92
96
  end
93
97
 
98
+ context "with camel_case option" do
99
+ let(:_options) { {include: /^admin_/, camel_case: true} }
100
+
101
+ it "should exclude specified routes from file" do
102
+ expect(evaljs("Routes.adminUsersPath()")).not_to be_nil
103
+ end
104
+
105
+ it "should not exclude routes not under specified pattern" do
106
+ expect(evaljs("Routes.inboxesPath")).to be_nil
107
+ end
108
+ end
109
+
94
110
  context "for rails engine" do
95
111
  let(:_options) { {:include => /^blog_app_posts/} }
96
112
 
@@ -180,9 +196,9 @@ describe JsRoutes, "options" do
180
196
  end
181
197
 
182
198
  context "is nil" do
183
- let(:_options) { {:namespace => nil} }
199
+ let(:_options) { {:namespace => nil, include: /^inbox$/} }
184
200
  it "should use this namespace for routing" do
185
- evaljs("window.zz = #{JsRoutes.generate(module_type: nil, namespace: nil)}")
201
+ evaljs("window.zz = #{generated_js}")
186
202
  expect(evaljs("window.zz.inbox_path")).not_to be_nil
187
203
  end
188
204
 
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  describe JsRoutes, "compatibility with Rails" do
4
4
 
5
5
  before(:each) do
6
- evaljs(JsRoutes.generate({module_type: nil}))
6
+ evaljs(JsRoutes.generate({module_type: nil, namespace: 'Routes'}))
7
7
  end
8
8
 
9
9
  it "should generate collection routing" do
@@ -135,6 +135,11 @@ describe JsRoutes, "compatibility with Rails" do
135
135
  it "should support single route mapping" do
136
136
  expect(evaljs("Routes.support_path({page: 3})")).to eq(test_routes.support_path(:page => 3))
137
137
  end
138
+
139
+ it 'works' do
140
+ expect(evaljs("Routes.planner_manage_path({locale: 'ua'})")).to eq(planner_routes.manage_path(locale: 'ua'))
141
+ expect(evaljs("Routes.planner_manage_path()")).to eq(planner_routes.manage_path)
142
+ end
138
143
  end
139
144
 
140
145
  it "shouldn't require the format" do
data/spec/spec_helper.rb CHANGED
@@ -8,7 +8,7 @@ require 'js-routes'
8
8
  require 'active_support/core_ext/hash/slice'
9
9
 
10
10
  unless ENV['TRAVIS_CI']
11
- code = system("yarn tsc")
11
+ code = system("yarn build")
12
12
  unless code
13
13
  exit(1)
14
14
  end
@@ -58,11 +58,21 @@ def blog_routes
58
58
  BlogEngine::Engine.routes.url_helpers
59
59
  end
60
60
 
61
+ def planner_routes
62
+ Planner::Engine.routes.url_helpers
63
+ end
64
+
61
65
  ActiveSupport::Inflector.inflections do |inflect|
62
66
  inflect.irregular "budgie", "budgies"
63
67
  end
64
68
 
65
69
 
70
+ module Planner
71
+ class Engine < Rails::Engine
72
+ isolate_namespace Planner
73
+ end
74
+ end
75
+
66
76
  module BlogEngine
67
77
  class Engine < Rails::Engine
68
78
  isolate_namespace BlogEngine
@@ -1,11 +1,17 @@
1
1
  def draw_routes
2
+ Planner::Engine.routes.draw do
3
+ get "/manage" => 'foo#foo', as: :manage
4
+ end
2
5
 
3
6
  BlogEngine::Engine.routes.draw do
4
7
  root to: "application#index"
5
- resources :posts
8
+ resources :posts, only: [:show, :index]
6
9
  end
7
10
  App.routes.draw do
8
11
 
12
+ mount Planner::Engine, at: "/(locale/:locale)", as: :planner
13
+
14
+ mount BlogEngine::Engine => "/blog", as: :blog_app
9
15
  get 'support(/page/:page)', to: BlogEngine::Engine, as: 'support'
10
16
 
11
17
  resources :inboxes, only: [:index, :show] do
@@ -43,8 +49,6 @@ def draw_routes
43
49
  get 'books/*section/:title' => 'books#show', :as => :book
44
50
  get 'books/:title/*section' => 'books#show', :as => :book_title
45
51
 
46
- mount BlogEngine::Engine => "/blog", :as => :blog_app
47
-
48
52
  get '/no_format' => "foo#foo", :format => false, :as => :no_format
49
53
 
50
54
  get '/json_only' => "foo#foo", :format => true, :constraints => {:format => /json/}, :as => :json_only
data/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "lib": ["es2020", "dom"],
5
5
  "module": "commonjs",
6
6
  "outDir": "lib",
7
- "sourceMap": true,
7
+ "sourceMap": false,
8
8
  "declaration": true,
9
9
  "allowSyntheticDefaultImports": true,
10
10
  "resolveJsonModule": true,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js-routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Gusiev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-26 00:00:00.000000000 Z
11
+ date: 2021-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -174,7 +174,6 @@ files:
174
174
  - lib/js_routes/version.rb
175
175
  - lib/routes.d.ts
176
176
  - lib/routes.js
177
- - lib/routes.js.map
178
177
  - lib/routes.ts
179
178
  - lib/tasks/js_routes.rake
180
179
  - package.json
data/lib/routes.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["routes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0DH,aAAa,CAAC,OAAO,CACnB,CAAC,IAAa,EAAwB,EAAE;IACtC,MAAM,OAAO,GAAG,CAAC,KAAc,EAAE,GAAW,EAAE,EAAE,CAC9C,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACnD,IAAK,SASJ;IATD,WAAK,SAAS;QACZ,2CAAS,CAAA;QACT,uCAAO,CAAA;QACP,6CAAU,CAAA;QACV,qCAAM,CAAA;QACN,yCAAQ,CAAA;QACR,+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