@jsonresume/jobs 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonresume/jobs",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "description": "Search Hacker News jobs matched against your JSON Resume",
6
6
  "bin": {
package/src/api.js CHANGED
@@ -30,6 +30,7 @@ export function createApiClient({ baseUrl, apiKey }) {
30
30
  qs.set('top', String(params.top || 50));
31
31
  qs.set('days', String(params.days || 30));
32
32
  if (params.remote) qs.set('remote', 'true');
33
+ if (params.globalRemote) qs.set('global_remote', 'true');
33
34
  if (params.minSalary) qs.set('min_salary', String(params.minSalary));
34
35
  if (params.search) qs.set('search', params.search);
35
36
  if (params.searchId) qs.set('search_id', params.searchId);
package/src/localApi.js CHANGED
@@ -18,6 +18,7 @@ export function createLocalApiClient({ baseUrl, resume }) {
18
18
  days: params.days || 30,
19
19
  };
20
20
  if (params.remote) body.remote = true;
21
+ if (params.globalRemote) body.global_remote = true;
21
22
  if (params.minSalary) body.min_salary = params.minSalary;
22
23
  if (params.search) body.search = params.search;
23
24
 
@@ -5,6 +5,11 @@ import { h } from './h.js';
5
5
 
6
6
  const FILTER_TYPES = [
7
7
  { type: 'remote', label: 'Remote only', hasValue: false },
8
+ {
9
+ type: 'globalRemote',
10
+ label: 'Global remote (work from anywhere)',
11
+ hasValue: false,
12
+ },
8
13
  {
9
14
  type: 'search',
10
15
  label: 'Keyword search',
@@ -233,6 +238,8 @@ export default function FilterManager({ filterState, onUpdate, onClose }) {
233
238
  const label =
234
239
  f.type === 'remote'
235
240
  ? 'Remote only'
241
+ : f.type === 'globalRemote'
242
+ ? 'Global remote'
236
243
  : f.type === 'search'
237
244
  ? `Search: "${f.value}"`
238
245
  : f.type === 'minSalary'
@@ -16,6 +16,7 @@ export function useJobs(api, activeFilters, tab, searchId, getDossierStatus) {
16
16
  for (const f of activeFilters || []) {
17
17
  if (f.type === 'days') p.days = Number(f.value) || 30;
18
18
  if (f.type === 'remote') p.remote = true;
19
+ if (f.type === 'globalRemote') p.globalRemote = true;
19
20
  if (f.type === 'minSalary') p.minSalary = Number(f.value) || 0;
20
21
  if (f.type === 'search') p.search = f.value || '';
21
22
  }
@@ -122,6 +123,9 @@ export function useJobs(api, activeFilters, tab, searchId, getDossierStatus) {
122
123
  (j) => j.remote === 'Full' || /remote/i.test(j.location || '')
123
124
  );
124
125
  }
126
+ if (f.type === 'globalRemote') {
127
+ filtered = filtered.filter((j) => j.global_remote === true);
128
+ }
125
129
  if (f.type === 'minSalary' && f.value) {
126
130
  filtered = filtered.filter(
127
131
  (j) => !j.salary_usd || j.salary_usd >= Number(f.value) * 1000